JastAdd keywords in Java code
Issue #195
resolved
I think it would be nice to be able to use JastAdd keywords in java code. In particular I have often tried to use the variable name to
.
aspect JastAddKeywords { public void Goal.myMethod() { boolean when = true; // Error int to = 20; // Error // ... } }
Comments (2)
-
-
- changed status to resolved
Allow JastAdd keywords in some Java code
Allow the use of JastAdd keywords such as "syn", "eq", "to", etc., in some Java code contexts where the use of the keyword is unambiguous. For example, JastAdd keywords can now be used in
- field names,
- method names,
- the body of an attribute equation,
- and the body of an inter-type declaration
fixes
#195(bitbucket)→ <<cset aaff7c37b551>>
- Log in to comment
I managed to fix this issue for certain cases where the use of JastAdd keywords is unambiguous. Will test and commit the fix soon.
There might be additional places where the keywords are unambiguous, in addition to the cases where I made it possible to use the keywords just now. For example, class and interface names for types declared in an aspect could use a keyword name, but this makes it difficult to add attributes to the class or interface so I think that we should not add that feature yet.