dowdiness/js_engine/ast does not have a README file

    BinOp

    pub(all) enum BinOp {
    Add
    Sub
    Mul
    Div
    Mod
    EqEq
    EqEqEq
    NotEq
    NotEqEq
    Lt
    Gt
    LtEq
    GtEq
    And
    Or
    NullishCoalesce
    BitAnd
    BitOr
    BitXor
    LShift
    RShift
    URShift
    Exp
    In
    Instanceof
    } derive(Eq,
    Debug
    )

    impl Show for BinOp

    BinOp::equal

    fn BinOp::equal(BinOp, BinOp) -> Bool

    BinOp::not_equal

    fn BinOp::not_equal(x : BinOp, y : BinOp) -> Bool

    BinOp::output

    fn BinOp::output(self : BinOp, logger : &Logger) -> Unit

    BinOp::to_repr

    BinOp::to_string

    fn BinOp::to_string(self : BinOp) -> String

    ClassField

    pub(all) struct ClassField {
    key : Expr
    initializer : Expr?
    computed : Bool
    is_static : Bool
    is_private : Bool
    } derive(Eq,
    Debug
    )

    impl Show for ClassField

    ClassField::equal

    fn ClassField::equal(ClassField, ClassField) -> Bool

    ClassField::not_equal

    fn ClassField::not_equal(x : ClassField, y : ClassField) -> Bool

    ClassField::output

    fn ClassField::output(self : ClassField, logger : &Logger) -> Unit

    ClassField::to_string

    fn ClassField::to_string(self : ClassField) -> String

    ClassMember

    pub(all) enum ClassMember {
    Method(ClassMethod)
    Field(ClassField)
    StaticBlock(Array[Stmt],
    Loc
    )
    } derive(Eq,
    Debug
    )

    impl Show for ClassMember

    ClassMember::equal

    fn ClassMember::equal(ClassMember, ClassMember) -> Bool

    ClassMember::not_equal

    fn ClassMember::not_equal(x : ClassMember, y : ClassMember) -> Bool

    ClassMember::output

    fn ClassMember::output(self : ClassMember, logger : &Logger) -> Unit

    ClassMember::to_string

    fn ClassMember::to_string(self : ClassMember) -> String

    ClassMethod

    pub(all) struct ClassMethod {
    key : Expr
    value : Expr
    kind : PropKind
    computed : Bool
    is_static : Bool
    is_private : Bool
    } derive(Eq,
    Debug
    )

    impl Show for ClassMethod

    ClassMethod::equal

    fn ClassMethod::equal(ClassMethod, ClassMethod) -> Bool

    ClassMethod::not_equal

    fn ClassMethod::not_equal(x : ClassMethod, y : ClassMethod) -> Bool

    ClassMethod::output

    fn ClassMethod::output(self : ClassMethod, logger : &Logger) -> Unit

    ClassMethod::to_string

    fn ClassMethod::to_string(self : ClassMethod) -> String

    CompoundOp

    pub(all) enum CompoundOp {
    AddAssign
    SubAssign
    MulAssign
    DivAssign
    ModAssign
    ExpAssign
    BitAndAssign
    BitOrAssign
    BitXorAssign
    LShiftAssign
    RShiftAssign
    URShiftAssign
    LogicalAndAssign
    LogicalOrAssign
    NullishAssign
    } derive(Eq,
    Debug
    )

    impl Show for CompoundOp

    CompoundOp::equal

    fn CompoundOp::equal(CompoundOp, CompoundOp) -> Bool

    CompoundOp::not_equal

    fn CompoundOp::not_equal(x : CompoundOp, y : CompoundOp) -> Bool

    CompoundOp::output

    fn CompoundOp::output(self : CompoundOp, logger : &Logger) -> Unit

    CompoundOp::to_string

    fn CompoundOp::to_string(self : CompoundOp) -> String

    ExportSpecifier

    pub(all) struct ExportSpecifier {
    local_name : String
    exported : String
    } derive(Eq,
    Debug
    )

    ExportSpecifier::equal

    ExportSpecifier::not_equal

    fn ExportSpecifier::not_equal(x : ExportSpecifier, y : ExportSpecifier) -> Bool

    ExportSpecifier::output

    fn ExportSpecifier::output(self : ExportSpecifier, logger : &Logger) -> Unit

    ExportSpecifier::to_string

    fn ExportSpecifier::to_string(self : ExportSpecifier) -> String

    Expr

    pub(all) enum Expr {
    NumberLit(Double,
    LexForm
    ,
    Loc
    )
    StringLit(String, Bool,
    LexForm
    ,
    Loc
    )
    BoolLit(Bool,
    Loc
    )
    NullLit(
    Loc
    )
    UndefinedLit(
    Loc
    )
    ArrayHole(
    Loc
    )
    Ident(String,
    Loc
    )
    Binary(BinOp, Expr, Expr,
    Loc
    )
    Unary(UnaryOp, Expr,
    Loc
    )
    Assign(String, Expr,
    Loc
    )
    Call(Expr, Array[Expr],
    Loc
    )
    Member(Expr, String,
    Loc
    )
    Ternary(Expr, Expr, Expr,
    Loc
    )
    FuncExpr(String?, Array[String], Array[Stmt],
    Loc
    , String?)
    FuncExprExt(String?, Array[Param], String?, Array[Stmt],
    Loc
    , String?)
    Grouping(Expr,
    Loc
    )
    ObjectLit(Array[Property],
    Loc
    )
    ArrayLit(Array[Expr],
    Loc
    )
    ComputedMember(Expr, Expr,
    Loc
    )
    MemberAssign(Expr, String, Expr,
    Loc
    )
    PrivateMemberAssign(Expr, String, Expr,
    Loc
    )
    ComputedAssign(Expr, Expr, Expr,
    Loc
    )
    NewExpr(Expr, Array[Expr],
    Loc
    )
    ThisExpr(
    Loc
    )
    UpdateExpr(UpdateOp, Expr, Bool,
    Loc
    )
    CompoundAssign(CompoundOp, Expr, Expr,
    Loc
    )
    Comma(Expr, Expr,
    Loc
    )
    TemplateLit(Array[(String, String?)], Array[Expr],
    Loc
    )
    ArrowFunc(Array[String], Array[Stmt],
    Loc
    , String?)
    ArrowFuncExt(Array[Param], String?, Array[Stmt],
    Loc
    , String?)
    SpreadExpr(Expr,
    Loc
    )
    RegexLit(String, String,
    Loc
    )
    DestructureAssign(Pattern, Expr,
    Loc
    )
    OptionalMember(Expr, String,
    Loc
    )
    OptionalComputedMember(Expr, Expr,
    Loc
    )
    OptionalCall(Expr, Array[Expr],
    Loc
    )
    ChainMember(Expr, String,
    Loc
    )
    ChainComputedMember(Expr, Expr,
    Loc
    )
    ClassExpr(String?, Expr?, Array[ClassMember],
    Loc
    , String?)
    SuperCall(Array[Expr],
    Loc
    )
    SuperMember(String,
    Loc
    )
    SuperComputedMember(Expr,
    Loc
    )
    SuperMemberAssign(String, Expr,
    Loc
    )
    SuperComputedAssign(Expr, Expr,
    Loc
    )
    NewTargetExpr(
    Loc
    )
    TaggedTemplate(Expr, Array[(String, String?)], Array[Expr],
    Loc
    )
    GeneratorExpr(String?, Array[String], Array[Stmt],
    Loc
    , String?)
    GeneratorExprExt(String?, Array[Param], String?, Array[Stmt],
    Loc
    , String?)
    YieldExpr(Expr?, Bool,
    Loc
    )
    AsyncFuncExpr(String?, Array[String], Array[Stmt],
    Loc
    , String?)
    AsyncFuncExprExt(String?, Array[Param], String?, Array[Stmt],
    Loc
    , String?)
    AsyncArrowFunc(Array[String], Array[Stmt],
    Loc
    , String?)
    AsyncArrowFuncExt(Array[Param], String?, Array[Stmt],
    Loc
    , String?)
    AsyncGeneratorExpr(String?, Array[String], Array[Stmt],
    Loc
    , String?)
    AsyncGeneratorExprExt(String?, Array[Param], String?, Array[Stmt],
    Loc
    , String?)
    AwaitExpr(Expr,
    Loc
    )
    WebCompatCallAssign(Expr, Expr,
    Loc
    )
    PrivateIdent(String,
    Loc
    )
    PrivateMember(Expr, String,
    Loc
    )
    } derive(Eq,
    Debug
    )

    impl Show for Expr

    Expr::equal

    fn Expr::equal(Expr, Expr) -> Bool

    Expr::not_equal

    fn Expr::not_equal(x : Expr, y : Expr) -> Bool

    Expr::output

    fn Expr::output(self : Expr, logger : &Logger) -> Unit

    Expr::to_repr

    Expr::to_string

    fn Expr::to_string(self : Expr) -> String

    ImportSpecifier

    pub(all) struct ImportSpecifier {
    local_name : String
    imported : String
    } derive(Eq,
    Debug
    )

    ImportSpecifier::equal

    ImportSpecifier::not_equal

    fn ImportSpecifier::not_equal(x : ImportSpecifier, y : ImportSpecifier) -> Bool

    ImportSpecifier::output

    fn ImportSpecifier::output(self : ImportSpecifier, logger : &Logger) -> Unit

    ImportSpecifier::to_string

    fn ImportSpecifier::to_string(self : ImportSpecifier) -> String

    Param

    pub(all) struct Param {
    name : String
    default_val : Expr?
    pattern : Pattern?
    is_rest_pattern : Bool
    } derive(Eq,
    Debug
    )

    impl Show for Param

    Param::equal

    fn Param::equal(Param, Param) -> Bool

    Param::not_equal

    fn Param::not_equal(x : Param, y : Param) -> Bool

    Param::output

    fn Param::output(self : Param, logger : &Logger) -> Unit

    Param::to_repr

    Param::to_string

    fn Param::to_string(self : Param) -> String

    Pattern

    pub(all) enum Pattern {
    IdentPat(String)
    ArrayPat(Array[Pattern?], Pattern?)
    ObjectPat(Array[PropPat], Pattern?)
    DefaultPat(Pattern, Expr)
    AssignTarget(Expr)
    } derive(Eq,
    Debug
    )

    impl Show for Pattern

    Pattern::equal

    fn Pattern::equal(Pattern, Pattern) -> Bool

    Pattern::not_equal

    fn Pattern::not_equal(x : Pattern, y : Pattern) -> Bool

    Pattern::output

    fn Pattern::output(self : Pattern, logger : &Logger) -> Unit

    Pattern::to_repr

    Pattern::to_string

    fn Pattern::to_string(self : Pattern) -> String

    Program

    pub(all) struct Program {
    stmts : Array[Stmt]
    } derive(Eq,
    Debug
    )

    impl Show for Program

    Program::equal

    fn Program::equal(Program, Program) -> Bool

    Program::not_equal

    fn Program::not_equal(x : Program, y : Program) -> Bool

    Program::output

    fn Program::output(self : Program, logger : &Logger) -> Unit

    Program::to_repr

    Program::to_string

    fn Program::to_string(self : Program) -> String

    PropKind

    pub(all) enum PropKind {
    Init
    Get
    Set
    Spread
    } derive(Eq,
    Debug
    )

    impl Show for PropKind

    PropKind::equal

    fn PropKind::equal(PropKind, PropKind) -> Bool

    PropKind::not_equal

    fn PropKind::not_equal(x : PropKind, y : PropKind) -> Bool

    PropKind::output

    fn PropKind::output(self : PropKind, logger : &Logger) -> Unit

    PropKind::to_repr

    PropKind::to_string

    fn PropKind::to_string(self : PropKind) -> String

    PropPat

    pub(all) struct PropPat {
    key : String
    key_lex_form :
    LexForm

    key_loc :
    Loc

    value : Pattern
    default_val : Expr?
    computed_key : Expr?
    } derive(Eq,
    Debug
    )

    impl Show for PropPat

    PropPat::equal

    fn PropPat::equal(PropPat, PropPat) -> Bool

    PropPat::not_equal

    fn PropPat::not_equal(x : PropPat, y : PropPat) -> Bool

    PropPat::output

    fn PropPat::output(self : PropPat, logger : &Logger) -> Unit

    PropPat::to_repr

    PropPat::to_string

    fn PropPat::to_string(self : PropPat) -> String

    Property

    pub(all) struct Property {
    key : Expr
    value : Expr
    kind : PropKind
    computed : Bool
    is_method : Bool
    } derive(Eq,
    Debug
    )

    impl Show for Property

    Property::equal

    fn Property::equal(Property, Property) -> Bool

    Property::not_equal

    fn Property::not_equal(x : Property, y : Property) -> Bool

    Property::output

    fn Property::output(self : Property, logger : &Logger) -> Unit

    Property::to_repr

    Property::to_string

    fn Property::to_string(self : Property) -> String

    Stmt

    pub(all) enum Stmt {
    ExprStmt(Expr,
    Loc
    )
    VarDecl(VarKind, String, Expr?,
    Loc
    )
    Block(Array[Stmt],
    Loc
    )
    StmtList(Array[Stmt],
    Loc
    )
    IfStmt(Expr, Stmt, Stmt?,
    Loc
    )
    WhileStmt(Expr, Stmt,
    Loc
    )
    ForStmt(Stmt?, Expr?, Expr?, Stmt,
    Loc
    )
    FuncDecl(String, Array[String], Array[Stmt],
    Loc
    , String?)
    FuncDeclExt(String, Array[Param], String?, Array[Stmt],
    Loc
    , String?)
    ReturnStmt(Expr?,
    Loc
    )
    BreakStmt(String?,
    Loc
    )
    ContinueStmt(String?,
    Loc
    )
    ThrowStmt(Expr,
    Loc
    )
    TryCatchStmt(Array[Stmt], Pattern?, Array[Stmt]?, Array[Stmt]?,
    Loc
    )
    SwitchStmt(Expr, Array[SwitchCase],
    Loc
    )
    DoWhileStmt(Stmt, Expr,
    Loc
    )
    ForInStmt(VarKind?, String, Expr, Stmt,
    Loc
    )
    ForOfStmt(VarKind?, String, Expr, Stmt,
    Loc
    )
    ForInStmtPat(VarKind?, Pattern, Expr, Stmt,
    Loc
    )
    ForOfStmtPat(VarKind?, Pattern, Expr, Stmt,
    Loc
    )
    ForInExpr(Expr, Expr, Stmt,
    Loc
    )
    ForOfExpr(Expr, Expr, Stmt,
    Loc
    )
    AsyncForOfStmt(VarKind?, String, Expr, Stmt,
    Loc
    )
    AsyncForOfStmtPat(VarKind?, Pattern, Expr, Stmt,
    Loc
    )
    AsyncForOfExpr(Expr, Expr, Stmt,
    Loc
    )
    DestructureDecl(VarKind, Pattern, Expr,
    Loc
    )
    LabeledStmt(String, Stmt,
    Loc
    )
    GeneratorDecl(String, Array[String], Array[Stmt],
    Loc
    , String?)
    GeneratorDeclExt(String, Array[Param], String?, Array[Stmt],
    Loc
    , String?)
    AsyncFuncDecl(String, Array[String], Array[Stmt],
    Loc
    , String?)
    AsyncFuncDeclExt(String, Array[Param], String?, Array[Stmt],
    Loc
    , String?)
    AsyncGeneratorDecl(String, Array[String], Array[Stmt],
    Loc
    , String?)
    AsyncGeneratorDeclExt(String, Array[Param], String?, Array[Stmt],
    Loc
    , String?)
    ClassDecl(String, Expr?, Array[ClassMember],
    Loc
    , String?)
    WithStmt(Expr, Stmt,
    Loc
    )
    ImportDecl(String?, Array[ImportSpecifier], String?, String,
    LexForm
    ,
    Loc
    )
    ExportNamedDecl(Stmt?, Array[ExportSpecifier], String?,
    LexForm
    ,
    Loc
    )
    ExportDefaultDecl(Expr,
    Loc
    )
    ExportAllDecl(String?, String,
    LexForm
    ,
    Loc
    )
    } derive(Eq,
    Debug
    )

    impl Show for Stmt

    Stmt::equal

    fn Stmt::equal(Stmt, Stmt) -> Bool

    Stmt::not_equal

    fn Stmt::not_equal(x : Stmt, y : Stmt) -> Bool

    Stmt::output

    fn Stmt::output(self : Stmt, logger : &Logger) -> Unit

    Stmt::to_repr

    Stmt::to_string

    fn Stmt::to_string(self : Stmt) -> String

    SwitchCase

    pub(all) struct SwitchCase {
    condition : Expr?
    body : Array[Stmt]
    } derive(Eq,
    Debug
    )

    impl Show for SwitchCase

    SwitchCase::equal

    fn SwitchCase::equal(SwitchCase, SwitchCase) -> Bool

    SwitchCase::not_equal

    fn SwitchCase::not_equal(x : SwitchCase, y : SwitchCase) -> Bool

    SwitchCase::output

    fn SwitchCase::output(self : SwitchCase, logger : &Logger) -> Unit

    SwitchCase::to_string

    fn SwitchCase::to_string(self : SwitchCase) -> String

    UnaryOp

    pub(all) enum UnaryOp {
    Neg
    Pos
    Not
    Typeof
    Void
    Delete
    BitNot
    } derive(Eq,
    Debug
    )

    impl Show for UnaryOp

    UnaryOp::equal

    fn UnaryOp::equal(UnaryOp, UnaryOp) -> Bool

    UnaryOp::not_equal

    fn UnaryOp::not_equal(x : UnaryOp, y : UnaryOp) -> Bool

    UnaryOp::output

    fn UnaryOp::output(self : UnaryOp, logger : &Logger) -> Unit

    UnaryOp::to_repr

    UnaryOp::to_string

    fn UnaryOp::to_string(self : UnaryOp) -> String

    UpdateOp

    pub(all) enum UpdateOp {
    Increment
    Decrement
    } derive(Eq,
    Debug
    )

    impl Show for UpdateOp

    UpdateOp::equal

    fn UpdateOp::equal(UpdateOp, UpdateOp) -> Bool

    UpdateOp::not_equal

    fn UpdateOp::not_equal(x : UpdateOp, y : UpdateOp) -> Bool

    UpdateOp::output

    fn UpdateOp::output(self : UpdateOp, logger : &Logger) -> Unit

    UpdateOp::to_repr

    UpdateOp::to_string

    fn UpdateOp::to_string(self : UpdateOp) -> String

    VarKind

    pub(all) enum VarKind {
    LetKind
    ConstKind
    VarKind
    } derive(Eq,
    Debug
    )

    impl Show for VarKind

    VarKind::equal

    fn VarKind::equal(VarKind, VarKind) -> Bool

    VarKind::not_equal

    fn VarKind::not_equal(x : VarKind, y : VarKind) -> Bool

    VarKind::output

    fn VarKind::output(self : VarKind, logger : &Logger) -> Unit

    VarKind::to_repr

    VarKind::to_string

    fn VarKind::to_string(self : VarKind) -> String

    expr_immediate_children_any

    fn expr_immediate_children_any(expr : Expr, visit : (Expr) -> Bool) -> Bool

    Returns whether any immediate expression child of expr satisfies visit.

    Immediate children are the expression-valued edges represented directly by the expression node: operands, arguments, literal elements and properties, template substitutions, destructuring RHS expressions, and a class's superclass. Function bodies, parameter lists, static blocks, and class member containers are not edges of this traversal. In particular, ClassExpr emits only its optional superclass; consumers with class-specific policies must handle class members locally.

    The node itself is not passed to visit, and this function never recurses. Children are visited left-to-right and stop at the first true result.

    pattern_immediate_children_any

    fn pattern_immediate_children_any(pattern : Pattern, visit_pattern : (Pattern) -> Bool, visit_expr : (Expr) -> Bool) -> Bool

    Returns whether any immediate pattern child of pattern satisfies visit_pattern or any embedded expression child satisfies visit_expr.

    Immediate pattern children are nested patterns, array/rest elements, object/rest values, and assignment targets. Embedded expression edges are object computed keys and defaults, pattern defaults, and assignment-target expressions. Children are visited in source order, left-to-right, and stop at the first true result. This function never recurses and allocates no child collection.