# All files / src Syntax.js

100% Statements 61/61
100% Branches 0/0
100% Functions 0/0
100% Lines 61/61

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165

    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x
    32x

    32x
    32x
    32x
    32x
    32x
    32x

    32x

    32x

     // @flow

    // Main Program
    export const Program = "Program";
    export const Keyword = "Keyword";
    export const Export = "Export";
    export const Import = "Import";
    export const Statement = "Statement";
    export const IfThenElse = "IfThenElse";
    export const Select = "Select";
    export const Else = "Else";
    export const UnaryExpression = "UnaryExpression";
    export const BinaryExpression = "BinaryExpression";
    export const TernaryExpression = "TernaryExpression";
    export const NumberLiteral = "NumberLiteral";
    export const StringLiteral = "StringLiteral";
    export const Punctuator = "Punctuator";
    export const Identifier = "Identifier";
    export const ArraySubscript = "ArraySubscript";
    export const Constant = "Constant";
    export const Type = "Type";
    export const GenericType = "GenericType";
    export const UserType = "UserType";
    export const FunctionType = "FunctionType";
    export const Declaration = "Declaration";
    export const ImmutableDeclaration = "ImmutableDeclaration";
    export const FunctionDeclaration = "FunctionDeclaration";
    export const ArrayDeclaration = "ArrayDeclaration";
    export const IndirectFunctionCall = "IndirectFunctionCall";
    export const FunctionCall = "FunctionCall";
    export const Loop = "Loop";
    export const MemoryAssignment = "MemoryAssignment";
    export const Assignment = "Assignment";
    export const Param = "Param";
    export const Typedef = "Typedef";
    export const Struct = "Struct";
    export const ReturnStatement = "ReturnStatement";
    export const Sequence = "Sequence";
    export const ObjectLiteral = "ObjectLiteral";
    export const Pair = "Pair";
    export const TypeCast = "TypeCast";
    export const Break = "Break";
    export const Comment = "Comment";
    export const Sizeof = "Sizeof";
    export const Spread = "Spread";
    export const Closure = "Closure";
    export const Noop = "Noop";
    export const ClosureType = "ClosureType";
    export const Block = "Block";
    export const ObjectField = "ObjectField";
    export const FunctionIndex = "FunctionIndex";
    export const FunctionIdentifier = "FunctionIdentifier";
    export const FunctionPointer = "FunctionPointer";
    export const FunctionArguments = "FunctionArguments";
    export const FunctionResult = "FunctionResult";
    export const FunctionLocals = "FunctionLocals";

    export const i32 = "i32";
    export const f32 = "f32";
    export const i64 = "i64";
    export const f64 = "f64";
    export const Memory = "Memory";
    export const Table = "Table";

    export const builtinTypes = {
      i32,
      f32,
      i64,
      f64,
      Memory,
      Table,
    };

    export const statements = {
      // Main Program
      Program,

      // Syntax Nodes
      Export,
      Import,
      IfThenElse,
      Else,
      Declaration,
      ImmutableDeclaration,
      FunctionDeclaration,
      ArrayDeclaration,
      Loop,
      MemoryAssignment,
      Assignment,
      Typedef,
      Struct,
      ReturnStatement,
      Sequence,
      ObjectLiteral,
      Pair,
      Break,
      Comment,
      Sizeof,
      Spread,
      Noop,
      Block,
    };

    export default {
      // Main Program
      Program,

      // Syntax Nodes
      Keyword,
      Export,
      Import,
      Statement,
      IfThenElse,
      Select,
      Else,
      UnaryExpression,
      BinaryExpression,
      TernaryExpression,
      NumberLiteral,
      StringLiteral,
      Punctuator,
      Identifier,
      ArraySubscript,
      Constant,
      Type,
      GenericType,
      UserType,
      FunctionType,
      Declaration,
      ImmutableDeclaration,
      FunctionDeclaration,
      ArrayDeclaration,
      IndirectFunctionCall,
      FunctionCall,
      Loop,
      MemoryAssignment,
      Assignment,
      Param,
      Typedef,
      Struct,
      ReturnStatement,
      Sequence,
      ObjectLiteral,
      Pair,
      TypeCast,
      Break,
      Comment,
      Sizeof,
      Spread,
      Closure,

      Noop,

      // Semantic Nodes
      ClosureType,
      Block,
      ObjectField,
      FunctionIndex,
      FunctionIdentifier,
      FunctionPointer,
      FunctionArguments,
      FunctionResult,
      FunctionLocals,
    };