Incremental=param on ExtendJ compares boolean and Circular
Example error:
/home/emso/git/extendj/src/gen/org/extendj/ast/TypeDecl.java:1648: error: bad operand types for binary operator '&&'
[javac] else if (attrID.equals("inStaticContext") && inStaticContext_computed) {
[javac] ^
[javac] first type: boolean
[javac] second type: Cycle
The inStaticContext_computed attribute is typically checked like this in the attribute implementation:
if (inStaticContext_computed == ASTNode$State.NON_CYCLE || inStaticContext_computed == state().cycle()) {
state().trace().cacheRead(this, "TypeDecl.inStaticContext()", "", inStaticContext_value);
return inStaticContext_value;
}
The incremental code needs to update how this code is generated.
Comments (3)
-
-
reporter Thanks!
Could the default JastAdd version in ExtendJ be updated to 2.3.4?
-
- changed status to resolved
Fix code generation errors for incremental token NTAs
Added new attribute AttrDecl.isToken() to identify token NTA equations.
fixes
#313(bitbucket)→ <<cset 8cbdab85fa1b>>
- Log in to comment
ExtendJ currently builds with JastAdd 2.3.0, but the error you describe has been fixed in 2.3.4.
JastAdd 2.3.4 can be used by adding this to the build script inside the subprojects part:
However, with JastAdd 2.3.4 there are still some code generation errors in ExtendJ with
incremental=param
, incleanupListeners
caused by NTA tokens.I wrote a minimal test for the former error in jastadd-test, it should not be too hard to fix.