ActionScript 3 parser

as3_parser is a handwritten ActionScript parser covering all sorts of ambiguous syntax (qualified identifiers, E4X, arrow functions, destructuring patterns, and annotations). It additionally recognizes ASDoc comments and their tags.

NOTICE: ActionScript program execution consists of three phases: parsing, verification, and evaluation. This project only does parsing, and not verification and evaluation. Verification includes type checking and control flow checking.

Example 1

Input:

(({x, y}, argument: Number = 10) => x ** y + argument);
a => 10;

Output

Example 2

Input:

*
public::x
; (q)::x
o.*
o.public
o.public::x
o.(q)::x
o.q::x
o.q::[k]
o.@x;

Output

Example 3 (E4X)

Input:

<!-- Comment --> ;
<? ?> ;
<![CDATA[ Characters ]]> ;
<t>
    <t/>
    <t {c}/>
    <t k="v"/>
    <t k={v}/>
    Lorem ipsum
    <t>Lorem ipsum</t>
    {c}
</t>
    .(filterCondition)
    ..d;

<></>;

Output

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.