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

Macro with multiple sets of quotes fails to compile #60

Open
jgranick opened this issue Aug 20, 2019 · 3 comments
Open

Macro with multiple sets of quotes fails to compile #60

jgranick opened this issue Aug 20, 2019 · 3 comments
Labels

Comments

@jgranick
Copy link

The HXML compiles properly without using haxe-loader but fails due to a macro call with multiple sets of quotes:

--macro addMetadata("@:build(com.test.Hack.build())", "Math")

This would be resolved with: #31

This is probably also related to: #28

@elsassph
Copy link
Collaborator

@jgranick can you try using single quotes? Currently we take the entire value and put it between double-quotes.

@jgranick
Copy link
Author

I did try

If memory serves, either way it ends up looking something like:

--macro "addMetadata(@:build(com.test.Hack.build())", Math)

...and breaking the build

@elsassph
Copy link
Collaborator

Agh ok the bug is in the tokenisation library we're using to parse the arguments.
Here's something that works (pre-quoted using double quotes, single quotes inside):
--macro "addMetadata('@:keep', 'Test1')"

@elsassph elsassph added the bug label Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants