ASTTags are the symbols that allows to distinguish between different kinds of syntactic constructions in the AST representing a Gobstones program. This interface organize those symbols according to their syntactic category, for grouping purposes, and easy access. There are four (4) main elements (Main, Definitions, Statements, and Expressions), and an additional one (Parts) to group parts of other constructions.

interface ASTTags {
    Definitions: {
        Function: symbol;
        InteractiveProgram: symbol;
        Procedure: symbol;
        Program: symbol;
        Type: symbol;
    };
    Expressions: {
        Choose: symbol;
        FunctionCall: symbol;
        ListRange: symbol;
        LiteralList: symbol;
        LiteralNumber: symbol;
        LiteralString: symbol;
        Matching: symbol;
        Structure: symbol;
        StructureUpdate: symbol;
        Tuple: symbol;
        Variable: symbol;
    };
    Main: symbol;
    Parts: {
        ConstructorDeclaration: symbol;
        ExprBranch: symbol;
        ExprConditional: symbol;
        FieldBinding: symbol;
        PatternNumber: symbol;
        PatternStructure: symbol;
        PatternTimeout: symbol;
        PatternTuple: symbol;
        PatternVariable: symbol;
        PatternWildcard: symbol;
        StmtBranch: symbol;
        StmtConditional: symbol;
    };
    Statements: {
        AssignTuple: symbol;
        AssignVariable: symbol;
        Block: symbol;
        Foreach: symbol;
        If: symbol;
        ProcedureCall: symbol;
        Repeat: symbol;
        Return: symbol;
        Switch: symbol;
        While: symbol;
    };
}

Properties

Definitions: {
    Function: symbol;
    InteractiveProgram: symbol;
    Procedure: symbol;
    Program: symbol;
    Type: symbol;
}

Type declaration

  • Function: symbol
  • InteractiveProgram: symbol
  • Procedure: symbol
  • Program: symbol
  • Type: symbol
Expressions: {
    Choose: symbol;
    FunctionCall: symbol;
    ListRange: symbol;
    LiteralList: symbol;
    LiteralNumber: symbol;
    LiteralString: symbol;
    Matching: symbol;
    Structure: symbol;
    StructureUpdate: symbol;
    Tuple: symbol;
    Variable: symbol;
}

Type declaration

  • Choose: symbol
  • FunctionCall: symbol
  • ListRange: symbol
  • LiteralList: symbol
  • LiteralNumber: symbol
  • LiteralString: symbol
  • Matching: symbol
  • Structure: symbol
  • StructureUpdate: symbol
  • Tuple: symbol
  • Variable: symbol
Main: symbol
Parts: {
    ConstructorDeclaration: symbol;
    ExprBranch: symbol;
    ExprConditional: symbol;
    FieldBinding: symbol;
    PatternNumber: symbol;
    PatternStructure: symbol;
    PatternTimeout: symbol;
    PatternTuple: symbol;
    PatternVariable: symbol;
    PatternWildcard: symbol;
    StmtBranch: symbol;
    StmtConditional: symbol;
}

Type declaration

  • ConstructorDeclaration: symbol
  • ExprBranch: symbol
  • ExprConditional: symbol
  • FieldBinding: symbol
  • PatternNumber: symbol
  • PatternStructure: symbol
  • PatternTimeout: symbol
  • PatternTuple: symbol
  • PatternVariable: symbol
  • PatternWildcard: symbol
  • StmtBranch: symbol
  • StmtConditional: symbol
Statements: {
    AssignTuple: symbol;
    AssignVariable: symbol;
    Block: symbol;
    Foreach: symbol;
    If: symbol;
    ProcedureCall: symbol;
    Repeat: symbol;
    Return: symbol;
    Switch: symbol;
    While: symbol;
}

Type declaration

  • AssignTuple: symbol
  • AssignVariable: symbol
  • Block: symbol
  • Foreach: symbol
  • If: symbol
  • ProcedureCall: symbol
  • Repeat: symbol
  • Return: symbol
  • Switch: symbol
  • While: symbol