5 ms·
I'd like to learn enough to understand the statement "JSX is just a JS primary," and I can't find out what a "$lang primary" is in PLT. Can you point out some r
by jabagawee 11y ago
I'd like to learn enough to understand the statement "JSX is just a JS primary," and I can't find out what a "$lang primary" is in PLT. Can you point out some resources for me to figure this out?
- bottled_poe 11y agoThe previous comment is trying to sound smart by using obscure terminology. I would guess they mean to say that JSX is a translated subset of JS?
- couchand 11y agoThanks for your generosity. This is what I was referring to: JSX extends the PrimaryExpression in the ECMAScript 6th Edition (ECMA-262) grammar. Please take a look at the draft JSX spec [0] for details. [0]: https://github.com/facebook/jsx https://github.com/facebook/jsx
- couchand 11y agoThe full name is primary expression. The meat of it is that a primary is usually just a literal value, identifier, or something in parentheses, but it varies based on the particular language. For a deep dive you'll want to read resources about parsing. To name one article that came up recently on HN, take a look at "Why Parsing Tools are Hard" [0]. [0]: http://blog.reverberate.org/2013/09/ll-and-lr-in-context-why-parsing-tools.html http://blog.reverberate.org/2013/09/ll-and-lr-in-context-why...