JastAdd2 Release Notes

JastAdd2 Release Notes


Bugfix Release

  • Fixed error in fullCopy causing some non-NTA children to not be copied correctly. This bug sometimes caused NullPointerExceptions or faulty behaviour in generated code.


Various bug fixes

  • Fixed bug on Windows - backslashes in file paths now work correctly.
  • NTA children are no longer copied by fullCopy.
  • Removed the generated method for accessing value maps of parameterized attributes.
  • Fixed error related to two synthesized attributes with the same name but different parameters.
  • It is now possible to use static import statements in aspect files.
  • Added a method getNumXNoTransform to count the number of elements in a list child without triggering rewrites.


Various bug fixes

  • getChild now returns null if the children array is null
  • inherited equations lacking a return statement now give compilation error
  • improved recognition of the "refined" keyword inside Java code in equations.
  • Synthesized NTA with parameters may now have null values
  • fullCopy now sets the parent of the copied tree to null
  • insertChild and removeChild now update the childIndex field correctly
  • Fixed how debug code escapes file names, to work also for Windows OS.
  • Fixed bug in code generation for Contributes-clauses without when-part.
  • Circular attributes now generate Java 1.4 code when the java1.4 option is set.

Improved output handling

  • Error messages, warnings, and help messages are now printed on stderr instead of on stdout.
  • JastAdd now returns exit code zero when just printing version or help information.

Improved option handling

  • The options --noComponentCheck, --lazyMaps, and --refineLegacy are now by default ON when running from the command line.
  • The default behavior is now the same when running from the command line as when running through ANT.
  • Command line options are no longer case sensitive.
  • Some options are deprecated. A warning is printed if such an option is used.
  • Warnings are printed for some other cases, like giving an option twice, giving an option without an expected argument, etc.


JavaDoc support

JastAdd now generates Java files with JavaDoc comments for built-in APIs and APIs for attributes. See the upcoming RagDoll tool for more information.

JDK7 compliance

Code generated by older versions of JastAdd might give compile time errors when compiling using javac from JDK 7. This is because JastAdd previously generated code where private fields were accessed in an erroneous way according to the JLS. Previous javac versions accepted such code, but the bug has been fixed in JDK 7. This version of JastAdd generates code not giving this problem.