Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action code sometimes doesn't get expanded properly when using ES6/2017 string templates #22

Open
GerHobbelt opened this issue Oct 29, 2017 · 0 comments

Comments

@GerHobbelt
Copy link
Owner

`this is an ES6 string which has double-quoted jison var ref like this: "${@var}"`

in the above situation, with the quotes inside the template string, around the jison variable reference, such a variable doesn't get expanded.

The problem existed in the jison grammar spec itself, but a quick hack at least has that one circumvented for the time being:

var js_var = @var;  // this DOES get expanded!
...`this is an ES6 string which has double-quoted jison var ref like this: "${js_var}"`
// ^^^ the above string template delivers as expected and doesn't barf a hairball when executed.

(See bnf.y for an example of this)

This needs to be fixed; we'll need the new tweaked recast library for real for this, as we've just hit the limit of regex replace power. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant