brighterscript 1.0.0-alpha.25 → 1.0.0-alpha.27

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.
Files changed (183) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/bsconfig.schema.json +5 -0
  3. package/dist/AstValidationSegmenter.d.ts +1 -1
  4. package/dist/AstValidationSegmenter.js +6 -7
  5. package/dist/AstValidationSegmenter.js.map +1 -1
  6. package/dist/BsConfig.d.ts +1 -0
  7. package/dist/DiagnosticMessages.d.ts +1 -3
  8. package/dist/DiagnosticMessages.js +5 -8
  9. package/dist/DiagnosticMessages.js.map +1 -1
  10. package/dist/Program.d.ts +1 -1
  11. package/dist/Program.js +40 -42
  12. package/dist/Program.js.map +1 -1
  13. package/dist/Scope.d.ts +2 -13
  14. package/dist/Scope.js +27 -35
  15. package/dist/Scope.js.map +1 -1
  16. package/dist/SymbolTable.d.ts +1 -8
  17. package/dist/SymbolTable.js +1 -10
  18. package/dist/SymbolTable.js.map +1 -1
  19. package/dist/SymbolTableFlag.d.ts +8 -0
  20. package/dist/SymbolTableFlag.js +13 -0
  21. package/dist/SymbolTableFlag.js.map +1 -0
  22. package/dist/XmlScope.d.ts +1 -6
  23. package/dist/XmlScope.js +6 -25
  24. package/dist/XmlScope.js.map +1 -1
  25. package/dist/astUtils/CachedLookups.d.ts +1 -2
  26. package/dist/astUtils/CachedLookups.js +3 -14
  27. package/dist/astUtils/CachedLookups.js.map +1 -1
  28. package/dist/astUtils/Editor.spec.js +1 -1
  29. package/dist/astUtils/Editor.spec.js.map +1 -1
  30. package/dist/astUtils/creators.js +77 -18
  31. package/dist/astUtils/creators.js.map +1 -1
  32. package/dist/astUtils/creators.spec.js +4 -4
  33. package/dist/astUtils/creators.spec.js.map +1 -1
  34. package/dist/astUtils/reflection.d.ts +3 -1
  35. package/dist/astUtils/reflection.js +12 -4
  36. package/dist/astUtils/reflection.js.map +1 -1
  37. package/dist/astUtils/reflection.spec.js +59 -42
  38. package/dist/astUtils/reflection.spec.js.map +1 -1
  39. package/dist/astUtils/visitors.spec.js +30 -19
  40. package/dist/astUtils/visitors.spec.js.map +1 -1
  41. package/dist/bscPlugin/BscPlugin.d.ts +2 -1
  42. package/dist/bscPlugin/BscPlugin.js +7 -3
  43. package/dist/bscPlugin/BscPlugin.js.map +1 -1
  44. package/dist/bscPlugin/CallExpressionInfo.js +7 -7
  45. package/dist/bscPlugin/CallExpressionInfo.js.map +1 -1
  46. package/dist/bscPlugin/SignatureHelpUtil.js +5 -4
  47. package/dist/bscPlugin/SignatureHelpUtil.js.map +1 -1
  48. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +2 -2
  49. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
  50. package/dist/bscPlugin/completions/CompletionsProcessor.js +23 -23
  51. package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
  52. package/dist/bscPlugin/definition/DefinitionProvider.d.ts +13 -0
  53. package/dist/bscPlugin/definition/DefinitionProvider.js +210 -0
  54. package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
  55. package/dist/bscPlugin/definition/DefinitionProvider.spec.d.ts +1 -0
  56. package/dist/bscPlugin/definition/DefinitionProvider.spec.js +88 -0
  57. package/dist/bscPlugin/definition/DefinitionProvider.spec.js.map +1 -0
  58. package/dist/bscPlugin/hover/HoverProcessor.d.ts +1 -0
  59. package/dist/bscPlugin/hover/HoverProcessor.js +28 -8
  60. package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -1
  61. package/dist/bscPlugin/hover/HoverProcessor.spec.js +74 -2
  62. package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -1
  63. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +2 -5
  64. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -1
  65. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js +8 -6
  66. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +1 -1
  67. package/dist/bscPlugin/validation/BrsFileValidator.js +46 -47
  68. package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
  69. package/dist/bscPlugin/validation/ScopeValidator.d.ts +10 -0
  70. package/dist/bscPlugin/validation/ScopeValidator.js +120 -39
  71. package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -1
  72. package/dist/bscPlugin/validation/ScopeValidator.spec.js +165 -10
  73. package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -1
  74. package/dist/diagnosticUtils.d.ts +1 -1
  75. package/dist/files/BrsFile.Class.spec.js +7 -6
  76. package/dist/files/BrsFile.Class.spec.js.map +1 -1
  77. package/dist/files/BrsFile.d.ts +7 -15
  78. package/dist/files/BrsFile.js +49 -309
  79. package/dist/files/BrsFile.js.map +1 -1
  80. package/dist/files/BrsFile.spec.js +111 -157
  81. package/dist/files/BrsFile.spec.js.map +1 -1
  82. package/dist/files/XmlFile.d.ts +2 -3
  83. package/dist/files/XmlFile.js +0 -2
  84. package/dist/files/XmlFile.js.map +1 -1
  85. package/dist/interfaces.d.ts +109 -84
  86. package/dist/interfaces.js +9 -9
  87. package/dist/interfaces.js.map +1 -1
  88. package/dist/parser/AstNode.spec.js +6 -6
  89. package/dist/parser/AstNode.spec.js.map +1 -1
  90. package/dist/parser/Expression.d.ts +301 -164
  91. package/dist/parser/Expression.js +355 -294
  92. package/dist/parser/Expression.js.map +1 -1
  93. package/dist/parser/Parser.Class.spec.js +26 -27
  94. package/dist/parser/Parser.Class.spec.js.map +1 -1
  95. package/dist/parser/Parser.d.ts +6 -2
  96. package/dist/parser/Parser.js +361 -160
  97. package/dist/parser/Parser.js.map +1 -1
  98. package/dist/parser/Parser.spec.js +69 -213
  99. package/dist/parser/Parser.spec.js.map +1 -1
  100. package/dist/parser/SGParser.js +49 -35
  101. package/dist/parser/SGParser.js.map +1 -1
  102. package/dist/parser/SGTypes.d.ts +36 -24
  103. package/dist/parser/SGTypes.js +26 -55
  104. package/dist/parser/SGTypes.js.map +1 -1
  105. package/dist/parser/Statement.d.ts +381 -238
  106. package/dist/parser/Statement.js +510 -386
  107. package/dist/parser/Statement.js.map +1 -1
  108. package/dist/parser/Statement.spec.js +2 -2
  109. package/dist/parser/Statement.spec.js.map +1 -1
  110. package/dist/parser/tests/controlFlow/For.spec.js +1 -1
  111. package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
  112. package/dist/parser/tests/controlFlow/ForEach.spec.js +2 -2
  113. package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
  114. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +1 -1
  115. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +1 -1
  116. package/dist/parser/tests/expression/Call.spec.js +11 -11
  117. package/dist/parser/tests/expression/Call.spec.js.map +1 -1
  118. package/dist/parser/tests/expression/Indexing.spec.js +30 -5
  119. package/dist/parser/tests/expression/Indexing.spec.js.map +1 -1
  120. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +2 -2
  121. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
  122. package/dist/parser/tests/expression/TernaryExpression.spec.js +2 -2
  123. package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
  124. package/dist/parser/tests/expression/TypeExpression.spec.js +8 -9
  125. package/dist/parser/tests/expression/TypeExpression.spec.js.map +1 -1
  126. package/dist/parser/tests/statement/ConstStatement.spec.js +1 -1
  127. package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -1
  128. package/dist/parser/tests/statement/Dim.spec.js +8 -8
  129. package/dist/parser/tests/statement/Dim.spec.js.map +1 -1
  130. package/dist/parser/tests/statement/Enum.spec.js +2 -2
  131. package/dist/parser/tests/statement/Enum.spec.js.map +1 -1
  132. package/dist/parser/tests/statement/LibraryStatement.spec.js +2 -2
  133. package/dist/parser/tests/statement/LibraryStatement.spec.js.map +1 -1
  134. package/dist/parser/tests/statement/Misc.spec.js +2 -2
  135. package/dist/parser/tests/statement/Misc.spec.js.map +1 -1
  136. package/dist/parser/tests/statement/PrintStatement.spec.js +1 -1
  137. package/dist/parser/tests/statement/TryCatch.spec.js +10 -3
  138. package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
  139. package/dist/roku-types/data.json +70 -52
  140. package/dist/roku-types/index.d.ts +43 -21
  141. package/dist/types/ArrayType.js +1 -2
  142. package/dist/types/ArrayType.js.map +1 -1
  143. package/dist/types/ArrayType.spec.js +7 -8
  144. package/dist/types/ArrayType.spec.js.map +1 -1
  145. package/dist/types/AssociativeArrayType.js +2 -3
  146. package/dist/types/AssociativeArrayType.js.map +1 -1
  147. package/dist/types/BscType.d.ts +1 -1
  148. package/dist/types/BscType.js +2 -3
  149. package/dist/types/BscType.js.map +1 -1
  150. package/dist/types/BuiltInInterfaceAdder.js +15 -9
  151. package/dist/types/BuiltInInterfaceAdder.js.map +1 -1
  152. package/dist/types/BuiltInInterfaceAdder.spec.js +31 -32
  153. package/dist/types/BuiltInInterfaceAdder.spec.js.map +1 -1
  154. package/dist/types/ClassType.spec.js +10 -11
  155. package/dist/types/ClassType.spec.js.map +1 -1
  156. package/dist/types/ComponentType.d.ts +2 -1
  157. package/dist/types/ComponentType.js.map +1 -1
  158. package/dist/types/EnumType.js +2 -3
  159. package/dist/types/EnumType.js.map +1 -1
  160. package/dist/types/InheritableType.js +3 -4
  161. package/dist/types/InheritableType.js.map +1 -1
  162. package/dist/types/InterfaceType.js +2 -3
  163. package/dist/types/InterfaceType.js.map +1 -1
  164. package/dist/types/InterfaceType.spec.js +3 -4
  165. package/dist/types/InterfaceType.spec.js.map +1 -1
  166. package/dist/types/ObjectType.js +1 -2
  167. package/dist/types/ObjectType.js.map +1 -1
  168. package/dist/types/ReferenceType.d.ts +1 -1
  169. package/dist/types/ReferenceType.spec.js +21 -22
  170. package/dist/types/ReferenceType.spec.js.map +1 -1
  171. package/dist/types/UnionType.js +3 -3
  172. package/dist/types/UnionType.js.map +1 -1
  173. package/dist/types/UnionType.spec.js +37 -38
  174. package/dist/types/UnionType.spec.js.map +1 -1
  175. package/dist/types/helper.spec.js +4 -5
  176. package/dist/types/helper.spec.js.map +1 -1
  177. package/dist/util.d.ts +16 -7
  178. package/dist/util.js +89 -43
  179. package/dist/util.js.map +1 -1
  180. package/dist/validators/ClassValidator.d.ts +0 -9
  181. package/dist/validators/ClassValidator.js +9 -52
  182. package/dist/validators/ClassValidator.js.map +1 -1
  183. package/package.json +1 -1
@@ -6,7 +6,7 @@ import type { Range } from 'vscode-languageserver';
6
6
  import type { BrsTranspileState } from './BrsTranspileState';
7
7
  import { ParseMode } from './Parser';
8
8
  import type { WalkVisitor, WalkOptions } from '../astUtils/visitors';
9
- import { type GetTypeOptions, type TranspileResult, type TypedefProvider } from '../interfaces';
9
+ import type { GetTypeOptions, TranspileResult, TypedefProvider } from '../interfaces';
10
10
  import type { SourceNode } from 'source-map';
11
11
  import type { TranspileState } from './TranspileState';
12
12
  import { SymbolTable } from '../SymbolTable';
@@ -20,15 +20,13 @@ import { InterfaceType } from '../types/InterfaceType';
20
20
  import type { BscType } from '../types/BscType';
21
21
  import { TypedFunctionType } from '../types/TypedFunctionType';
22
22
  export declare class EmptyStatement extends Statement {
23
+ constructor(options?: {
24
+ range?: Range;
25
+ });
23
26
  /**
24
27
  * Create a negative range to indicate this is an interpolated location
25
28
  */
26
- range: Range;
27
- constructor(
28
- /**
29
- * Create a negative range to indicate this is an interpolated location
30
- */
31
- range?: Range);
29
+ readonly range: Range;
32
30
  readonly kind = AstNodeKind.EmptyStatement;
33
31
  transpile(state: BrsTranspileState): any[];
34
32
  walk(visitor: WalkVisitor, options: WalkOptions): void;
@@ -37,22 +35,32 @@ export declare class EmptyStatement extends Statement {
37
35
  * This is a top-level statement. Consider this the root of the AST
38
36
  */
39
37
  export declare class Body extends Statement implements TypedefProvider {
40
- statements: Statement[];
41
- constructor(statements?: Statement[]);
38
+ constructor(options?: {
39
+ statements?: Statement[];
40
+ });
41
+ readonly statements: Statement[];
42
42
  readonly kind = AstNodeKind.Body;
43
- symbolTable: SymbolTable;
43
+ readonly symbolTable: SymbolTable;
44
44
  get range(): Range;
45
45
  transpile(state: BrsTranspileState): TranspileResult;
46
46
  getTypedef(state: BrsTranspileState): any[];
47
47
  walk(visitor: WalkVisitor, options: WalkOptions): void;
48
48
  }
49
49
  export declare class AssignmentStatement extends Statement {
50
- equals: Token;
51
- name: Identifier;
52
- value: Expression;
53
- asToken?: Token;
54
- typeExpression?: TypeExpression;
55
- constructor(equals: Token, name: Identifier, value: Expression, asToken?: Token, typeExpression?: TypeExpression);
50
+ constructor(options: {
51
+ name: Identifier;
52
+ equals?: Token;
53
+ value: Expression;
54
+ as?: Token;
55
+ typeExpression?: TypeExpression;
56
+ });
57
+ readonly tokens: {
58
+ readonly equals?: Token;
59
+ readonly name: Identifier;
60
+ readonly as?: Token;
61
+ };
62
+ readonly value: Expression;
63
+ readonly typeExpression: TypeExpression;
56
64
  readonly kind = AstNodeKind.AssignmentStatement;
57
65
  readonly range: Range;
58
66
  transpile(state: BrsTranspileState): TranspileResult;
@@ -60,60 +68,74 @@ export declare class AssignmentStatement extends Statement {
60
68
  getType(options: GetTypeOptions): BscType;
61
69
  }
62
70
  export declare class Block extends Statement {
71
+ constructor(options: {
72
+ statements: Statement[];
73
+ startingRange: Range;
74
+ });
63
75
  readonly statements: Statement[];
64
76
  readonly startingRange: Range;
65
- constructor(statements: Statement[], startingRange: Range);
66
77
  readonly kind = AstNodeKind.Block;
67
78
  readonly range: Range;
68
79
  transpile(state: BrsTranspileState): TranspileResult;
69
80
  walk(visitor: WalkVisitor, options: WalkOptions): void;
70
81
  }
71
82
  export declare class ExpressionStatement extends Statement {
83
+ constructor(options: {
84
+ expression: Expression;
85
+ });
72
86
  readonly expression: Expression;
73
- constructor(expression: Expression);
74
87
  readonly kind = AstNodeKind.ExpressionStatement;
75
88
  readonly range: Range;
76
89
  transpile(state: BrsTranspileState): TranspileResult;
77
90
  walk(visitor: WalkVisitor, options: WalkOptions): void;
78
91
  }
79
92
  export declare class CommentStatement extends Statement implements Expression, TypedefProvider {
80
- comments: Token[];
81
- constructor(comments: Token[]);
93
+ constructor(options: {
94
+ comments: Token[];
95
+ });
96
+ readonly tokens: {
97
+ readonly comments: Token[];
98
+ };
82
99
  readonly kind = AstNodeKind.CommentStatement;
83
- range: Range;
100
+ readonly range: Range;
84
101
  get text(): string;
85
102
  transpile(state: BrsTranspileState): any[];
86
103
  getTypedef(state: TranspileState): any[];
87
104
  walk(visitor: WalkVisitor, options: WalkOptions): void;
88
105
  }
89
106
  export declare class ExitForStatement extends Statement {
107
+ constructor(options?: {
108
+ exitFor?: Token;
109
+ });
90
110
  readonly tokens: {
91
- exitFor: Token;
111
+ readonly exitFor?: Token;
92
112
  };
93
- constructor(tokens: {
94
- exitFor: Token;
95
- });
96
113
  readonly kind = AstNodeKind.ExitForStatement;
97
114
  readonly range: Range;
98
- transpile(state: BrsTranspileState): SourceNode[];
115
+ transpile(state: BrsTranspileState): (string | SourceNode)[];
99
116
  walk(visitor: WalkVisitor, options: WalkOptions): void;
100
117
  }
101
118
  export declare class ExitWhileStatement extends Statement {
119
+ constructor(options?: {
120
+ exitWhile?: Token;
121
+ });
102
122
  readonly tokens: {
103
- exitWhile: Token;
123
+ readonly exitWhile?: Token;
104
124
  };
105
- constructor(tokens: {
106
- exitWhile: Token;
107
- });
108
125
  readonly kind = AstNodeKind.ExitWhileStatement;
109
126
  readonly range: Range;
110
- transpile(state: BrsTranspileState): SourceNode[];
127
+ transpile(state: BrsTranspileState): (string | SourceNode)[];
111
128
  walk(visitor: WalkVisitor, options: WalkOptions): void;
112
129
  }
113
130
  export declare class FunctionStatement extends Statement implements TypedefProvider {
114
- name: Identifier;
115
- func: FunctionExpression;
116
- constructor(name: Identifier, func: FunctionExpression);
131
+ constructor(options: {
132
+ name: Identifier;
133
+ func: FunctionExpression;
134
+ });
135
+ readonly tokens: {
136
+ readonly name: Identifier;
137
+ };
138
+ readonly func: FunctionExpression;
117
139
  readonly kind: AstNodeKind;
118
140
  readonly range: Range;
119
141
  /**
@@ -127,31 +149,40 @@ export declare class FunctionStatement extends Statement implements TypedefProvi
127
149
  getType(options: GetTypeOptions): TypedFunctionType;
128
150
  }
129
151
  export declare class IfStatement extends Statement {
130
- readonly tokens: {
131
- if: Token;
152
+ constructor(options: {
153
+ if?: Token;
132
154
  then?: Token;
133
155
  else?: Token;
134
156
  endIf?: Token;
157
+ condition: Expression;
158
+ thenBranch: Block;
159
+ elseBranch?: IfStatement | Block;
160
+ isInline?: boolean;
161
+ });
162
+ readonly tokens: {
163
+ readonly if?: Token;
164
+ readonly then?: Token;
165
+ readonly else?: Token;
166
+ readonly endIf?: Token;
135
167
  };
136
168
  readonly condition: Expression;
137
169
  readonly thenBranch: Block;
138
170
  readonly elseBranch?: IfStatement | Block;
139
171
  readonly isInline?: boolean;
140
- constructor(tokens: {
141
- if: Token;
142
- then?: Token;
143
- else?: Token;
144
- endIf?: Token;
145
- }, condition: Expression, thenBranch: Block, elseBranch?: IfStatement | Block, isInline?: boolean);
146
172
  readonly kind = AstNodeKind.IfStatement;
147
173
  readonly range: Range;
148
174
  transpile(state: BrsTranspileState): any[];
149
175
  walk(visitor: WalkVisitor, options: WalkOptions): void;
150
176
  }
151
177
  export declare class IncrementStatement extends Statement {
178
+ constructor(options: {
179
+ value: Expression;
180
+ operator: Token;
181
+ });
152
182
  readonly value: Expression;
153
- readonly operator: Token;
154
- constructor(value: Expression, operator: Token);
183
+ readonly tokens: {
184
+ readonly operator: Token;
185
+ };
155
186
  readonly kind = AstNodeKind.IncrementStatement;
156
187
  readonly range: Range;
157
188
  transpile(state: BrsTranspileState): (string | SourceNode)[];
@@ -169,59 +200,69 @@ export interface PrintSeparatorSpace extends Token {
169
200
  * Represents a `print` statement within BrightScript.
170
201
  */
171
202
  export declare class PrintStatement extends Statement {
172
- readonly tokens: {
173
- print: Token;
174
- };
175
- readonly expressions: Array<Expression | PrintSeparatorTab | PrintSeparatorSpace>;
176
203
  /**
177
204
  * Creates a new internal representation of a BrightScript `print` statement.
178
- * @param tokens the tokens for this statement
179
- * @param tokens.print a print token
180
- * @param expressions an array of expressions or `PrintSeparator`s to be evaluated and printed.
205
+ * @param options the options for this statement
206
+ * @param options.print a print token
207
+ * @param options.expressions an array of expressions or `PrintSeparator`s to be evaluated and printed.
181
208
  */
182
- constructor(tokens: {
209
+ constructor(options: {
183
210
  print: Token;
184
- }, expressions: Array<Expression | PrintSeparatorTab | PrintSeparatorSpace>);
211
+ expressions: Array<Expression | PrintSeparatorTab | PrintSeparatorSpace>;
212
+ });
213
+ readonly tokens: {
214
+ readonly print: Token;
215
+ };
216
+ readonly expressions: Array<Expression | PrintSeparatorTab | PrintSeparatorSpace>;
185
217
  readonly kind = AstNodeKind.PrintStatement;
186
218
  readonly range: Range;
187
219
  transpile(state: BrsTranspileState): (string | SourceNode)[];
188
220
  walk(visitor: WalkVisitor, options: WalkOptions): void;
189
221
  }
190
222
  export declare class DimStatement extends Statement {
191
- dimToken: Token;
192
- identifier?: Identifier;
193
- openingSquare?: Token;
194
- dimensions?: Expression[];
195
- closingSquare?: Token;
196
- constructor(dimToken: Token, identifier?: Identifier, openingSquare?: Token, dimensions?: Expression[], closingSquare?: Token);
223
+ constructor(options: {
224
+ dim?: Token;
225
+ name: Identifier;
226
+ openingSquare?: Token;
227
+ dimensions: Expression[];
228
+ closingSquare?: Token;
229
+ });
230
+ readonly tokens: {
231
+ readonly dim?: Token;
232
+ readonly name: Identifier;
233
+ readonly openingSquare?: Token;
234
+ readonly closingSquare?: Token;
235
+ };
236
+ readonly dimensions: Expression[];
197
237
  readonly kind = AstNodeKind.DimStatement;
198
- range: Range;
238
+ readonly range: Range;
199
239
  transpile(state: BrsTranspileState): (string | SourceNode)[];
200
240
  walk(visitor: WalkVisitor, options: WalkOptions): void;
241
+ getType(options: GetTypeOptions): BscType;
201
242
  }
202
243
  export declare class GotoStatement extends Statement {
203
- readonly tokens: {
204
- goto: Token;
205
- label: Token;
206
- };
207
- constructor(tokens: {
208
- goto: Token;
244
+ constructor(options: {
245
+ goto?: Token;
209
246
  label: Token;
210
247
  });
248
+ readonly tokens: {
249
+ readonly goto?: Token;
250
+ readonly label: Token;
251
+ };
211
252
  readonly kind = AstNodeKind.GotoStatement;
212
253
  readonly range: Range;
213
254
  transpile(state: BrsTranspileState): (string | SourceNode)[];
214
255
  walk(visitor: WalkVisitor, options: WalkOptions): void;
215
256
  }
216
257
  export declare class LabelStatement extends Statement {
258
+ constructor(options: {
259
+ name: Token;
260
+ colon?: Token;
261
+ });
217
262
  readonly tokens: {
218
- identifier: Token;
219
- colon: Token;
263
+ readonly name: Token;
264
+ readonly colon: Token;
220
265
  };
221
- constructor(tokens: {
222
- identifier: Token;
223
- colon: Token;
224
- });
225
266
  readonly kind = AstNodeKind.LabelStatement;
226
267
  readonly range: Range;
227
268
  getLeadingTrivia(): Token[];
@@ -229,98 +270,122 @@ export declare class LabelStatement extends Statement {
229
270
  walk(visitor: WalkVisitor, options: WalkOptions): void;
230
271
  }
231
272
  export declare class ReturnStatement extends Statement {
273
+ constructor(options?: {
274
+ return?: Token;
275
+ value?: Expression;
276
+ });
232
277
  readonly tokens: {
233
- return: Token;
278
+ readonly return?: Token;
234
279
  };
235
280
  readonly value?: Expression;
236
- constructor(tokens: {
237
- return: Token;
238
- }, value?: Expression);
239
281
  readonly kind = AstNodeKind.ReturnStatement;
240
282
  readonly range: Range;
241
283
  transpile(state: BrsTranspileState): any[];
242
284
  walk(visitor: WalkVisitor, options: WalkOptions): void;
243
285
  }
244
286
  export declare class EndStatement extends Statement {
287
+ constructor(options?: {
288
+ end?: Token;
289
+ });
245
290
  readonly tokens: {
246
- end: Token;
291
+ readonly end?: Token;
247
292
  };
248
- constructor(tokens: {
249
- end: Token;
250
- });
251
293
  readonly kind = AstNodeKind.EndStatement;
252
294
  readonly range: Range;
253
295
  transpile(state: BrsTranspileState): SourceNode[];
254
296
  walk(visitor: WalkVisitor, options: WalkOptions): void;
255
297
  }
256
298
  export declare class StopStatement extends Statement {
299
+ constructor(options?: {
300
+ stop?: Token;
301
+ });
257
302
  readonly tokens: {
258
- stop: Token;
303
+ readonly stop?: Token;
259
304
  };
260
- constructor(tokens: {
261
- stop: Token;
262
- });
263
305
  readonly kind = AstNodeKind.StopStatement;
264
306
  readonly range: Range;
265
307
  transpile(state: BrsTranspileState): SourceNode[];
266
308
  walk(visitor: WalkVisitor, options: WalkOptions): void;
267
309
  }
268
310
  export declare class ForStatement extends Statement {
269
- forToken: Token;
270
- counterDeclaration: AssignmentStatement;
271
- toToken: Token;
272
- finalValue: Expression;
273
- body: Block;
274
- endForToken: Token;
275
- stepToken?: Token;
276
- increment?: Expression;
277
- constructor(forToken: Token, counterDeclaration: AssignmentStatement, toToken: Token, finalValue: Expression, body: Block, endForToken: Token, stepToken?: Token, increment?: Expression);
311
+ constructor(options: {
312
+ for?: Token;
313
+ counterDeclaration: AssignmentStatement;
314
+ to?: Token;
315
+ finalValue: Expression;
316
+ body: Block;
317
+ endFor?: Token;
318
+ step?: Token;
319
+ increment?: Expression;
320
+ });
321
+ readonly tokens: {
322
+ readonly for?: Token;
323
+ readonly to?: Token;
324
+ readonly endFor?: Token;
325
+ readonly step?: Token;
326
+ };
327
+ readonly counterDeclaration: AssignmentStatement;
328
+ readonly finalValue: Expression;
329
+ readonly body: Block;
330
+ readonly increment?: Expression;
278
331
  readonly kind = AstNodeKind.ForStatement;
279
332
  readonly range: Range;
280
333
  transpile(state: BrsTranspileState): any[];
281
334
  walk(visitor: WalkVisitor, options: WalkOptions): void;
282
335
  }
283
336
  export declare class ForEachStatement extends Statement {
337
+ constructor(options: {
338
+ forEach?: Token;
339
+ item: Token;
340
+ in?: Token;
341
+ target: Expression;
342
+ body: Block;
343
+ endFor?: Token;
344
+ });
284
345
  readonly tokens: {
285
- forEach: Token;
286
- in: Token;
287
- endFor: Token;
346
+ readonly forEach?: Token;
347
+ readonly item: Token;
348
+ readonly in?: Token;
349
+ readonly endFor?: Token;
288
350
  };
289
- readonly item: Token;
290
- readonly target: Expression;
291
351
  readonly body: Block;
292
- constructor(tokens: {
293
- forEach: Token;
294
- in: Token;
295
- endFor: Token;
296
- }, item: Token, target: Expression, body: Block);
352
+ readonly target: Expression;
297
353
  readonly kind = AstNodeKind.ForEachStatement;
298
354
  readonly range: Range;
299
355
  transpile(state: BrsTranspileState): any[];
300
356
  walk(visitor: WalkVisitor, options: WalkOptions): void;
301
357
  }
302
358
  export declare class WhileStatement extends Statement {
359
+ constructor(options: {
360
+ while?: Token;
361
+ endWhile?: Token;
362
+ condition: Expression;
363
+ body: Block;
364
+ });
303
365
  readonly tokens: {
304
- while: Token;
305
- endWhile: Token;
366
+ readonly while?: Token;
367
+ readonly endWhile?: Token;
306
368
  };
307
369
  readonly condition: Expression;
308
370
  readonly body: Block;
309
- constructor(tokens: {
310
- while: Token;
311
- endWhile: Token;
312
- }, condition: Expression, body: Block);
313
371
  readonly kind = AstNodeKind.WhileStatement;
314
372
  readonly range: Range;
315
373
  transpile(state: BrsTranspileState): any[];
316
374
  walk(visitor: WalkVisitor, options: WalkOptions): void;
317
375
  }
318
376
  export declare class DottedSetStatement extends Statement {
377
+ constructor(options: {
378
+ obj: Expression;
379
+ name: Identifier;
380
+ value: Expression;
381
+ dot?: Token;
382
+ });
383
+ readonly tokens: {
384
+ readonly name: Identifier;
385
+ readonly dot?: Token;
386
+ };
319
387
  readonly obj: Expression;
320
- readonly name: Identifier;
321
388
  readonly value: Expression;
322
- readonly dot?: Token;
323
- constructor(obj: Expression, name: Identifier, value: Expression, dot?: Token);
324
389
  readonly kind = AstNodeKind.DottedSetStatement;
325
390
  readonly range: Range;
326
391
  transpile(state: BrsTranspileState): TranspileResult;
@@ -328,26 +393,34 @@ export declare class DottedSetStatement extends Statement {
328
393
  getType(options: GetTypeOptions): BscType;
329
394
  }
330
395
  export declare class IndexedSetStatement extends Statement {
396
+ constructor(options: {
397
+ obj: Expression;
398
+ indexes: Expression[];
399
+ value: Expression;
400
+ openingSquare?: Token;
401
+ closingSquare?: Token;
402
+ });
403
+ readonly tokens: {
404
+ readonly openingSquare?: Token;
405
+ readonly closingSquare?: Token;
406
+ };
331
407
  readonly obj: Expression;
332
- readonly index: Expression;
408
+ readonly indexes: Expression[];
333
409
  readonly value: Expression;
334
- readonly openingSquare: Token;
335
- readonly closingSquare: Token;
336
- constructor(obj: Expression, index: Expression, value: Expression, openingSquare: Token, closingSquare: Token);
337
410
  readonly kind = AstNodeKind.IndexedSetStatement;
338
411
  readonly range: Range;
339
- transpile(state: BrsTranspileState): TranspileResult;
412
+ transpile(state: BrsTranspileState): any[];
340
413
  walk(visitor: WalkVisitor, options: WalkOptions): void;
341
414
  }
342
415
  export declare class LibraryStatement extends Statement implements TypedefProvider {
343
- readonly tokens: {
416
+ constructor(options: {
344
417
  library: Token;
345
- filePath: Token | undefined;
346
- };
347
- constructor(tokens: {
348
- library: Token;
349
- filePath: Token | undefined;
418
+ filePath?: Token;
350
419
  });
420
+ readonly tokens: {
421
+ readonly library: Token;
422
+ readonly filePath?: Token;
423
+ };
351
424
  readonly kind = AstNodeKind.LibraryStatement;
352
425
  readonly range: Range;
353
426
  transpile(state: BrsTranspileState): any[];
@@ -355,11 +428,18 @@ export declare class LibraryStatement extends Statement implements TypedefProvid
355
428
  walk(visitor: WalkVisitor, options: WalkOptions): void;
356
429
  }
357
430
  export declare class NamespaceStatement extends Statement implements TypedefProvider {
358
- keyword: Token;
359
- nameExpression: VariableExpression | DottedGetExpression;
360
- body: Body;
361
- endKeyword: Token;
362
- constructor(keyword: Token, nameExpression: VariableExpression | DottedGetExpression, body: Body, endKeyword: Token);
431
+ constructor(options: {
432
+ namespace?: Token;
433
+ nameExpression: VariableExpression | DottedGetExpression;
434
+ body: Body;
435
+ endNamespace?: Token;
436
+ });
437
+ readonly tokens: {
438
+ readonly namespace?: Token;
439
+ readonly endNamespace?: Token;
440
+ };
441
+ readonly nameExpression: VariableExpression | DottedGetExpression;
442
+ readonly body: Body;
363
443
  readonly kind = AstNodeKind.NamespaceStatement;
364
444
  /**
365
445
  * The string name for this namespace
@@ -377,12 +457,17 @@ export declare class NamespaceStatement extends Statement implements TypedefProv
377
457
  getType(options: GetTypeOptions): NamespaceType;
378
458
  }
379
459
  export declare class ImportStatement extends Statement implements TypedefProvider {
380
- readonly importToken: Token;
381
- readonly filePathToken: Token;
382
- constructor(importToken: Token, filePathToken: Token);
460
+ constructor(options: {
461
+ import?: Token;
462
+ path: Token;
463
+ });
464
+ readonly tokens: {
465
+ readonly import?: Token;
466
+ readonly path: Token;
467
+ };
383
468
  readonly kind = AstNodeKind.ImportStatement;
384
- range: Range;
385
- filePath: string;
469
+ readonly range: Range;
470
+ readonly filePath: string;
386
471
  transpile(state: BrsTranspileState): (string | SourceNode)[];
387
472
  /**
388
473
  * Get the typedef for this statement
@@ -391,17 +476,24 @@ export declare class ImportStatement extends Statement implements TypedefProvide
391
476
  walk(visitor: WalkVisitor, options: WalkOptions): void;
392
477
  }
393
478
  export declare class InterfaceStatement extends Statement implements TypedefProvider {
394
- parentInterfaceName: TypeExpression;
395
- body: Statement[];
396
- constructor(interfaceToken: Token, name: Identifier, extendsToken: Token, parentInterfaceName: TypeExpression, body: Statement[], endInterfaceToken: Token);
397
- readonly kind = AstNodeKind.InterfaceStatement;
398
- tokens: {
479
+ constructor(options: {
399
480
  interface: Token;
400
481
  name: Identifier;
401
- extends: Token;
402
- endInterface: Token;
482
+ extends?: Token;
483
+ parentInterfaceName?: TypeExpression;
484
+ body: Statement[];
485
+ endInterface?: Token;
486
+ });
487
+ readonly parentInterfaceName?: TypeExpression;
488
+ readonly body: Statement[];
489
+ readonly kind = AstNodeKind.InterfaceStatement;
490
+ readonly tokens: {
491
+ readonly interface?: Token;
492
+ readonly name: Identifier;
493
+ readonly extends?: Token;
494
+ readonly endInterface?: Token;
403
495
  };
404
- range: Range;
496
+ readonly range: Range;
405
497
  get fields(): InterfaceFieldStatement[];
406
498
  get methods(): InterfaceMethodStatement[];
407
499
  hasParentInterface(): boolean;
@@ -424,15 +516,20 @@ export declare class InterfaceStatement extends Statement implements TypedefProv
424
516
  getType(options: GetTypeOptions): InterfaceType;
425
517
  }
426
518
  export declare class InterfaceFieldStatement extends Statement implements TypedefProvider {
427
- typeExpression?: TypeExpression;
428
519
  transpile(state: BrsTranspileState): TranspileResult;
429
- constructor(nameToken: Identifier, asToken: Token, typeExpression?: TypeExpression, optionalToken?: Token);
430
- readonly kind = AstNodeKind.InterfaceFieldStatement;
431
- range: Range;
432
- tokens: {
520
+ constructor(options: {
433
521
  name: Identifier;
434
- as: Token;
522
+ as?: Token;
523
+ typeExpression?: TypeExpression;
435
524
  optional?: Token;
525
+ });
526
+ readonly kind = AstNodeKind.InterfaceFieldStatement;
527
+ readonly typeExpression?: TypeExpression;
528
+ readonly range: Range;
529
+ readonly tokens: {
530
+ readonly name: Identifier;
531
+ readonly as: Token;
532
+ readonly optional?: Token;
436
533
  };
437
534
  getLeadingTrivia(): Token[];
438
535
  get name(): string;
@@ -442,24 +539,33 @@ export declare class InterfaceFieldStatement extends Statement implements Typede
442
539
  getType(options: GetTypeOptions): BscType;
443
540
  }
444
541
  export declare class InterfaceMethodStatement extends Statement implements TypedefProvider {
445
- params: FunctionParameterExpression[];
446
- returnTypeExpression?: TypeExpression;
447
542
  transpile(state: BrsTranspileState): TranspileResult;
448
- constructor(functionTypeToken: Token, nameToken: Identifier, leftParen: Token, params: FunctionParameterExpression[], rightParen: Token, asToken?: Token, returnTypeExpression?: TypeExpression, optionalToken?: Token);
543
+ constructor(options: {
544
+ functionType?: Token;
545
+ name: Identifier;
546
+ leftParen?: Token;
547
+ params?: FunctionParameterExpression[];
548
+ rightParen?: Token;
549
+ as?: Token;
550
+ returnTypeExpression?: TypeExpression;
551
+ optional?: Token;
552
+ });
449
553
  readonly kind = AstNodeKind.InterfaceMethodStatement;
450
554
  get range(): Range;
451
555
  /**
452
556
  * Get the name of this method.
453
557
  */
454
558
  getName(parseMode: ParseMode): string;
455
- tokens: {
456
- optional?: Token;
457
- functionType: Token;
458
- name: Identifier;
459
- leftParen: Token;
460
- rightParen: Token;
461
- as: Token;
559
+ readonly tokens: {
560
+ readonly optional?: Token;
561
+ readonly functionType: Token;
562
+ readonly name: Identifier;
563
+ readonly leftParen?: Token;
564
+ readonly rightParen?: Token;
565
+ readonly as?: Token;
462
566
  };
567
+ readonly params: FunctionParameterExpression[];
568
+ readonly returnTypeExpression?: TypeExpression;
463
569
  get isOptional(): boolean;
464
570
  getLeadingTrivia(): Token[];
465
571
  walk(visitor: WalkVisitor, options: WalkOptions): void;
@@ -467,26 +573,34 @@ export declare class InterfaceMethodStatement extends Statement implements Typed
467
573
  getType(options: GetTypeOptions): TypedFunctionType;
468
574
  }
469
575
  export declare class ClassStatement extends Statement implements TypedefProvider {
470
- readonly classKeyword: Token;
471
- /**
472
- * The name of the class (without namespace prefix)
473
- */
474
- readonly name: Identifier;
475
- body: Statement[];
476
- readonly end: Token;
477
- readonly extendsKeyword?: Token;
478
- readonly parentClassName?: TypeExpression;
479
- constructor(classKeyword: Token,
480
- /**
481
- * The name of the class (without namespace prefix)
482
- */
483
- name: Identifier, body: Statement[], end: Token, extendsKeyword?: Token, parentClassName?: TypeExpression);
576
+ constructor(options: {
577
+ class?: Token;
578
+ /**
579
+ * The name of the class (without namespace prefix)
580
+ */
581
+ name: Identifier;
582
+ body: Statement[];
583
+ endClass?: Token;
584
+ extends?: Token;
585
+ parentClassName?: TypeExpression;
586
+ });
484
587
  readonly kind = AstNodeKind.ClassStatement;
588
+ readonly tokens: {
589
+ readonly class?: Token;
590
+ /**
591
+ * The name of the class (without namespace prefix)
592
+ */
593
+ readonly name: Identifier;
594
+ readonly endClass?: Token;
595
+ readonly extends?: Token;
596
+ };
597
+ readonly body: Statement[];
598
+ readonly parentClassName: TypeExpression;
485
599
  getName(parseMode: ParseMode): string;
486
600
  getLeadingTrivia(): Token[];
487
- memberMap: Record<string, MemberStatement>;
488
- methods: MethodStatement[];
489
- fields: FieldStatement[];
601
+ readonly memberMap: Record<string, MemberStatement>;
602
+ readonly methods: MethodStatement[];
603
+ readonly fields: FieldStatement[];
490
604
  readonly range: Range;
491
605
  transpile(state: BrsTranspileState): any[];
492
606
  getTypedef(state: BrsTranspileState): TranspileResult;
@@ -528,10 +642,18 @@ export declare class ClassStatement extends Statement implements TypedefProvider
528
642
  getType(options: GetTypeOptions): ClassType;
529
643
  }
530
644
  export declare class MethodStatement extends FunctionStatement {
531
- override: Token;
532
- constructor(modifiers: Token | Token[], name: Identifier, func: FunctionExpression, override: Token);
645
+ constructor(options: {
646
+ modifiers?: Token | Token[];
647
+ name: Identifier;
648
+ func: FunctionExpression;
649
+ override?: Token;
650
+ });
533
651
  readonly kind: AstNodeKind;
534
- modifiers: Token[];
652
+ readonly modifiers: Token[];
653
+ readonly tokens: {
654
+ readonly name: Identifier;
655
+ readonly override?: Token;
656
+ };
535
657
  get accessModifier(): Token;
536
658
  readonly range: Range;
537
659
  /**
@@ -553,14 +675,24 @@ export declare class MethodStatement extends FunctionStatement {
553
675
  walk(visitor: WalkVisitor, options: WalkOptions): void;
554
676
  }
555
677
  export declare class FieldStatement extends Statement implements TypedefProvider {
556
- readonly accessModifier?: Token;
557
- readonly name?: Identifier;
558
- readonly as?: Token;
678
+ constructor(options: {
679
+ accessModifier?: Token;
680
+ name: Identifier;
681
+ as?: Token;
682
+ typeExpression?: TypeExpression;
683
+ equals?: Token;
684
+ initialValue?: Expression;
685
+ optional?: Token;
686
+ });
687
+ readonly tokens: {
688
+ readonly accessModifier?: Token;
689
+ readonly name: Identifier;
690
+ readonly as?: Token;
691
+ readonly equals?: Token;
692
+ readonly optional?: Token;
693
+ };
559
694
  readonly typeExpression?: TypeExpression;
560
- readonly equal?: Token;
561
695
  readonly initialValue?: Expression;
562
- readonly optional?: Token;
563
- constructor(accessModifier?: Token, name?: Identifier, as?: Token, typeExpression?: TypeExpression, equal?: Token, initialValue?: Expression, optional?: Token);
564
696
  readonly kind = AstNodeKind.FieldStatement;
565
697
  /**
566
698
  * Derive a ValueKind from the type token, or the initial value.
@@ -576,58 +708,67 @@ export declare class FieldStatement extends Statement implements TypedefProvider
576
708
  }
577
709
  export declare type MemberStatement = FieldStatement | MethodStatement;
578
710
  export declare class TryCatchStatement extends Statement {
579
- tokens: {
580
- try: Token;
711
+ constructor(options?: {
712
+ try?: Token;
581
713
  endTry?: Token;
714
+ tryBranch?: Block;
715
+ catchStatement?: CatchStatement;
716
+ });
717
+ readonly tokens: {
718
+ readonly try?: Token;
719
+ readonly endTry?: Token;
582
720
  };
583
- tryBranch?: Block;
584
- catchStatement?: CatchStatement;
585
- constructor(tokens: {
586
- try: Token;
587
- endTry?: Token;
588
- }, tryBranch?: Block, catchStatement?: CatchStatement);
721
+ readonly tryBranch: Block;
722
+ readonly catchStatement: CatchStatement;
589
723
  readonly kind = AstNodeKind.TryCatchStatement;
590
724
  readonly range: Range;
591
725
  transpile(state: BrsTranspileState): TranspileResult;
592
726
  walk(visitor: WalkVisitor, options: WalkOptions): void;
593
727
  }
594
728
  export declare class CatchStatement extends Statement {
595
- tokens: {
596
- catch: Token;
597
- };
598
- exceptionVariable?: Identifier;
599
- catchBranch?: Block;
600
- constructor(tokens: {
601
- catch: Token;
602
- }, exceptionVariable?: Identifier, catchBranch?: Block);
729
+ constructor(options?: {
730
+ catch?: Token;
731
+ exceptionVariable?: Identifier;
732
+ catchBranch?: Block;
733
+ });
734
+ readonly tokens: {
735
+ readonly catch?: Token;
736
+ readonly exceptionVariable?: Identifier;
737
+ };
738
+ readonly catchBranch?: Block;
603
739
  readonly kind = AstNodeKind.CatchStatement;
604
- range: Range;
740
+ readonly range: Range;
605
741
  transpile(state: BrsTranspileState): TranspileResult;
606
742
  walk(visitor: WalkVisitor, options: WalkOptions): void;
607
743
  }
608
744
  export declare class ThrowStatement extends Statement {
609
- throwToken: Token;
610
- expression?: Expression;
611
- constructor(throwToken: Token, expression?: Expression);
745
+ constructor(options?: {
746
+ throw?: Token;
747
+ expression?: Expression;
748
+ });
749
+ readonly tokens: {
750
+ readonly throw?: Token;
751
+ };
752
+ readonly expression?: Expression;
612
753
  readonly kind = AstNodeKind.ThrowStatement;
613
- range: Range;
754
+ readonly range: Range;
614
755
  transpile(state: BrsTranspileState): (string | SourceNode)[];
615
756
  walk(visitor: WalkVisitor, options: WalkOptions): void;
616
757
  }
617
758
  export declare class EnumStatement extends Statement implements TypedefProvider {
618
- tokens: {
619
- enum: Token;
759
+ constructor(options: {
760
+ enum?: Token;
620
761
  name: Identifier;
621
- endEnum: Token;
762
+ endEnum?: Token;
763
+ body: Array<EnumMemberStatement | CommentStatement>;
764
+ });
765
+ readonly tokens: {
766
+ readonly enum?: Token;
767
+ readonly name: Identifier;
768
+ readonly endEnum?: Token;
622
769
  };
623
- body: Array<EnumMemberStatement | CommentStatement>;
624
- constructor(tokens: {
625
- enum: Token;
626
- name: Identifier;
627
- endEnum: Token;
628
- }, body: Array<EnumMemberStatement | CommentStatement>);
770
+ readonly body: Array<EnumMemberStatement | CommentStatement>;
629
771
  readonly kind = AstNodeKind.EnumStatement;
630
- symbolTable: SymbolTable;
631
772
  get range(): Range;
632
773
  getMembers(): EnumMemberStatement[];
633
774
  getLeadingTrivia(): Token[];
@@ -651,15 +792,16 @@ export declare class EnumStatement extends Statement implements TypedefProvider
651
792
  getType(options: GetTypeOptions): EnumType;
652
793
  }
653
794
  export declare class EnumMemberStatement extends Statement implements TypedefProvider {
654
- tokens: {
795
+ constructor(options: {
655
796
  name: Identifier;
656
- equal?: Token;
797
+ equals?: Token;
798
+ value?: Expression;
799
+ });
800
+ readonly tokens: {
801
+ readonly name: Identifier;
802
+ readonly equals?: Token;
657
803
  };
658
- value?: Expression;
659
- constructor(tokens: {
660
- name: Identifier;
661
- equal?: Token;
662
- }, value?: Expression);
804
+ readonly value?: Expression;
663
805
  readonly kind = AstNodeKind.EnumMemberStatement;
664
806
  get range(): Range;
665
807
  /**
@@ -673,19 +815,20 @@ export declare class EnumMemberStatement extends Statement implements TypedefPro
673
815
  getType(options: GetTypeOptions): EnumMemberType;
674
816
  }
675
817
  export declare class ConstStatement extends Statement implements TypedefProvider {
676
- tokens: {
677
- const: Token;
818
+ constructor(options: {
819
+ const?: Token;
678
820
  name: Identifier;
679
- equals: Token;
821
+ equals?: Token;
822
+ value: Expression;
823
+ });
824
+ readonly tokens: {
825
+ readonly const: Token;
826
+ readonly name: Identifier;
827
+ readonly equals: Token;
680
828
  };
681
- value: Expression;
682
- constructor(tokens: {
683
- const: Token;
684
- name: Identifier;
685
- equals: Token;
686
- }, value: Expression);
829
+ readonly value: Expression;
687
830
  readonly kind = AstNodeKind.ConstStatement;
688
- range: Range;
831
+ readonly range: Range;
689
832
  get name(): string;
690
833
  getLeadingTrivia(): Token[];
691
834
  /**
@@ -698,16 +841,16 @@ export declare class ConstStatement extends Statement implements TypedefProvider
698
841
  getType(options: GetTypeOptions): BscType;
699
842
  }
700
843
  export declare class ContinueStatement extends Statement {
701
- tokens: {
702
- continue: Token;
703
- loopType: Token;
704
- };
705
- constructor(tokens: {
706
- continue: Token;
844
+ constructor(options: {
845
+ continue?: Token;
707
846
  loopType: Token;
708
847
  });
848
+ readonly tokens: {
849
+ readonly continue?: Token;
850
+ readonly loopType: Token;
851
+ };
709
852
  readonly kind = AstNodeKind.ContinueStatement;
710
- range: Range;
853
+ readonly range: Range;
711
854
  transpile(state: BrsTranspileState): (string | SourceNode)[];
712
855
  walk(visitor: WalkVisitor, options: WalkOptions): void;
713
856
  }