Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
VariableExpression: whitespace/hyphen/binop parsing fix #13134
Fixed line 325 of OpenRA.Game/Support/ConditionExpression.cs as mentioned in #13130. I had decided that it would be easier to use spaces to disambiguate minus and negative since condition names could have hyphens, and then forgot to mention that. Binary arithmetic and logic operators require whitespace around them and CharClass.Mixed characters, including
We discussed this in IRC and decided that it would be better to keep support for hyphens (except as the last character) in variable names, and then explicitly require whitespace around all binary operations.
This will require some changes to the lexer and testcases, plus a lot of grunt work when porting the UI to the new parser, but the effort should pay off in cleaner logic and cleaner yaml.
changed the title from
ConditionExpression: hyphen without whitespace lexing fix
VariableExpression: whitespace/hyphen/binop lexing fix
Apr 18, 2017
Reversal of requirements: minus operator must be surrounded by whitespace now.