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

Ninja doesn't accept some charaters in variable names (eg. +) #462

Open
rgeary1 opened this issue Nov 12, 2012 · 3 comments
Open

Ninja doesn't accept some charaters in variable names (eg. +) #462

rgeary1 opened this issue Nov 12, 2012 · 3 comments
Labels

Comments

@rgeary1
Copy link
Contributor

rgeary1 commented Nov 12, 2012

Ninja gives a lexing error if I create a build rule with a + in it. This causes difficulty as I'm trying to create a c++0x variant of my build and I have to adjust the target name for ninja

Can you extend the character set allowed in variable names?

@nico
Copy link
Collaborator

nico commented Nov 12, 2012

You can use ${a+b} to refer to variables that the straight $a syntax doesn't allow.

@evmar
Copy link
Collaborator

evmar commented Nov 13, 2012

See lexer.in.cc, function ReadToken() for the regex (varname) defining allowed identifiers. I don't think there's any good reason to disallow +, but when I wrote it I wanted to be conservative in case we wanted to use that character for syntax later. I don't have any objection to allowing it, I think.

@jonesmz

This comment was marked as abuse.

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

4 participants