Der neue Dienst "GitLab am KIT" ist unter gitlab.kit.edu erreichbar.

Skip to content

Minus in Identifier

tk5165 requested to merge fix-underscore into master

This patch add "-" as a regular char in identifier, e.g. a rule name can be update-heap.

For expressions, this clashes with arithmetic operator MINUS. TransformAST::splitIdentifier repairs this:

-a == (- a) 
-a-b  == (- a) - b

It also repairs a bug that - a - b is interpreted as - (a - b)

The error check for assignments is missing, e.g. "a-b := 1", and is left to reader.

Merge request reports