Skip to content

0.4.36

Compare
Choose a tag to compare
@hydroper hydroper released this 12 Apr 17:41
· 217 commits to master since this release

Changes

Function type

The function type expression now complies with these in the ES4 overview paper.

  • Parameter names are omitted
  • Optional parameter is indicated by a = suffix instead of ?
  • The rest parameter does not require a type expression.
function(T1, T2=, ...): T
function(...[T1]): T2

Bug fixes

  • Introduction of error recovery was leading to never ending parsing cycles.
  • Specific attribute lookup in attribute combination was returning early in all attribute combination's lookup methods, leading to wrong reports.
  • Fixed location popping to range starting from the previous token (mostly a typo before).

Enhancements

  • The include directive may nest package definitions, despite how it is processed.
  • Malformed destructuring patterns are now reported before verification.
  • I was always unsure whether CONFIG::CONSTANT ... was part of ActionScript 3 or not, but I added it already: NormalConfigurationDirective.
  • Forgot to handle ReservedNamespace qualifiers in expressions not directly at the beginning of a directive or statement. (Which was handled in the previous parser.)
  • Type expressions now include qualified identifiers for compliance with ActionScript 3.

API changes

Since this parser update was a copy of my previous parser of another language, I had forgot to rename certain Rust items for more formedness.

  • as3_parser::ast > as3_parser::tree
  • AstAsKey > NodeAsKey