xbintsc 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/src/ast/common.d.ts +33 -0
- package/dist/src/ast/common.js +7 -0
- package/dist/src/ast/common.js.map +1 -0
- package/dist/src/ast/declarations.d.ts +110 -0
- package/dist/src/ast/declarations.js +5 -0
- package/dist/src/ast/declarations.js.map +1 -0
- package/dist/src/ast/expressions.d.ts +219 -0
- package/dist/src/ast/expressions.js +6 -0
- package/dist/src/ast/expressions.js.map +1 -0
- package/dist/src/ast/kinds.d.ts +160 -0
- package/dist/src/ast/kinds.js +171 -0
- package/dist/src/ast/kinds.js.map +1 -0
- package/dist/src/ast/modules.d.ts +61 -0
- package/dist/src/ast/modules.js +5 -0
- package/dist/src/ast/modules.js.map +1 -0
- package/dist/src/ast/nodes.d.ts +11 -839
- package/dist/src/ast/nodes.js +11 -237
- package/dist/src/ast/nodes.js.map +1 -1
- package/dist/src/ast/operators.d.ts +71 -0
- package/dist/src/ast/operators.js +77 -0
- package/dist/src/ast/operators.js.map +1 -0
- package/dist/src/ast/statements.d.ts +120 -0
- package/dist/src/ast/statements.js +5 -0
- package/dist/src/ast/statements.js.map +1 -0
- package/dist/src/ast/types.d.ts +123 -0
- package/dist/src/ast/types.js +6 -0
- package/dist/src/ast/types.js.map +1 -0
- package/dist/src/codegen/generator/calls.d.ts +22 -0
- package/dist/src/codegen/generator/calls.js +301 -0
- package/dist/src/codegen/generator/calls.js.map +1 -0
- package/dist/src/codegen/generator/context.d.ts +45 -0
- package/dist/src/codegen/generator/context.js +128 -0
- package/dist/src/codegen/generator/context.js.map +1 -0
- package/dist/src/codegen/generator/expressions.d.ts +22 -0
- package/dist/src/codegen/generator/expressions.js +383 -0
- package/dist/src/codegen/generator/expressions.js.map +1 -0
- package/dist/src/codegen/generator/generator.d.ts +22 -0
- package/dist/src/codegen/generator/generator.js +21 -0
- package/dist/src/codegen/generator/generator.js.map +1 -0
- package/dist/src/codegen/generator/module.d.ts +15 -0
- package/dist/src/codegen/generator/module.js +114 -0
- package/dist/src/codegen/generator/module.js.map +1 -0
- package/dist/src/codegen/generator/state.d.ts +40 -0
- package/dist/src/codegen/generator/state.js +84 -0
- package/dist/src/codegen/generator/state.js.map +1 -0
- package/dist/src/codegen/generator/statements.d.ts +22 -0
- package/dist/src/codegen/generator/statements.js +425 -0
- package/dist/src/codegen/generator/statements.js.map +1 -0
- package/dist/src/codegen/generator/tables.d.ts +19 -0
- package/dist/src/codegen/generator/tables.js +153 -0
- package/dist/src/codegen/generator/tables.js.map +1 -0
- package/dist/src/codegen/llvm.d.ts +4 -13
- package/dist/src/codegen/llvm.js +4 -1537
- package/dist/src/codegen/llvm.js.map +1 -1
- package/dist/src/driver/compiler.js +13 -4
- package/dist/src/driver/compiler.js.map +1 -1
- package/dist/src/lexer/char.d.ts +78 -0
- package/dist/src/lexer/char.js +106 -0
- package/dist/src/lexer/char.js.map +1 -0
- package/dist/src/lexer/scanner.js +1 -98
- package/dist/src/lexer/scanner.js.map +1 -1
- package/dist/src/parser/context.d.ts +58 -0
- package/dist/src/parser/context.js +174 -0
- package/dist/src/parser/context.js.map +1 -0
- package/dist/src/parser/declarations.d.ts +26 -0
- package/dist/src/parser/declarations.js +461 -0
- package/dist/src/parser/declarations.js.map +1 -0
- package/dist/src/parser/expressions.d.ts +27 -0
- package/dist/src/parser/expressions.js +437 -0
- package/dist/src/parser/expressions.js.map +1 -0
- package/dist/src/parser/helpers.d.ts +7 -0
- package/dist/src/parser/helpers.js +36 -0
- package/dist/src/parser/helpers.js.map +1 -0
- package/dist/src/parser/literals.d.ts +16 -0
- package/dist/src/parser/literals.js +193 -0
- package/dist/src/parser/literals.js.map +1 -0
- package/dist/src/parser/modules.d.ts +12 -0
- package/dist/src/parser/modules.js +175 -0
- package/dist/src/parser/modules.js.map +1 -0
- package/dist/src/parser/operators.d.ts +12 -0
- package/dist/src/parser/operators.js +172 -0
- package/dist/src/parser/operators.js.map +1 -0
- package/dist/src/parser/parser.d.ts +17 -122
- package/dist/src/parser/parser.js +18 -2311
- package/dist/src/parser/parser.js.map +1 -1
- package/dist/src/parser/speculation.d.ts +6 -0
- package/dist/src/parser/speculation.js +10 -0
- package/dist/src/parser/speculation.js.map +1 -0
- package/dist/src/parser/statements.d.ts +28 -0
- package/dist/src/parser/statements.js +402 -0
- package/dist/src/parser/statements.js.map +1 -0
- package/dist/src/parser/types.d.ts +21 -0
- package/dist/src/parser/types.js +338 -0
- package/dist/src/parser/types.js.map +1 -0
- package/package.json +1 -1
- package/runtime/rt_internal.h +106 -0
- package/runtime/xt_alloc.c +38 -0
- package/runtime/xt_builtins.c +192 -0
- package/runtime/xt_containers.c +225 -0
- package/runtime/xt_io.c +133 -0
- package/runtime/xt_stdlib.c +502 -0
- package/runtime/xt_values.c +291 -0
- package/scripts/build-runtime.mjs +8 -1
- package/src/ast/common.ts +210 -0
- package/src/ast/declarations.ts +130 -0
- package/src/ast/expressions.ts +275 -0
- package/src/ast/kinds.ts +176 -0
- package/src/ast/modules.ts +73 -0
- package/src/ast/nodes.ts +11 -1101
- package/src/ast/operators.ts +76 -0
- package/src/ast/statements.ts +148 -0
- package/src/ast/types.ts +173 -0
- package/src/codegen/generator/calls.ts +355 -0
- package/src/codegen/generator/context.ts +156 -0
- package/src/codegen/generator/expressions.ts +431 -0
- package/src/codegen/generator/generator.ts +35 -0
- package/src/codegen/generator/module.ts +139 -0
- package/src/codegen/generator/state.ts +126 -0
- package/src/codegen/generator/statements.ts +474 -0
- package/src/codegen/generator/tables.ts +171 -0
- package/src/codegen/llvm.ts +4 -1720
- package/src/driver/compiler.ts +17 -5
- package/src/lexer/char.ts +116 -0
- package/src/lexer/scanner.ts +9 -109
- package/src/parser/context.ts +196 -0
- package/src/parser/declarations.ts +502 -0
- package/src/parser/expressions.ts +465 -0
- package/src/parser/helpers.ts +42 -0
- package/src/parser/literals.ts +207 -0
- package/src/parser/modules.ts +194 -0
- package/src/parser/operators.ts +181 -0
- package/src/parser/parser.ts +35 -2373
- package/src/parser/speculation.ts +9 -0
- package/src/parser/statements.ts +457 -0
- package/src/parser/types.ts +365 -0
- package/runtime/xt_runtime.c +0 -1372
package/dist/src/ast/nodes.js
CHANGED
|
@@ -6,242 +6,16 @@
|
|
|
6
6
|
* and code generator can switch exhaustively over them. Every node carries a
|
|
7
7
|
* source range (`start`/`end` offsets) which the diagnostics layer maps back to
|
|
8
8
|
* line/column, and which the incremental cache uses to detect changes.
|
|
9
|
+
*
|
|
10
|
+
* This module is the public barrel for the AST; the actual node definitions are
|
|
11
|
+
* split by category into sibling files.
|
|
9
12
|
*/
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
SyntaxKind[SyntaxKind["ImportType"] = 303] = "ImportType";
|
|
19
|
-
// Trivia-ish
|
|
20
|
-
SyntaxKind[SyntaxKind["Identifier"] = 2] = "Identifier";
|
|
21
|
-
SyntaxKind[SyntaxKind["PrivateIdentifier"] = 3] = "PrivateIdentifier";
|
|
22
|
-
// Literals
|
|
23
|
-
SyntaxKind[SyntaxKind["NumericLiteral"] = 4] = "NumericLiteral";
|
|
24
|
-
SyntaxKind[SyntaxKind["BigIntLiteral"] = 5] = "BigIntLiteral";
|
|
25
|
-
SyntaxKind[SyntaxKind["StringLiteral"] = 6] = "StringLiteral";
|
|
26
|
-
SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 7] = "NoSubstitutionTemplateLiteral";
|
|
27
|
-
SyntaxKind[SyntaxKind["TemplateLiteral"] = 8] = "TemplateLiteral";
|
|
28
|
-
SyntaxKind[SyntaxKind["TemplateSpan"] = 9] = "TemplateSpan";
|
|
29
|
-
SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 10] = "RegularExpressionLiteral";
|
|
30
|
-
SyntaxKind[SyntaxKind["TrueKeyword"] = 11] = "TrueKeyword";
|
|
31
|
-
SyntaxKind[SyntaxKind["FalseKeyword"] = 12] = "FalseKeyword";
|
|
32
|
-
SyntaxKind[SyntaxKind["NullKeyword"] = 13] = "NullKeyword";
|
|
33
|
-
SyntaxKind[SyntaxKind["UndefinedKeyword"] = 14] = "UndefinedKeyword";
|
|
34
|
-
SyntaxKind[SyntaxKind["ThisKeyword"] = 15] = "ThisKeyword";
|
|
35
|
-
// Expressions
|
|
36
|
-
SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 20] = "ArrayLiteralExpression";
|
|
37
|
-
SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 21] = "ObjectLiteralExpression";
|
|
38
|
-
SyntaxKind[SyntaxKind["PropertyAssignment"] = 22] = "PropertyAssignment";
|
|
39
|
-
SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 23] = "ShorthandPropertyAssignment";
|
|
40
|
-
SyntaxKind[SyntaxKind["SpreadElement"] = 24] = "SpreadElement";
|
|
41
|
-
SyntaxKind[SyntaxKind["FunctionExpression"] = 25] = "FunctionExpression";
|
|
42
|
-
SyntaxKind[SyntaxKind["ArrowFunction"] = 26] = "ArrowFunction";
|
|
43
|
-
SyntaxKind[SyntaxKind["ClassExpression"] = 27] = "ClassExpression";
|
|
44
|
-
SyntaxKind[SyntaxKind["CallExpression"] = 28] = "CallExpression";
|
|
45
|
-
SyntaxKind[SyntaxKind["NewExpression"] = 29] = "NewExpression";
|
|
46
|
-
SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 30] = "PropertyAccessExpression";
|
|
47
|
-
SyntaxKind[SyntaxKind["ElementAccessExpression"] = 31] = "ElementAccessExpression";
|
|
48
|
-
SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 32] = "ParenthesizedExpression";
|
|
49
|
-
SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 33] = "PrefixUnaryExpression";
|
|
50
|
-
SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 34] = "PostfixUnaryExpression";
|
|
51
|
-
SyntaxKind[SyntaxKind["BinaryExpression"] = 35] = "BinaryExpression";
|
|
52
|
-
SyntaxKind[SyntaxKind["ConditionalExpression"] = 36] = "ConditionalExpression";
|
|
53
|
-
SyntaxKind[SyntaxKind["AsExpression"] = 37] = "AsExpression";
|
|
54
|
-
SyntaxKind[SyntaxKind["SatisfiesExpression"] = 38] = "SatisfiesExpression";
|
|
55
|
-
SyntaxKind[SyntaxKind["NonNullExpression"] = 39] = "NonNullExpression";
|
|
56
|
-
SyntaxKind[SyntaxKind["TypeOfExpression"] = 40] = "TypeOfExpression";
|
|
57
|
-
SyntaxKind[SyntaxKind["VoidExpression"] = 41] = "VoidExpression";
|
|
58
|
-
SyntaxKind[SyntaxKind["DeleteExpression"] = 42] = "DeleteExpression";
|
|
59
|
-
SyntaxKind[SyntaxKind["AwaitExpression"] = 43] = "AwaitExpression";
|
|
60
|
-
SyntaxKind[SyntaxKind["YieldExpression"] = 44] = "YieldExpression";
|
|
61
|
-
SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 45] = "TaggedTemplateExpression";
|
|
62
|
-
// Statements
|
|
63
|
-
SyntaxKind[SyntaxKind["ExpressionStatement"] = 60] = "ExpressionStatement";
|
|
64
|
-
SyntaxKind[SyntaxKind["Block"] = 61] = "Block";
|
|
65
|
-
SyntaxKind[SyntaxKind["EmptyStatement"] = 62] = "EmptyStatement";
|
|
66
|
-
SyntaxKind[SyntaxKind["DebuggerStatement"] = 63] = "DebuggerStatement";
|
|
67
|
-
SyntaxKind[SyntaxKind["VariableStatement"] = 64] = "VariableStatement";
|
|
68
|
-
SyntaxKind[SyntaxKind["VariableDeclarationList"] = 65] = "VariableDeclarationList";
|
|
69
|
-
SyntaxKind[SyntaxKind["VariableDeclaration"] = 66] = "VariableDeclaration";
|
|
70
|
-
SyntaxKind[SyntaxKind["IfStatement"] = 67] = "IfStatement";
|
|
71
|
-
SyntaxKind[SyntaxKind["WhileStatement"] = 68] = "WhileStatement";
|
|
72
|
-
SyntaxKind[SyntaxKind["DoStatement"] = 69] = "DoStatement";
|
|
73
|
-
SyntaxKind[SyntaxKind["ForStatement"] = 70] = "ForStatement";
|
|
74
|
-
SyntaxKind[SyntaxKind["ForOfStatement"] = 71] = "ForOfStatement";
|
|
75
|
-
SyntaxKind[SyntaxKind["ForInStatement"] = 72] = "ForInStatement";
|
|
76
|
-
SyntaxKind[SyntaxKind["ReturnStatement"] = 73] = "ReturnStatement";
|
|
77
|
-
SyntaxKind[SyntaxKind["BreakStatement"] = 74] = "BreakStatement";
|
|
78
|
-
SyntaxKind[SyntaxKind["ContinueStatement"] = 75] = "ContinueStatement";
|
|
79
|
-
SyntaxKind[SyntaxKind["ThrowStatement"] = 76] = "ThrowStatement";
|
|
80
|
-
SyntaxKind[SyntaxKind["TryStatement"] = 77] = "TryStatement";
|
|
81
|
-
SyntaxKind[SyntaxKind["CatchClause"] = 78] = "CatchClause";
|
|
82
|
-
SyntaxKind[SyntaxKind["SwitchStatement"] = 79] = "SwitchStatement";
|
|
83
|
-
SyntaxKind[SyntaxKind["CaseClause"] = 80] = "CaseClause";
|
|
84
|
-
SyntaxKind[SyntaxKind["DefaultClause"] = 81] = "DefaultClause";
|
|
85
|
-
SyntaxKind[SyntaxKind["LabeledStatement"] = 82] = "LabeledStatement";
|
|
86
|
-
// Declarations
|
|
87
|
-
SyntaxKind[SyntaxKind["FunctionDeclaration"] = 100] = "FunctionDeclaration";
|
|
88
|
-
SyntaxKind[SyntaxKind["ClassDeclaration"] = 101] = "ClassDeclaration";
|
|
89
|
-
SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 102] = "InterfaceDeclaration";
|
|
90
|
-
SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 103] = "TypeAliasDeclaration";
|
|
91
|
-
SyntaxKind[SyntaxKind["EnumDeclaration"] = 104] = "EnumDeclaration";
|
|
92
|
-
SyntaxKind[SyntaxKind["EnumMember"] = 105] = "EnumMember";
|
|
93
|
-
SyntaxKind[SyntaxKind["ModuleDeclaration"] = 106] = "ModuleDeclaration";
|
|
94
|
-
SyntaxKind[SyntaxKind["Parameter"] = 107] = "Parameter";
|
|
95
|
-
SyntaxKind[SyntaxKind["TypeParameterDeclaration"] = 108] = "TypeParameterDeclaration";
|
|
96
|
-
SyntaxKind[SyntaxKind["PropertyDeclaration"] = 109] = "PropertyDeclaration";
|
|
97
|
-
SyntaxKind[SyntaxKind["MethodDeclaration"] = 110] = "MethodDeclaration";
|
|
98
|
-
SyntaxKind[SyntaxKind["ConstructorDeclaration"] = 111] = "ConstructorDeclaration";
|
|
99
|
-
SyntaxKind[SyntaxKind["HeritageClause"] = 112] = "HeritageClause";
|
|
100
|
-
SyntaxKind[SyntaxKind["ImportDeclaration"] = 113] = "ImportDeclaration";
|
|
101
|
-
SyntaxKind[SyntaxKind["ImportClause"] = 114] = "ImportClause";
|
|
102
|
-
SyntaxKind[SyntaxKind["NamedImports"] = 115] = "NamedImports";
|
|
103
|
-
SyntaxKind[SyntaxKind["ImportSpecifier"] = 116] = "ImportSpecifier";
|
|
104
|
-
SyntaxKind[SyntaxKind["NamespaceImport"] = 117] = "NamespaceImport";
|
|
105
|
-
SyntaxKind[SyntaxKind["ExportDeclaration"] = 118] = "ExportDeclaration";
|
|
106
|
-
SyntaxKind[SyntaxKind["ExportAssignment"] = 119] = "ExportAssignment";
|
|
107
|
-
SyntaxKind[SyntaxKind["NamedExports"] = 120] = "NamedExports";
|
|
108
|
-
SyntaxKind[SyntaxKind["ExportSpecifier"] = 121] = "ExportSpecifier";
|
|
109
|
-
// Types
|
|
110
|
-
SyntaxKind[SyntaxKind["TypeReference"] = 200] = "TypeReference";
|
|
111
|
-
SyntaxKind[SyntaxKind["TypePredicate"] = 201] = "TypePredicate";
|
|
112
|
-
SyntaxKind[SyntaxKind["AnyKeywordType"] = 202] = "AnyKeywordType";
|
|
113
|
-
SyntaxKind[SyntaxKind["UnknownKeywordType"] = 203] = "UnknownKeywordType";
|
|
114
|
-
SyntaxKind[SyntaxKind["NumberKeywordType"] = 204] = "NumberKeywordType";
|
|
115
|
-
SyntaxKind[SyntaxKind["BigIntKeywordType"] = 205] = "BigIntKeywordType";
|
|
116
|
-
SyntaxKind[SyntaxKind["StringKeywordType"] = 206] = "StringKeywordType";
|
|
117
|
-
SyntaxKind[SyntaxKind["BooleanKeywordType"] = 207] = "BooleanKeywordType";
|
|
118
|
-
SyntaxKind[SyntaxKind["SymbolKeywordType"] = 208] = "SymbolKeywordType";
|
|
119
|
-
SyntaxKind[SyntaxKind["VoidKeywordType"] = 209] = "VoidKeywordType";
|
|
120
|
-
SyntaxKind[SyntaxKind["UndefinedKeywordType"] = 210] = "UndefinedKeywordType";
|
|
121
|
-
SyntaxKind[SyntaxKind["NullKeywordType"] = 211] = "NullKeywordType";
|
|
122
|
-
SyntaxKind[SyntaxKind["NeverKeywordType"] = 212] = "NeverKeywordType";
|
|
123
|
-
SyntaxKind[SyntaxKind["ObjectKeywordType"] = 213] = "ObjectKeywordType";
|
|
124
|
-
SyntaxKind[SyntaxKind["ThisKeywordType"] = 214] = "ThisKeywordType";
|
|
125
|
-
SyntaxKind[SyntaxKind["LiteralType"] = 215] = "LiteralType";
|
|
126
|
-
SyntaxKind[SyntaxKind["ArrayType"] = 216] = "ArrayType";
|
|
127
|
-
SyntaxKind[SyntaxKind["TupleType"] = 217] = "TupleType";
|
|
128
|
-
SyntaxKind[SyntaxKind["UnionType"] = 218] = "UnionType";
|
|
129
|
-
SyntaxKind[SyntaxKind["IntersectionType"] = 219] = "IntersectionType";
|
|
130
|
-
SyntaxKind[SyntaxKind["FunctionType"] = 220] = "FunctionType";
|
|
131
|
-
SyntaxKind[SyntaxKind["TypeLiteral"] = 221] = "TypeLiteral";
|
|
132
|
-
SyntaxKind[SyntaxKind["PropertySignature"] = 222] = "PropertySignature";
|
|
133
|
-
SyntaxKind[SyntaxKind["MethodSignature"] = 223] = "MethodSignature";
|
|
134
|
-
SyntaxKind[SyntaxKind["IndexSignature"] = 224] = "IndexSignature";
|
|
135
|
-
SyntaxKind[SyntaxKind["ParenthesizedType"] = 225] = "ParenthesizedType";
|
|
136
|
-
SyntaxKind[SyntaxKind["TypeQuery"] = 226] = "TypeQuery";
|
|
137
|
-
SyntaxKind[SyntaxKind["IndexedAccessType"] = 227] = "IndexedAccessType";
|
|
138
|
-
SyntaxKind[SyntaxKind["TypeOperator"] = 228] = "TypeOperator";
|
|
139
|
-
SyntaxKind[SyntaxKind["MappedType"] = 229] = "MappedType";
|
|
140
|
-
SyntaxKind[SyntaxKind["ConditionalType"] = 230] = "ConditionalType";
|
|
141
|
-
SyntaxKind[SyntaxKind["InferType"] = 231] = "InferType";
|
|
142
|
-
SyntaxKind[SyntaxKind["OptionalType"] = 232] = "OptionalType";
|
|
143
|
-
SyntaxKind[SyntaxKind["RestType"] = 233] = "RestType";
|
|
144
|
-
})(SyntaxKind || (SyntaxKind = {}));
|
|
145
|
-
export var NodeFlags;
|
|
146
|
-
(function (NodeFlags) {
|
|
147
|
-
NodeFlags[NodeFlags["None"] = 0] = "None";
|
|
148
|
-
NodeFlags[NodeFlags["Let"] = 1] = "Let";
|
|
149
|
-
NodeFlags[NodeFlags["Const"] = 2] = "Const";
|
|
150
|
-
NodeFlags[NodeFlags["Var"] = 4] = "Var";
|
|
151
|
-
NodeFlags[NodeFlags["Exported"] = 8] = "Exported";
|
|
152
|
-
NodeFlags[NodeFlags["Default"] = 16] = "Default";
|
|
153
|
-
NodeFlags[NodeFlags["Declare"] = 32] = "Declare";
|
|
154
|
-
NodeFlags[NodeFlags["Async"] = 64] = "Async";
|
|
155
|
-
NodeFlags[NodeFlags["Generator"] = 128] = "Generator";
|
|
156
|
-
NodeFlags[NodeFlags["Ambient"] = 256] = "Ambient";
|
|
157
|
-
NodeFlags[NodeFlags["Readonly"] = 512] = "Readonly";
|
|
158
|
-
NodeFlags[NodeFlags["Abstract"] = 1024] = "Abstract";
|
|
159
|
-
NodeFlags[NodeFlags["Optional"] = 2048] = "Optional";
|
|
160
|
-
})(NodeFlags || (NodeFlags = {}));
|
|
161
|
-
export var ModifierKind;
|
|
162
|
-
(function (ModifierKind) {
|
|
163
|
-
ModifierKind["Export"] = "export";
|
|
164
|
-
ModifierKind["Default"] = "default";
|
|
165
|
-
ModifierKind["Declare"] = "declare";
|
|
166
|
-
ModifierKind["Abstract"] = "abstract";
|
|
167
|
-
ModifierKind["Public"] = "public";
|
|
168
|
-
ModifierKind["Private"] = "private";
|
|
169
|
-
ModifierKind["Protected"] = "protected";
|
|
170
|
-
ModifierKind["Static"] = "static";
|
|
171
|
-
ModifierKind["Readonly"] = "readonly";
|
|
172
|
-
ModifierKind["Async"] = "async";
|
|
173
|
-
})(ModifierKind || (ModifierKind = {}));
|
|
174
|
-
export var PrefixUnaryOperator;
|
|
175
|
-
(function (PrefixUnaryOperator) {
|
|
176
|
-
PrefixUnaryOperator["Plus"] = "+";
|
|
177
|
-
PrefixUnaryOperator["Minus"] = "-";
|
|
178
|
-
PrefixUnaryOperator["Tilde"] = "~";
|
|
179
|
-
PrefixUnaryOperator["Exclamation"] = "!";
|
|
180
|
-
PrefixUnaryOperator["TypeOf"] = "typeof";
|
|
181
|
-
PrefixUnaryOperator["Void"] = "void";
|
|
182
|
-
PrefixUnaryOperator["Delete"] = "delete";
|
|
183
|
-
PrefixUnaryOperator["PlusPlus"] = "++";
|
|
184
|
-
PrefixUnaryOperator["MinusMinus"] = "--";
|
|
185
|
-
PrefixUnaryOperator["Await"] = "await";
|
|
186
|
-
})(PrefixUnaryOperator || (PrefixUnaryOperator = {}));
|
|
187
|
-
export var PostfixUnaryOperator;
|
|
188
|
-
(function (PostfixUnaryOperator) {
|
|
189
|
-
PostfixUnaryOperator["PlusPlus"] = "++";
|
|
190
|
-
PostfixUnaryOperator["MinusMinus"] = "--";
|
|
191
|
-
})(PostfixUnaryOperator || (PostfixUnaryOperator = {}));
|
|
192
|
-
export var BinaryOperator;
|
|
193
|
-
(function (BinaryOperator) {
|
|
194
|
-
BinaryOperator["Add"] = "+";
|
|
195
|
-
BinaryOperator["Subtract"] = "-";
|
|
196
|
-
BinaryOperator["Multiply"] = "*";
|
|
197
|
-
BinaryOperator["Divide"] = "/";
|
|
198
|
-
BinaryOperator["Remainder"] = "%";
|
|
199
|
-
BinaryOperator["Exponent"] = "**";
|
|
200
|
-
BinaryOperator["LessThan"] = "<";
|
|
201
|
-
BinaryOperator["LessThanEquals"] = "<=";
|
|
202
|
-
BinaryOperator["GreaterThan"] = ">";
|
|
203
|
-
BinaryOperator["GreaterThanEquals"] = ">=";
|
|
204
|
-
BinaryOperator["EqualsEquals"] = "==";
|
|
205
|
-
BinaryOperator["ExclamationEquals"] = "!=";
|
|
206
|
-
BinaryOperator["EqualsEqualsEquals"] = "===";
|
|
207
|
-
BinaryOperator["ExclamationEqualsEquals"] = "!==";
|
|
208
|
-
BinaryOperator["AmpersandAmpersand"] = "&&";
|
|
209
|
-
BinaryOperator["BarBar"] = "||";
|
|
210
|
-
BinaryOperator["QuestionQuestion"] = "??";
|
|
211
|
-
BinaryOperator["Ampersand"] = "&";
|
|
212
|
-
BinaryOperator["Bar"] = "|";
|
|
213
|
-
BinaryOperator["Caret"] = "^";
|
|
214
|
-
BinaryOperator["LessThanLessThan"] = "<<";
|
|
215
|
-
BinaryOperator["GreaterThanGreaterThan"] = ">>";
|
|
216
|
-
BinaryOperator["GreaterThanGreaterThanGreaterThan"] = ">>>";
|
|
217
|
-
BinaryOperator["Comma"] = ",";
|
|
218
|
-
BinaryOperator["In"] = "in";
|
|
219
|
-
BinaryOperator["InstanceOf"] = "instanceof";
|
|
220
|
-
})(BinaryOperator || (BinaryOperator = {}));
|
|
221
|
-
/** Assignment operators, including the compound forms. */
|
|
222
|
-
export var AssignmentOperator;
|
|
223
|
-
(function (AssignmentOperator) {
|
|
224
|
-
AssignmentOperator["Assign"] = "=";
|
|
225
|
-
AssignmentOperator["AddAssign"] = "+=";
|
|
226
|
-
AssignmentOperator["SubtractAssign"] = "-=";
|
|
227
|
-
AssignmentOperator["MultiplyAssign"] = "*=";
|
|
228
|
-
AssignmentOperator["DivideAssign"] = "/=";
|
|
229
|
-
AssignmentOperator["RemainderAssign"] = "%=";
|
|
230
|
-
AssignmentOperator["ExponentAssign"] = "**=";
|
|
231
|
-
AssignmentOperator["LessThanLessThanAssign"] = "<<=";
|
|
232
|
-
AssignmentOperator["GreaterThanGreaterThanAssign"] = ">>=";
|
|
233
|
-
AssignmentOperator["GreaterThanGreaterThanGreaterThanAssign"] = ">>>=";
|
|
234
|
-
AssignmentOperator["AmpersandAssign"] = "&=";
|
|
235
|
-
AssignmentOperator["BarAssign"] = "|=";
|
|
236
|
-
AssignmentOperator["CaretAssign"] = "^=";
|
|
237
|
-
AssignmentOperator["AmpersandAmpersandAssign"] = "&&=";
|
|
238
|
-
AssignmentOperator["BarBarAssign"] = "||=";
|
|
239
|
-
AssignmentOperator["QuestionQuestionAssign"] = "??=";
|
|
240
|
-
})(AssignmentOperator || (AssignmentOperator = {}));
|
|
241
|
-
export var TypeOperator;
|
|
242
|
-
(function (TypeOperator) {
|
|
243
|
-
TypeOperator["KeyOf"] = "keyof";
|
|
244
|
-
TypeOperator["Unique"] = "unique";
|
|
245
|
-
TypeOperator["Readonly"] = "readonly";
|
|
246
|
-
})(TypeOperator || (TypeOperator = {}));
|
|
13
|
+
export * from "./kinds.js";
|
|
14
|
+
export * from "./operators.js";
|
|
15
|
+
export * from "./common.js";
|
|
16
|
+
export * from "./expressions.js";
|
|
17
|
+
export * from "./statements.js";
|
|
18
|
+
export * from "./declarations.js";
|
|
19
|
+
export * from "./modules.js";
|
|
20
|
+
export * from "./types.js";
|
|
247
21
|
//# sourceMappingURL=nodes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../src/ast/nodes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../src/ast/nodes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operator taxonomies shared by the parser and code generator.
|
|
3
|
+
*/
|
|
4
|
+
export declare const enum PrefixUnaryOperator {
|
|
5
|
+
Plus = "+",
|
|
6
|
+
Minus = "-",
|
|
7
|
+
Tilde = "~",
|
|
8
|
+
Exclamation = "!",
|
|
9
|
+
TypeOf = "typeof",
|
|
10
|
+
Void = "void",
|
|
11
|
+
Delete = "delete",
|
|
12
|
+
PlusPlus = "++",
|
|
13
|
+
MinusMinus = "--",
|
|
14
|
+
Await = "await"
|
|
15
|
+
}
|
|
16
|
+
export declare const enum PostfixUnaryOperator {
|
|
17
|
+
PlusPlus = "++",
|
|
18
|
+
MinusMinus = "--"
|
|
19
|
+
}
|
|
20
|
+
export declare const enum BinaryOperator {
|
|
21
|
+
Add = "+",
|
|
22
|
+
Subtract = "-",
|
|
23
|
+
Multiply = "*",
|
|
24
|
+
Divide = "/",
|
|
25
|
+
Remainder = "%",
|
|
26
|
+
Exponent = "**",
|
|
27
|
+
LessThan = "<",
|
|
28
|
+
LessThanEquals = "<=",
|
|
29
|
+
GreaterThan = ">",
|
|
30
|
+
GreaterThanEquals = ">=",
|
|
31
|
+
EqualsEquals = "==",
|
|
32
|
+
ExclamationEquals = "!=",
|
|
33
|
+
EqualsEqualsEquals = "===",
|
|
34
|
+
ExclamationEqualsEquals = "!==",
|
|
35
|
+
AmpersandAmpersand = "&&",
|
|
36
|
+
BarBar = "||",
|
|
37
|
+
QuestionQuestion = "??",
|
|
38
|
+
Ampersand = "&",
|
|
39
|
+
Bar = "|",
|
|
40
|
+
Caret = "^",
|
|
41
|
+
LessThanLessThan = "<<",
|
|
42
|
+
GreaterThanGreaterThan = ">>",
|
|
43
|
+
GreaterThanGreaterThanGreaterThan = ">>>",
|
|
44
|
+
Comma = ",",
|
|
45
|
+
In = "in",
|
|
46
|
+
InstanceOf = "instanceof"
|
|
47
|
+
}
|
|
48
|
+
/** Assignment operators, including the compound forms. */
|
|
49
|
+
export declare const enum AssignmentOperator {
|
|
50
|
+
Assign = "=",
|
|
51
|
+
AddAssign = "+=",
|
|
52
|
+
SubtractAssign = "-=",
|
|
53
|
+
MultiplyAssign = "*=",
|
|
54
|
+
DivideAssign = "/=",
|
|
55
|
+
RemainderAssign = "%=",
|
|
56
|
+
ExponentAssign = "**=",
|
|
57
|
+
LessThanLessThanAssign = "<<=",
|
|
58
|
+
GreaterThanGreaterThanAssign = ">>=",
|
|
59
|
+
GreaterThanGreaterThanGreaterThanAssign = ">>>=",
|
|
60
|
+
AmpersandAssign = "&=",
|
|
61
|
+
BarAssign = "|=",
|
|
62
|
+
CaretAssign = "^=",
|
|
63
|
+
AmpersandAmpersandAssign = "&&=",
|
|
64
|
+
BarBarAssign = "||=",
|
|
65
|
+
QuestionQuestionAssign = "??="
|
|
66
|
+
}
|
|
67
|
+
export declare const enum TypeOperator {
|
|
68
|
+
KeyOf = "keyof",
|
|
69
|
+
Unique = "unique",
|
|
70
|
+
Readonly = "readonly"
|
|
71
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operator taxonomies shared by the parser and code generator.
|
|
3
|
+
*/
|
|
4
|
+
export var PrefixUnaryOperator;
|
|
5
|
+
(function (PrefixUnaryOperator) {
|
|
6
|
+
PrefixUnaryOperator["Plus"] = "+";
|
|
7
|
+
PrefixUnaryOperator["Minus"] = "-";
|
|
8
|
+
PrefixUnaryOperator["Tilde"] = "~";
|
|
9
|
+
PrefixUnaryOperator["Exclamation"] = "!";
|
|
10
|
+
PrefixUnaryOperator["TypeOf"] = "typeof";
|
|
11
|
+
PrefixUnaryOperator["Void"] = "void";
|
|
12
|
+
PrefixUnaryOperator["Delete"] = "delete";
|
|
13
|
+
PrefixUnaryOperator["PlusPlus"] = "++";
|
|
14
|
+
PrefixUnaryOperator["MinusMinus"] = "--";
|
|
15
|
+
PrefixUnaryOperator["Await"] = "await";
|
|
16
|
+
})(PrefixUnaryOperator || (PrefixUnaryOperator = {}));
|
|
17
|
+
export var PostfixUnaryOperator;
|
|
18
|
+
(function (PostfixUnaryOperator) {
|
|
19
|
+
PostfixUnaryOperator["PlusPlus"] = "++";
|
|
20
|
+
PostfixUnaryOperator["MinusMinus"] = "--";
|
|
21
|
+
})(PostfixUnaryOperator || (PostfixUnaryOperator = {}));
|
|
22
|
+
export var BinaryOperator;
|
|
23
|
+
(function (BinaryOperator) {
|
|
24
|
+
BinaryOperator["Add"] = "+";
|
|
25
|
+
BinaryOperator["Subtract"] = "-";
|
|
26
|
+
BinaryOperator["Multiply"] = "*";
|
|
27
|
+
BinaryOperator["Divide"] = "/";
|
|
28
|
+
BinaryOperator["Remainder"] = "%";
|
|
29
|
+
BinaryOperator["Exponent"] = "**";
|
|
30
|
+
BinaryOperator["LessThan"] = "<";
|
|
31
|
+
BinaryOperator["LessThanEquals"] = "<=";
|
|
32
|
+
BinaryOperator["GreaterThan"] = ">";
|
|
33
|
+
BinaryOperator["GreaterThanEquals"] = ">=";
|
|
34
|
+
BinaryOperator["EqualsEquals"] = "==";
|
|
35
|
+
BinaryOperator["ExclamationEquals"] = "!=";
|
|
36
|
+
BinaryOperator["EqualsEqualsEquals"] = "===";
|
|
37
|
+
BinaryOperator["ExclamationEqualsEquals"] = "!==";
|
|
38
|
+
BinaryOperator["AmpersandAmpersand"] = "&&";
|
|
39
|
+
BinaryOperator["BarBar"] = "||";
|
|
40
|
+
BinaryOperator["QuestionQuestion"] = "??";
|
|
41
|
+
BinaryOperator["Ampersand"] = "&";
|
|
42
|
+
BinaryOperator["Bar"] = "|";
|
|
43
|
+
BinaryOperator["Caret"] = "^";
|
|
44
|
+
BinaryOperator["LessThanLessThan"] = "<<";
|
|
45
|
+
BinaryOperator["GreaterThanGreaterThan"] = ">>";
|
|
46
|
+
BinaryOperator["GreaterThanGreaterThanGreaterThan"] = ">>>";
|
|
47
|
+
BinaryOperator["Comma"] = ",";
|
|
48
|
+
BinaryOperator["In"] = "in";
|
|
49
|
+
BinaryOperator["InstanceOf"] = "instanceof";
|
|
50
|
+
})(BinaryOperator || (BinaryOperator = {}));
|
|
51
|
+
/** Assignment operators, including the compound forms. */
|
|
52
|
+
export var AssignmentOperator;
|
|
53
|
+
(function (AssignmentOperator) {
|
|
54
|
+
AssignmentOperator["Assign"] = "=";
|
|
55
|
+
AssignmentOperator["AddAssign"] = "+=";
|
|
56
|
+
AssignmentOperator["SubtractAssign"] = "-=";
|
|
57
|
+
AssignmentOperator["MultiplyAssign"] = "*=";
|
|
58
|
+
AssignmentOperator["DivideAssign"] = "/=";
|
|
59
|
+
AssignmentOperator["RemainderAssign"] = "%=";
|
|
60
|
+
AssignmentOperator["ExponentAssign"] = "**=";
|
|
61
|
+
AssignmentOperator["LessThanLessThanAssign"] = "<<=";
|
|
62
|
+
AssignmentOperator["GreaterThanGreaterThanAssign"] = ">>=";
|
|
63
|
+
AssignmentOperator["GreaterThanGreaterThanGreaterThanAssign"] = ">>>=";
|
|
64
|
+
AssignmentOperator["AmpersandAssign"] = "&=";
|
|
65
|
+
AssignmentOperator["BarAssign"] = "|=";
|
|
66
|
+
AssignmentOperator["CaretAssign"] = "^=";
|
|
67
|
+
AssignmentOperator["AmpersandAmpersandAssign"] = "&&=";
|
|
68
|
+
AssignmentOperator["BarBarAssign"] = "||=";
|
|
69
|
+
AssignmentOperator["QuestionQuestionAssign"] = "??=";
|
|
70
|
+
})(AssignmentOperator || (AssignmentOperator = {}));
|
|
71
|
+
export var TypeOperator;
|
|
72
|
+
(function (TypeOperator) {
|
|
73
|
+
TypeOperator["KeyOf"] = "keyof";
|
|
74
|
+
TypeOperator["Unique"] = "unique";
|
|
75
|
+
TypeOperator["Readonly"] = "readonly";
|
|
76
|
+
})(TypeOperator || (TypeOperator = {}));
|
|
77
|
+
//# sourceMappingURL=operators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operators.js","sourceRoot":"","sources":["../../../src/ast/operators.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAN,IAAkB,mBAWjB;AAXD,WAAkB,mBAAmB;IACnC,iCAAU,CAAA;IACV,kCAAW,CAAA;IACX,kCAAW,CAAA;IACX,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,oCAAa,CAAA;IACb,wCAAiB,CAAA;IACjB,sCAAe,CAAA;IACf,wCAAiB,CAAA;IACjB,sCAAe,CAAA;AACjB,CAAC,EAXiB,mBAAmB,KAAnB,mBAAmB,QAWpC;AAED,MAAM,CAAN,IAAkB,oBAGjB;AAHD,WAAkB,oBAAoB;IACpC,uCAAe,CAAA;IACf,yCAAiB,CAAA;AACnB,CAAC,EAHiB,oBAAoB,KAApB,oBAAoB,QAGrC;AAED,MAAM,CAAN,IAAkB,cA2BjB;AA3BD,WAAkB,cAAc;IAC9B,2BAAS,CAAA;IACT,gCAAc,CAAA;IACd,gCAAc,CAAA;IACd,8BAAY,CAAA;IACZ,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,gCAAc,CAAA;IACd,uCAAqB,CAAA;IACrB,mCAAiB,CAAA;IACjB,0CAAwB,CAAA;IACxB,qCAAmB,CAAA;IACnB,0CAAwB,CAAA;IACxB,4CAA0B,CAAA;IAC1B,iDAA+B,CAAA;IAC/B,2CAAyB,CAAA;IACzB,+BAAa,CAAA;IACb,yCAAuB,CAAA;IACvB,iCAAe,CAAA;IACf,2BAAS,CAAA;IACT,6BAAW,CAAA;IACX,yCAAuB,CAAA;IACvB,+CAA6B,CAAA;IAC7B,2DAAyC,CAAA;IACzC,6BAAW,CAAA;IACX,2BAAS,CAAA;IACT,2CAAyB,CAAA;AAC3B,CAAC,EA3BiB,cAAc,KAAd,cAAc,QA2B/B;AAED,0DAA0D;AAC1D,MAAM,CAAN,IAAkB,kBAiBjB;AAjBD,WAAkB,kBAAkB;IAClC,kCAAY,CAAA;IACZ,sCAAgB,CAAA;IAChB,2CAAqB,CAAA;IACrB,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;IACnB,4CAAsB,CAAA;IACtB,4CAAsB,CAAA;IACtB,oDAA8B,CAAA;IAC9B,0DAAoC,CAAA;IACpC,sEAAgD,CAAA;IAChD,4CAAsB,CAAA;IACtB,sCAAgB,CAAA;IAChB,wCAAkB,CAAA;IAClB,sDAAgC,CAAA;IAChC,0CAAoB,CAAA;IACpB,oDAA8B,CAAA;AAChC,CAAC,EAjBiB,kBAAkB,KAAlB,kBAAkB,QAiBnC;AAED,MAAM,CAAN,IAAkB,YAIjB;AAJD,WAAkB,YAAY;IAC5B,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;AACvB,CAAC,EAJiB,YAAY,KAAZ,YAAY,QAI7B"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Statement nodes of the xbintsc AST.
|
|
3
|
+
*/
|
|
4
|
+
import { SyntaxKind } from "./kinds.js";
|
|
5
|
+
import type { Expression, Modifier, Node, Statement, TypeNode } from "./common.js";
|
|
6
|
+
import type { Identifier } from "./expressions.js";
|
|
7
|
+
export interface ExpressionStatement extends Node {
|
|
8
|
+
readonly kind: SyntaxKind.ExpressionStatement;
|
|
9
|
+
readonly expression: Expression;
|
|
10
|
+
}
|
|
11
|
+
export interface Block extends Node {
|
|
12
|
+
readonly kind: SyntaxKind.Block;
|
|
13
|
+
readonly statements: Statement[];
|
|
14
|
+
}
|
|
15
|
+
export interface EmptyStatement extends Node {
|
|
16
|
+
readonly kind: SyntaxKind.EmptyStatement;
|
|
17
|
+
}
|
|
18
|
+
export interface DebuggerStatement extends Node {
|
|
19
|
+
readonly kind: SyntaxKind.DebuggerStatement;
|
|
20
|
+
}
|
|
21
|
+
export interface VariableDeclaration extends Node {
|
|
22
|
+
readonly kind: SyntaxKind.VariableDeclaration;
|
|
23
|
+
readonly name: Identifier;
|
|
24
|
+
readonly exclamation: boolean;
|
|
25
|
+
readonly type?: TypeNode;
|
|
26
|
+
readonly initializer?: Expression;
|
|
27
|
+
}
|
|
28
|
+
export interface VariableDeclarationList extends Node {
|
|
29
|
+
readonly kind: SyntaxKind.VariableDeclarationList;
|
|
30
|
+
readonly declarations: VariableDeclaration[];
|
|
31
|
+
readonly declarationKind: "var" | "let" | "const" | "using";
|
|
32
|
+
}
|
|
33
|
+
export interface VariableStatement extends Node {
|
|
34
|
+
readonly kind: SyntaxKind.VariableStatement;
|
|
35
|
+
readonly declarationList: VariableDeclarationList;
|
|
36
|
+
readonly modifiers: Modifier[];
|
|
37
|
+
}
|
|
38
|
+
export interface IfStatement extends Node {
|
|
39
|
+
readonly kind: SyntaxKind.IfStatement;
|
|
40
|
+
readonly condition: Expression;
|
|
41
|
+
readonly thenStatement: Statement;
|
|
42
|
+
readonly elseStatement?: Statement;
|
|
43
|
+
}
|
|
44
|
+
export interface WhileStatement extends Node {
|
|
45
|
+
readonly kind: SyntaxKind.WhileStatement;
|
|
46
|
+
readonly condition: Expression;
|
|
47
|
+
readonly statement: Statement;
|
|
48
|
+
}
|
|
49
|
+
export interface DoStatement extends Node {
|
|
50
|
+
readonly kind: SyntaxKind.DoStatement;
|
|
51
|
+
readonly condition: Expression;
|
|
52
|
+
readonly statement: Statement;
|
|
53
|
+
}
|
|
54
|
+
export interface ForStatement extends Node {
|
|
55
|
+
readonly kind: SyntaxKind.ForStatement;
|
|
56
|
+
readonly initializer?: VariableDeclarationList | Expression;
|
|
57
|
+
readonly condition?: Expression;
|
|
58
|
+
readonly incrementor?: Expression;
|
|
59
|
+
readonly statement: Statement;
|
|
60
|
+
}
|
|
61
|
+
export interface ForOfStatement extends Node {
|
|
62
|
+
readonly kind: SyntaxKind.ForOfStatement;
|
|
63
|
+
readonly initializer: VariableDeclarationList | Expression;
|
|
64
|
+
readonly expression: Expression;
|
|
65
|
+
readonly statement: Statement;
|
|
66
|
+
readonly awaitModifier: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface ForInStatement extends Node {
|
|
69
|
+
readonly kind: SyntaxKind.ForInStatement;
|
|
70
|
+
readonly initializer: VariableDeclarationList | Expression;
|
|
71
|
+
readonly expression: Expression;
|
|
72
|
+
readonly statement: Statement;
|
|
73
|
+
}
|
|
74
|
+
export interface ReturnStatement extends Node {
|
|
75
|
+
readonly kind: SyntaxKind.ReturnStatement;
|
|
76
|
+
readonly expression?: Expression;
|
|
77
|
+
}
|
|
78
|
+
export interface BreakStatement extends Node {
|
|
79
|
+
readonly kind: SyntaxKind.BreakStatement;
|
|
80
|
+
readonly label?: Identifier;
|
|
81
|
+
}
|
|
82
|
+
export interface ContinueStatement extends Node {
|
|
83
|
+
readonly kind: SyntaxKind.ContinueStatement;
|
|
84
|
+
readonly label?: Identifier;
|
|
85
|
+
}
|
|
86
|
+
export interface ThrowStatement extends Node {
|
|
87
|
+
readonly kind: SyntaxKind.ThrowStatement;
|
|
88
|
+
readonly expression: Expression;
|
|
89
|
+
}
|
|
90
|
+
export interface CatchClause extends Node {
|
|
91
|
+
readonly kind: SyntaxKind.CatchClause;
|
|
92
|
+
readonly variable?: Identifier;
|
|
93
|
+
readonly type?: TypeNode;
|
|
94
|
+
readonly block: Block;
|
|
95
|
+
}
|
|
96
|
+
export interface TryStatement extends Node {
|
|
97
|
+
readonly kind: SyntaxKind.TryStatement;
|
|
98
|
+
readonly tryBlock: Block;
|
|
99
|
+
readonly catchClause?: CatchClause;
|
|
100
|
+
readonly finallyBlock?: Block;
|
|
101
|
+
}
|
|
102
|
+
export interface CaseClause extends Node {
|
|
103
|
+
readonly kind: SyntaxKind.CaseClause;
|
|
104
|
+
readonly expression: Expression;
|
|
105
|
+
readonly statements: Statement[];
|
|
106
|
+
}
|
|
107
|
+
export interface DefaultClause extends Node {
|
|
108
|
+
readonly kind: SyntaxKind.DefaultClause;
|
|
109
|
+
readonly statements: Statement[];
|
|
110
|
+
}
|
|
111
|
+
export interface SwitchStatement extends Node {
|
|
112
|
+
readonly kind: SyntaxKind.SwitchStatement;
|
|
113
|
+
readonly expression: Expression;
|
|
114
|
+
readonly clauses: (CaseClause | DefaultClause)[];
|
|
115
|
+
}
|
|
116
|
+
export interface LabeledStatement extends Node {
|
|
117
|
+
readonly kind: SyntaxKind.LabeledStatement;
|
|
118
|
+
readonly label: Identifier;
|
|
119
|
+
readonly statement: Statement;
|
|
120
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statements.js","sourceRoot":"","sources":["../../../src/ast/statements.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|