You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tagged template literals are often used to embed another language in JavaScript. It'd be nice if this grammar had built-in support for delegating to another grammar based on the template tag, ie you can register grammars against template tag identifiers, like html, css, svg, json, etc. Some editors allow registering against regexes that match the tag.
One complication is the expressions in template literals. A nested grammar should be able to parse the joined template literal strings as one character stream.
A stack of nested grammars and documents will be necessary for complex nesting. It's not uncommon to see structures like this:
Tagged template literals are often used to embed another language in JavaScript. It'd be nice if this grammar had built-in support for delegating to another grammar based on the template tag, ie you can register grammars against template tag identifiers, like
html
,css
,svg
,json
, etc. Some editors allow registering against regexes that match the tag.One complication is the expressions in template literals. A nested grammar should be able to parse the joined template literal strings as one character stream.
A stack of nested grammars and documents will be necessary for complex nesting. It's not uncommon to see structures like this:
The text was updated successfully, but these errors were encountered: