brighterscript 1.0.0-alpha.26 → 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.
- package/CHANGELOG.md +21 -5
- package/dist/AstValidationSegmenter.d.ts +1 -1
- package/dist/AstValidationSegmenter.js +2 -3
- package/dist/AstValidationSegmenter.js.map +1 -1
- package/dist/DiagnosticMessages.d.ts +1 -3
- package/dist/DiagnosticMessages.js +5 -8
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/Program.js +24 -25
- package/dist/Program.js.map +1 -1
- package/dist/Scope.d.ts +2 -8
- package/dist/Scope.js +20 -22
- package/dist/Scope.js.map +1 -1
- package/dist/SymbolTable.d.ts +1 -8
- package/dist/SymbolTable.js +1 -10
- package/dist/SymbolTable.js.map +1 -1
- package/dist/SymbolTableFlag.d.ts +8 -0
- package/dist/SymbolTableFlag.js +13 -0
- package/dist/SymbolTableFlag.js.map +1 -0
- package/dist/XmlScope.d.ts +1 -1
- package/dist/XmlScope.js +6 -7
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/CachedLookups.d.ts +1 -2
- package/dist/astUtils/CachedLookups.js +0 -11
- package/dist/astUtils/CachedLookups.js.map +1 -1
- package/dist/astUtils/creators.js +45 -6
- package/dist/astUtils/creators.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +2 -0
- package/dist/astUtils/reflection.js +11 -3
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +1 -1
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.js +20 -20
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
- package/dist/bscPlugin/hover/HoverProcessor.d.ts +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.js +26 -6
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -1
- package/dist/bscPlugin/hover/HoverProcessor.spec.js +74 -2
- package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +2 -3
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -1
- package/dist/bscPlugin/validation/BrsFileValidator.js +25 -26
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ScopeValidator.d.ts +6 -0
- package/dist/bscPlugin/validation/ScopeValidator.js +70 -20
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ScopeValidator.spec.js +92 -10
- package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -1
- package/dist/diagnosticUtils.d.ts +1 -1
- package/dist/files/BrsFile.Class.spec.js +4 -3
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +3 -4
- package/dist/files/BrsFile.js +19 -112
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +56 -156
- package/dist/files/BrsFile.spec.js.map +1 -1
- package/dist/files/XmlFile.d.ts +2 -3
- package/dist/files/XmlFile.js +0 -2
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/interfaces.d.ts +77 -83
- package/dist/interfaces.js +9 -9
- package/dist/interfaces.js.map +1 -1
- package/dist/parser/Expression.d.ts +85 -91
- package/dist/parser/Expression.js +50 -28
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.Class.spec.js +15 -16
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +1 -2
- package/dist/parser/Parser.js +68 -62
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.js +27 -28
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.js +49 -35
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +36 -24
- package/dist/parser/SGTypes.js +26 -55
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/Statement.d.ts +138 -139
- package/dist/parser/Statement.js +50 -37
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/tests/expression/TypeExpression.spec.js +8 -9
- package/dist/parser/tests/expression/TypeExpression.spec.js.map +1 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +9 -2
- package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
- package/dist/roku-types/data.json +70 -52
- package/dist/roku-types/index.d.ts +43 -21
- package/dist/types/ArrayType.js +1 -2
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +7 -8
- package/dist/types/ArrayType.spec.js.map +1 -1
- package/dist/types/AssociativeArrayType.js +2 -3
- package/dist/types/AssociativeArrayType.js.map +1 -1
- package/dist/types/BscType.d.ts +1 -1
- package/dist/types/BscType.js +2 -3
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/BuiltInInterfaceAdder.js +7 -8
- package/dist/types/BuiltInInterfaceAdder.js.map +1 -1
- package/dist/types/BuiltInInterfaceAdder.spec.js +31 -32
- package/dist/types/BuiltInInterfaceAdder.spec.js.map +1 -1
- package/dist/types/ClassType.spec.js +10 -11
- package/dist/types/ClassType.spec.js.map +1 -1
- package/dist/types/ComponentType.d.ts +2 -1
- package/dist/types/ComponentType.js.map +1 -1
- package/dist/types/EnumType.js +2 -3
- package/dist/types/EnumType.js.map +1 -1
- package/dist/types/InheritableType.js +3 -4
- package/dist/types/InheritableType.js.map +1 -1
- package/dist/types/InterfaceType.js +2 -3
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/InterfaceType.spec.js +3 -4
- package/dist/types/InterfaceType.spec.js.map +1 -1
- package/dist/types/ObjectType.js +1 -2
- package/dist/types/ObjectType.js.map +1 -1
- package/dist/types/ReferenceType.d.ts +1 -1
- package/dist/types/ReferenceType.spec.js +21 -22
- package/dist/types/ReferenceType.spec.js.map +1 -1
- package/dist/types/UnionType.js +3 -3
- package/dist/types/UnionType.js.map +1 -1
- package/dist/types/UnionType.spec.js +37 -38
- package/dist/types/UnionType.spec.js.map +1 -1
- package/dist/types/helper.spec.js +4 -5
- package/dist/types/helper.spec.js.map +1 -1
- package/dist/util.d.ts +3 -3
- package/dist/util.js +20 -19
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +0 -9
- package/dist/validators/ClassValidator.js +3 -46
- package/dist/validators/ClassValidator.js.map +1 -1
- 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 {
|
|
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';
|
|
@@ -26,7 +26,7 @@ export declare class EmptyStatement extends Statement {
|
|
|
26
26
|
/**
|
|
27
27
|
* Create a negative range to indicate this is an interpolated location
|
|
28
28
|
*/
|
|
29
|
-
range: Range;
|
|
29
|
+
readonly range: Range;
|
|
30
30
|
readonly kind = AstNodeKind.EmptyStatement;
|
|
31
31
|
transpile(state: BrsTranspileState): any[];
|
|
32
32
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
@@ -38,9 +38,9 @@ export declare class Body extends Statement implements TypedefProvider {
|
|
|
38
38
|
constructor(options?: {
|
|
39
39
|
statements?: Statement[];
|
|
40
40
|
});
|
|
41
|
-
statements: Statement[];
|
|
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[];
|
|
@@ -54,13 +54,13 @@ export declare class AssignmentStatement extends Statement {
|
|
|
54
54
|
as?: Token;
|
|
55
55
|
typeExpression?: TypeExpression;
|
|
56
56
|
});
|
|
57
|
-
tokens: {
|
|
58
|
-
equals?: Token;
|
|
59
|
-
name: Identifier;
|
|
60
|
-
as?: Token;
|
|
57
|
+
readonly tokens: {
|
|
58
|
+
readonly equals?: Token;
|
|
59
|
+
readonly name: Identifier;
|
|
60
|
+
readonly as?: Token;
|
|
61
61
|
};
|
|
62
|
-
value: Expression;
|
|
63
|
-
typeExpression: TypeExpression;
|
|
62
|
+
readonly value: Expression;
|
|
63
|
+
readonly typeExpression: TypeExpression;
|
|
64
64
|
readonly kind = AstNodeKind.AssignmentStatement;
|
|
65
65
|
readonly range: Range;
|
|
66
66
|
transpile(state: BrsTranspileState): TranspileResult;
|
|
@@ -93,11 +93,11 @@ export declare class CommentStatement extends Statement implements Expression, T
|
|
|
93
93
|
constructor(options: {
|
|
94
94
|
comments: Token[];
|
|
95
95
|
});
|
|
96
|
-
tokens: {
|
|
97
|
-
comments: Token[];
|
|
96
|
+
readonly tokens: {
|
|
97
|
+
readonly comments: Token[];
|
|
98
98
|
};
|
|
99
99
|
readonly kind = AstNodeKind.CommentStatement;
|
|
100
|
-
range: Range;
|
|
100
|
+
readonly range: Range;
|
|
101
101
|
get text(): string;
|
|
102
102
|
transpile(state: BrsTranspileState): any[];
|
|
103
103
|
getTypedef(state: TranspileState): any[];
|
|
@@ -108,7 +108,7 @@ export declare class ExitForStatement extends Statement {
|
|
|
108
108
|
exitFor?: Token;
|
|
109
109
|
});
|
|
110
110
|
readonly tokens: {
|
|
111
|
-
exitFor?: Token;
|
|
111
|
+
readonly exitFor?: Token;
|
|
112
112
|
};
|
|
113
113
|
readonly kind = AstNodeKind.ExitForStatement;
|
|
114
114
|
readonly range: Range;
|
|
@@ -120,7 +120,7 @@ export declare class ExitWhileStatement extends Statement {
|
|
|
120
120
|
exitWhile?: Token;
|
|
121
121
|
});
|
|
122
122
|
readonly tokens: {
|
|
123
|
-
exitWhile?: Token;
|
|
123
|
+
readonly exitWhile?: Token;
|
|
124
124
|
};
|
|
125
125
|
readonly kind = AstNodeKind.ExitWhileStatement;
|
|
126
126
|
readonly range: Range;
|
|
@@ -132,10 +132,10 @@ export declare class FunctionStatement extends Statement implements TypedefProvi
|
|
|
132
132
|
name: Identifier;
|
|
133
133
|
func: FunctionExpression;
|
|
134
134
|
});
|
|
135
|
-
tokens: {
|
|
136
|
-
name: Identifier;
|
|
135
|
+
readonly tokens: {
|
|
136
|
+
readonly name: Identifier;
|
|
137
137
|
};
|
|
138
|
-
func: FunctionExpression;
|
|
138
|
+
readonly func: FunctionExpression;
|
|
139
139
|
readonly kind: AstNodeKind;
|
|
140
140
|
readonly range: Range;
|
|
141
141
|
/**
|
|
@@ -160,10 +160,10 @@ export declare class IfStatement extends Statement {
|
|
|
160
160
|
isInline?: boolean;
|
|
161
161
|
});
|
|
162
162
|
readonly tokens: {
|
|
163
|
-
if?: Token;
|
|
164
|
-
then?: Token;
|
|
165
|
-
else?: Token;
|
|
166
|
-
endIf?: Token;
|
|
163
|
+
readonly if?: Token;
|
|
164
|
+
readonly then?: Token;
|
|
165
|
+
readonly else?: Token;
|
|
166
|
+
readonly endIf?: Token;
|
|
167
167
|
};
|
|
168
168
|
readonly condition: Expression;
|
|
169
169
|
readonly thenBranch: Block;
|
|
@@ -181,7 +181,7 @@ export declare class IncrementStatement extends Statement {
|
|
|
181
181
|
});
|
|
182
182
|
readonly value: Expression;
|
|
183
183
|
readonly tokens: {
|
|
184
|
-
operator: Token;
|
|
184
|
+
readonly operator: Token;
|
|
185
185
|
};
|
|
186
186
|
readonly kind = AstNodeKind.IncrementStatement;
|
|
187
187
|
readonly range: Range;
|
|
@@ -211,7 +211,7 @@ export declare class PrintStatement extends Statement {
|
|
|
211
211
|
expressions: Array<Expression | PrintSeparatorTab | PrintSeparatorSpace>;
|
|
212
212
|
});
|
|
213
213
|
readonly tokens: {
|
|
214
|
-
print: Token;
|
|
214
|
+
readonly print: Token;
|
|
215
215
|
};
|
|
216
216
|
readonly expressions: Array<Expression | PrintSeparatorTab | PrintSeparatorSpace>;
|
|
217
217
|
readonly kind = AstNodeKind.PrintStatement;
|
|
@@ -228,14 +228,14 @@ export declare class DimStatement extends Statement {
|
|
|
228
228
|
closingSquare?: Token;
|
|
229
229
|
});
|
|
230
230
|
readonly tokens: {
|
|
231
|
-
dim?: Token;
|
|
232
|
-
name: Identifier;
|
|
233
|
-
openingSquare?: Token;
|
|
234
|
-
closingSquare?: Token;
|
|
231
|
+
readonly dim?: Token;
|
|
232
|
+
readonly name: Identifier;
|
|
233
|
+
readonly openingSquare?: Token;
|
|
234
|
+
readonly closingSquare?: Token;
|
|
235
235
|
};
|
|
236
|
-
dimensions: Expression[];
|
|
236
|
+
readonly dimensions: Expression[];
|
|
237
237
|
readonly kind = AstNodeKind.DimStatement;
|
|
238
|
-
range: Range;
|
|
238
|
+
readonly range: Range;
|
|
239
239
|
transpile(state: BrsTranspileState): (string | SourceNode)[];
|
|
240
240
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
241
241
|
getType(options: GetTypeOptions): BscType;
|
|
@@ -246,8 +246,8 @@ export declare class GotoStatement extends Statement {
|
|
|
246
246
|
label: Token;
|
|
247
247
|
});
|
|
248
248
|
readonly tokens: {
|
|
249
|
-
goto?: Token;
|
|
250
|
-
label: Token;
|
|
249
|
+
readonly goto?: Token;
|
|
250
|
+
readonly label: Token;
|
|
251
251
|
};
|
|
252
252
|
readonly kind = AstNodeKind.GotoStatement;
|
|
253
253
|
readonly range: Range;
|
|
@@ -260,8 +260,8 @@ export declare class LabelStatement extends Statement {
|
|
|
260
260
|
colon?: Token;
|
|
261
261
|
});
|
|
262
262
|
readonly tokens: {
|
|
263
|
-
name: Token;
|
|
264
|
-
colon: Token;
|
|
263
|
+
readonly name: Token;
|
|
264
|
+
readonly colon: Token;
|
|
265
265
|
};
|
|
266
266
|
readonly kind = AstNodeKind.LabelStatement;
|
|
267
267
|
readonly range: Range;
|
|
@@ -275,7 +275,7 @@ export declare class ReturnStatement extends Statement {
|
|
|
275
275
|
value?: Expression;
|
|
276
276
|
});
|
|
277
277
|
readonly tokens: {
|
|
278
|
-
return
|
|
278
|
+
readonly return?: Token;
|
|
279
279
|
};
|
|
280
280
|
readonly value?: Expression;
|
|
281
281
|
readonly kind = AstNodeKind.ReturnStatement;
|
|
@@ -288,7 +288,7 @@ export declare class EndStatement extends Statement {
|
|
|
288
288
|
end?: Token;
|
|
289
289
|
});
|
|
290
290
|
readonly tokens: {
|
|
291
|
-
end?: Token;
|
|
291
|
+
readonly end?: Token;
|
|
292
292
|
};
|
|
293
293
|
readonly kind = AstNodeKind.EndStatement;
|
|
294
294
|
readonly range: Range;
|
|
@@ -300,7 +300,7 @@ export declare class StopStatement extends Statement {
|
|
|
300
300
|
stop?: Token;
|
|
301
301
|
});
|
|
302
302
|
readonly tokens: {
|
|
303
|
-
stop?: Token;
|
|
303
|
+
readonly stop?: Token;
|
|
304
304
|
};
|
|
305
305
|
readonly kind = AstNodeKind.StopStatement;
|
|
306
306
|
readonly range: Range;
|
|
@@ -319,15 +319,15 @@ export declare class ForStatement extends Statement {
|
|
|
319
319
|
increment?: Expression;
|
|
320
320
|
});
|
|
321
321
|
readonly tokens: {
|
|
322
|
-
for?: Token;
|
|
323
|
-
to?: Token;
|
|
324
|
-
endFor?: Token;
|
|
325
|
-
step?: Token;
|
|
322
|
+
readonly for?: Token;
|
|
323
|
+
readonly to?: Token;
|
|
324
|
+
readonly endFor?: Token;
|
|
325
|
+
readonly step?: Token;
|
|
326
326
|
};
|
|
327
|
-
counterDeclaration: AssignmentStatement;
|
|
328
|
-
finalValue: Expression;
|
|
329
|
-
body: Block;
|
|
330
|
-
increment?: Expression;
|
|
327
|
+
readonly counterDeclaration: AssignmentStatement;
|
|
328
|
+
readonly finalValue: Expression;
|
|
329
|
+
readonly body: Block;
|
|
330
|
+
readonly increment?: Expression;
|
|
331
331
|
readonly kind = AstNodeKind.ForStatement;
|
|
332
332
|
readonly range: Range;
|
|
333
333
|
transpile(state: BrsTranspileState): any[];
|
|
@@ -343,10 +343,10 @@ export declare class ForEachStatement extends Statement {
|
|
|
343
343
|
endFor?: Token;
|
|
344
344
|
});
|
|
345
345
|
readonly tokens: {
|
|
346
|
-
forEach?: Token;
|
|
347
|
-
item: Token;
|
|
348
|
-
in?: Token;
|
|
349
|
-
endFor?: Token;
|
|
346
|
+
readonly forEach?: Token;
|
|
347
|
+
readonly item: Token;
|
|
348
|
+
readonly in?: Token;
|
|
349
|
+
readonly endFor?: Token;
|
|
350
350
|
};
|
|
351
351
|
readonly body: Block;
|
|
352
352
|
readonly target: Expression;
|
|
@@ -363,8 +363,8 @@ export declare class WhileStatement extends Statement {
|
|
|
363
363
|
body: Block;
|
|
364
364
|
});
|
|
365
365
|
readonly tokens: {
|
|
366
|
-
while?: Token;
|
|
367
|
-
endWhile?: Token;
|
|
366
|
+
readonly while?: Token;
|
|
367
|
+
readonly endWhile?: Token;
|
|
368
368
|
};
|
|
369
369
|
readonly condition: Expression;
|
|
370
370
|
readonly body: Block;
|
|
@@ -381,8 +381,8 @@ export declare class DottedSetStatement extends Statement {
|
|
|
381
381
|
dot?: Token;
|
|
382
382
|
});
|
|
383
383
|
readonly tokens: {
|
|
384
|
-
name: Identifier;
|
|
385
|
-
dot?: Token;
|
|
384
|
+
readonly name: Identifier;
|
|
385
|
+
readonly dot?: Token;
|
|
386
386
|
};
|
|
387
387
|
readonly obj: Expression;
|
|
388
388
|
readonly value: Expression;
|
|
@@ -401,8 +401,8 @@ export declare class IndexedSetStatement extends Statement {
|
|
|
401
401
|
closingSquare?: Token;
|
|
402
402
|
});
|
|
403
403
|
readonly tokens: {
|
|
404
|
-
openingSquare?: Token;
|
|
405
|
-
closingSquare?: Token;
|
|
404
|
+
readonly openingSquare?: Token;
|
|
405
|
+
readonly closingSquare?: Token;
|
|
406
406
|
};
|
|
407
407
|
readonly obj: Expression;
|
|
408
408
|
readonly indexes: Expression[];
|
|
@@ -418,8 +418,8 @@ export declare class LibraryStatement extends Statement implements TypedefProvid
|
|
|
418
418
|
filePath?: Token;
|
|
419
419
|
});
|
|
420
420
|
readonly tokens: {
|
|
421
|
-
library: Token;
|
|
422
|
-
filePath?: Token;
|
|
421
|
+
readonly library: Token;
|
|
422
|
+
readonly filePath?: Token;
|
|
423
423
|
};
|
|
424
424
|
readonly kind = AstNodeKind.LibraryStatement;
|
|
425
425
|
readonly range: Range;
|
|
@@ -435,11 +435,11 @@ export declare class NamespaceStatement extends Statement implements TypedefProv
|
|
|
435
435
|
endNamespace?: Token;
|
|
436
436
|
});
|
|
437
437
|
readonly tokens: {
|
|
438
|
-
namespace?: Token;
|
|
439
|
-
endNamespace?: Token;
|
|
438
|
+
readonly namespace?: Token;
|
|
439
|
+
readonly endNamespace?: Token;
|
|
440
440
|
};
|
|
441
441
|
readonly nameExpression: VariableExpression | DottedGetExpression;
|
|
442
|
-
body: Body;
|
|
442
|
+
readonly body: Body;
|
|
443
443
|
readonly kind = AstNodeKind.NamespaceStatement;
|
|
444
444
|
/**
|
|
445
445
|
* The string name for this namespace
|
|
@@ -459,15 +459,15 @@ export declare class NamespaceStatement extends Statement implements TypedefProv
|
|
|
459
459
|
export declare class ImportStatement extends Statement implements TypedefProvider {
|
|
460
460
|
constructor(options: {
|
|
461
461
|
import?: Token;
|
|
462
|
-
|
|
462
|
+
path: Token;
|
|
463
463
|
});
|
|
464
464
|
readonly tokens: {
|
|
465
|
-
import?: Token;
|
|
466
|
-
|
|
465
|
+
readonly import?: Token;
|
|
466
|
+
readonly path: Token;
|
|
467
467
|
};
|
|
468
468
|
readonly kind = AstNodeKind.ImportStatement;
|
|
469
|
-
range: Range;
|
|
470
|
-
filePath: string;
|
|
469
|
+
readonly range: Range;
|
|
470
|
+
readonly filePath: string;
|
|
471
471
|
transpile(state: BrsTranspileState): (string | SourceNode)[];
|
|
472
472
|
/**
|
|
473
473
|
* Get the typedef for this statement
|
|
@@ -484,16 +484,16 @@ export declare class InterfaceStatement extends Statement implements TypedefProv
|
|
|
484
484
|
body: Statement[];
|
|
485
485
|
endInterface?: Token;
|
|
486
486
|
});
|
|
487
|
-
parentInterfaceName?: TypeExpression;
|
|
488
|
-
body: Statement[];
|
|
487
|
+
readonly parentInterfaceName?: TypeExpression;
|
|
488
|
+
readonly body: Statement[];
|
|
489
489
|
readonly kind = AstNodeKind.InterfaceStatement;
|
|
490
|
-
tokens: {
|
|
491
|
-
interface?: Token;
|
|
492
|
-
name: Identifier;
|
|
493
|
-
extends?: Token;
|
|
494
|
-
endInterface?: Token;
|
|
490
|
+
readonly tokens: {
|
|
491
|
+
readonly interface?: Token;
|
|
492
|
+
readonly name: Identifier;
|
|
493
|
+
readonly extends?: Token;
|
|
494
|
+
readonly endInterface?: Token;
|
|
495
495
|
};
|
|
496
|
-
range: Range;
|
|
496
|
+
readonly range: Range;
|
|
497
497
|
get fields(): InterfaceFieldStatement[];
|
|
498
498
|
get methods(): InterfaceMethodStatement[];
|
|
499
499
|
hasParentInterface(): boolean;
|
|
@@ -524,12 +524,12 @@ export declare class InterfaceFieldStatement extends Statement implements Typede
|
|
|
524
524
|
optional?: Token;
|
|
525
525
|
});
|
|
526
526
|
readonly kind = AstNodeKind.InterfaceFieldStatement;
|
|
527
|
-
typeExpression?: TypeExpression;
|
|
528
|
-
range: Range;
|
|
529
|
-
tokens: {
|
|
530
|
-
name: Identifier;
|
|
531
|
-
as: Token;
|
|
532
|
-
optional?: Token;
|
|
527
|
+
readonly typeExpression?: TypeExpression;
|
|
528
|
+
readonly range: Range;
|
|
529
|
+
readonly tokens: {
|
|
530
|
+
readonly name: Identifier;
|
|
531
|
+
readonly as: Token;
|
|
532
|
+
readonly optional?: Token;
|
|
533
533
|
};
|
|
534
534
|
getLeadingTrivia(): Token[];
|
|
535
535
|
get name(): string;
|
|
@@ -556,16 +556,16 @@ export declare class InterfaceMethodStatement extends Statement implements Typed
|
|
|
556
556
|
* Get the name of this method.
|
|
557
557
|
*/
|
|
558
558
|
getName(parseMode: ParseMode): string;
|
|
559
|
-
tokens: {
|
|
560
|
-
optional?: Token;
|
|
561
|
-
functionType: Token;
|
|
562
|
-
name: Identifier;
|
|
563
|
-
leftParen?: Token;
|
|
564
|
-
rightParen?: Token;
|
|
565
|
-
as?: Token;
|
|
566
|
-
};
|
|
567
|
-
params: FunctionParameterExpression[];
|
|
568
|
-
returnTypeExpression?: TypeExpression;
|
|
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;
|
|
566
|
+
};
|
|
567
|
+
readonly params: FunctionParameterExpression[];
|
|
568
|
+
readonly returnTypeExpression?: TypeExpression;
|
|
569
569
|
get isOptional(): boolean;
|
|
570
570
|
getLeadingTrivia(): Token[];
|
|
571
571
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
@@ -585,22 +585,22 @@ export declare class ClassStatement extends Statement implements TypedefProvider
|
|
|
585
585
|
parentClassName?: TypeExpression;
|
|
586
586
|
});
|
|
587
587
|
readonly kind = AstNodeKind.ClassStatement;
|
|
588
|
-
tokens: {
|
|
589
|
-
class?: Token;
|
|
588
|
+
readonly tokens: {
|
|
589
|
+
readonly class?: Token;
|
|
590
590
|
/**
|
|
591
591
|
* The name of the class (without namespace prefix)
|
|
592
592
|
*/
|
|
593
|
-
name: Identifier;
|
|
594
|
-
endClass?: Token;
|
|
595
|
-
extends?: Token;
|
|
593
|
+
readonly name: Identifier;
|
|
594
|
+
readonly endClass?: Token;
|
|
595
|
+
readonly extends?: Token;
|
|
596
596
|
};
|
|
597
597
|
readonly body: Statement[];
|
|
598
598
|
readonly parentClassName: TypeExpression;
|
|
599
599
|
getName(parseMode: ParseMode): string;
|
|
600
600
|
getLeadingTrivia(): Token[];
|
|
601
|
-
memberMap: Record<string, MemberStatement>;
|
|
602
|
-
methods: MethodStatement[];
|
|
603
|
-
fields: FieldStatement[];
|
|
601
|
+
readonly memberMap: Record<string, MemberStatement>;
|
|
602
|
+
readonly methods: MethodStatement[];
|
|
603
|
+
readonly fields: FieldStatement[];
|
|
604
604
|
readonly range: Range;
|
|
605
605
|
transpile(state: BrsTranspileState): any[];
|
|
606
606
|
getTypedef(state: BrsTranspileState): TranspileResult;
|
|
@@ -649,10 +649,10 @@ export declare class MethodStatement extends FunctionStatement {
|
|
|
649
649
|
override?: Token;
|
|
650
650
|
});
|
|
651
651
|
readonly kind: AstNodeKind;
|
|
652
|
-
modifiers: Token[];
|
|
652
|
+
readonly modifiers: Token[];
|
|
653
653
|
readonly tokens: {
|
|
654
|
-
name: Identifier;
|
|
655
|
-
override?: Token;
|
|
654
|
+
readonly name: Identifier;
|
|
655
|
+
readonly override?: Token;
|
|
656
656
|
};
|
|
657
657
|
get accessModifier(): Token;
|
|
658
658
|
readonly range: Range;
|
|
@@ -685,14 +685,14 @@ export declare class FieldStatement extends Statement implements TypedefProvider
|
|
|
685
685
|
optional?: Token;
|
|
686
686
|
});
|
|
687
687
|
readonly tokens: {
|
|
688
|
-
accessModifier?: Token;
|
|
689
|
-
name: Identifier;
|
|
690
|
-
as?: Token;
|
|
691
|
-
equals?: Token;
|
|
692
|
-
optional?: Token;
|
|
693
|
-
};
|
|
694
|
-
typeExpression?: TypeExpression;
|
|
695
|
-
initialValue?: Expression;
|
|
688
|
+
readonly accessModifier?: Token;
|
|
689
|
+
readonly name: Identifier;
|
|
690
|
+
readonly as?: Token;
|
|
691
|
+
readonly equals?: Token;
|
|
692
|
+
readonly optional?: Token;
|
|
693
|
+
};
|
|
694
|
+
readonly typeExpression?: TypeExpression;
|
|
695
|
+
readonly initialValue?: Expression;
|
|
696
696
|
readonly kind = AstNodeKind.FieldStatement;
|
|
697
697
|
/**
|
|
698
698
|
* Derive a ValueKind from the type token, or the initial value.
|
|
@@ -715,11 +715,11 @@ export declare class TryCatchStatement extends Statement {
|
|
|
715
715
|
catchStatement?: CatchStatement;
|
|
716
716
|
});
|
|
717
717
|
readonly tokens: {
|
|
718
|
-
try?: Token;
|
|
719
|
-
endTry?: Token;
|
|
718
|
+
readonly try?: Token;
|
|
719
|
+
readonly endTry?: Token;
|
|
720
720
|
};
|
|
721
|
-
tryBranch: Block;
|
|
722
|
-
catchStatement: CatchStatement;
|
|
721
|
+
readonly tryBranch: Block;
|
|
722
|
+
readonly catchStatement: CatchStatement;
|
|
723
723
|
readonly kind = AstNodeKind.TryCatchStatement;
|
|
724
724
|
readonly range: Range;
|
|
725
725
|
transpile(state: BrsTranspileState): TranspileResult;
|
|
@@ -732,12 +732,12 @@ export declare class CatchStatement extends Statement {
|
|
|
732
732
|
catchBranch?: Block;
|
|
733
733
|
});
|
|
734
734
|
readonly tokens: {
|
|
735
|
-
catch?: Token;
|
|
736
|
-
exceptionVariable?: Identifier;
|
|
735
|
+
readonly catch?: Token;
|
|
736
|
+
readonly exceptionVariable?: Identifier;
|
|
737
737
|
};
|
|
738
|
-
catchBranch?: Block;
|
|
738
|
+
readonly catchBranch?: Block;
|
|
739
739
|
readonly kind = AstNodeKind.CatchStatement;
|
|
740
|
-
range: Range;
|
|
740
|
+
readonly range: Range;
|
|
741
741
|
transpile(state: BrsTranspileState): TranspileResult;
|
|
742
742
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
743
743
|
}
|
|
@@ -747,11 +747,11 @@ export declare class ThrowStatement extends Statement {
|
|
|
747
747
|
expression?: Expression;
|
|
748
748
|
});
|
|
749
749
|
readonly tokens: {
|
|
750
|
-
throw?: Token;
|
|
750
|
+
readonly throw?: Token;
|
|
751
751
|
};
|
|
752
|
-
expression?: Expression;
|
|
752
|
+
readonly expression?: Expression;
|
|
753
753
|
readonly kind = AstNodeKind.ThrowStatement;
|
|
754
|
-
range: Range;
|
|
754
|
+
readonly range: Range;
|
|
755
755
|
transpile(state: BrsTranspileState): (string | SourceNode)[];
|
|
756
756
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
757
757
|
}
|
|
@@ -762,14 +762,13 @@ export declare class EnumStatement extends Statement implements TypedefProvider
|
|
|
762
762
|
endEnum?: Token;
|
|
763
763
|
body: Array<EnumMemberStatement | CommentStatement>;
|
|
764
764
|
});
|
|
765
|
-
tokens: {
|
|
766
|
-
enum?: Token;
|
|
767
|
-
name: Identifier;
|
|
768
|
-
endEnum?: Token;
|
|
765
|
+
readonly tokens: {
|
|
766
|
+
readonly enum?: Token;
|
|
767
|
+
readonly name: Identifier;
|
|
768
|
+
readonly endEnum?: Token;
|
|
769
769
|
};
|
|
770
|
-
body: Array<EnumMemberStatement | CommentStatement>;
|
|
770
|
+
readonly body: Array<EnumMemberStatement | CommentStatement>;
|
|
771
771
|
readonly kind = AstNodeKind.EnumStatement;
|
|
772
|
-
symbolTable: SymbolTable;
|
|
773
772
|
get range(): Range;
|
|
774
773
|
getMembers(): EnumMemberStatement[];
|
|
775
774
|
getLeadingTrivia(): Token[];
|
|
@@ -798,11 +797,11 @@ export declare class EnumMemberStatement extends Statement implements TypedefPro
|
|
|
798
797
|
equals?: Token;
|
|
799
798
|
value?: Expression;
|
|
800
799
|
});
|
|
801
|
-
tokens: {
|
|
802
|
-
name: Identifier;
|
|
803
|
-
equals?: Token;
|
|
800
|
+
readonly tokens: {
|
|
801
|
+
readonly name: Identifier;
|
|
802
|
+
readonly equals?: Token;
|
|
804
803
|
};
|
|
805
|
-
value?: Expression;
|
|
804
|
+
readonly value?: Expression;
|
|
806
805
|
readonly kind = AstNodeKind.EnumMemberStatement;
|
|
807
806
|
get range(): Range;
|
|
808
807
|
/**
|
|
@@ -822,14 +821,14 @@ export declare class ConstStatement extends Statement implements TypedefProvider
|
|
|
822
821
|
equals?: Token;
|
|
823
822
|
value: Expression;
|
|
824
823
|
});
|
|
825
|
-
tokens: {
|
|
826
|
-
const: Token;
|
|
827
|
-
name: Identifier;
|
|
828
|
-
equals: Token;
|
|
824
|
+
readonly tokens: {
|
|
825
|
+
readonly const: Token;
|
|
826
|
+
readonly name: Identifier;
|
|
827
|
+
readonly equals: Token;
|
|
829
828
|
};
|
|
830
|
-
value: Expression;
|
|
829
|
+
readonly value: Expression;
|
|
831
830
|
readonly kind = AstNodeKind.ConstStatement;
|
|
832
|
-
range: Range;
|
|
831
|
+
readonly range: Range;
|
|
833
832
|
get name(): string;
|
|
834
833
|
getLeadingTrivia(): Token[];
|
|
835
834
|
/**
|
|
@@ -846,12 +845,12 @@ export declare class ContinueStatement extends Statement {
|
|
|
846
845
|
continue?: Token;
|
|
847
846
|
loopType: Token;
|
|
848
847
|
});
|
|
849
|
-
tokens: {
|
|
850
|
-
continue?: Token;
|
|
851
|
-
loopType: Token;
|
|
848
|
+
readonly tokens: {
|
|
849
|
+
readonly continue?: Token;
|
|
850
|
+
readonly loopType: Token;
|
|
852
851
|
};
|
|
853
852
|
readonly kind = AstNodeKind.ContinueStatement;
|
|
854
|
-
range: Range;
|
|
853
|
+
readonly range: Range;
|
|
855
854
|
transpile(state: BrsTranspileState): (string | SourceNode)[];
|
|
856
855
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
857
856
|
}
|