brighterscript 1.0.0-alpha.10 → 1.0.0-alpha.14
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 +247 -267
- package/README.md +2 -2
- package/dist/Cache.d.ts +3 -3
- package/dist/Cache.js +10 -6
- package/dist/Cache.js.map +1 -1
- package/dist/CodeActionUtil.js.map +1 -1
- package/dist/CommentFlagProcessor.d.ts +4 -4
- package/dist/CommentFlagProcessor.js +5 -3
- package/dist/CommentFlagProcessor.js.map +1 -1
- package/dist/DependencyGraph.js.map +1 -1
- package/dist/DiagnosticFilterer.js +1 -1
- package/dist/DiagnosticFilterer.js.map +1 -1
- package/dist/LanguageServer.d.ts +1 -6
- package/dist/LanguageServer.js +5 -14
- package/dist/LanguageServer.js.map +1 -1
- package/dist/Logger.js.map +1 -1
- package/dist/PluginInterface.d.ts +3 -3
- package/dist/PluginInterface.js +3 -0
- package/dist/PluginInterface.js.map +1 -1
- package/dist/Program.d.ts +35 -20
- package/dist/Program.js +132 -67
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.js +4 -4
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +22 -13
- package/dist/Scope.js +85 -70
- package/dist/Scope.js.map +1 -1
- package/dist/SymbolTable.d.ts +1 -1
- package/dist/SymbolTable.js +2 -2
- package/dist/SymbolTable.js.map +1 -1
- package/dist/XmlScope.d.ts +2 -2
- package/dist/XmlScope.js +5 -5
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/AstEditor.d.ts +27 -0
- package/dist/astUtils/AstEditor.js +97 -0
- package/dist/astUtils/AstEditor.js.map +1 -0
- package/dist/{bscPlugin/semanticTokens/SemanticTokensProcessor.spec.d.ts → astUtils/AstEditor.spec.d.ts} +0 -0
- package/dist/astUtils/AstEditor.spec.js +133 -0
- package/dist/astUtils/AstEditor.spec.js.map +1 -0
- package/dist/astUtils/creators.spec.js +4 -4
- package/dist/astUtils/creators.spec.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +4 -2
- package/dist/astUtils/reflection.js +10 -1
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +116 -116
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/astUtils/stackedVisitor.js.map +1 -1
- package/dist/astUtils/stackedVisitor.spec.js +13 -13
- package/dist/astUtils/stackedVisitor.spec.js.map +1 -1
- package/dist/astUtils/visitors.js +1 -1
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/astUtils/visitors.spec.js +26 -26
- package/dist/astUtils/visitors.spec.js.map +1 -1
- package/dist/astUtils/xml.d.ts +1 -0
- package/dist/astUtils/xml.js +6 -1
- package/dist/astUtils/xml.js.map +1 -1
- package/dist/bscPlugin/BscPlugin.js +5 -2
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +3 -3
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +17 -17
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +8 -0
- package/dist/bscPlugin/semanticTokens/{SemanticTokensProcessor.js → BrsFileSemanticTokensProcessor.js} +13 -15
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/semanticTokens/{SemanticTokensProcessor.spec.js → BrsFileSemanticTokensProcessor.spec.js} +5 -5
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -0
- package/dist/diagnosticUtils.d.ts +1 -0
- package/dist/diagnosticUtils.js +14 -7
- package/dist/diagnosticUtils.js.map +1 -1
- package/dist/examples/plugins/removePrint.js +2 -2
- package/dist/examples/plugins/removePrint.js.map +1 -1
- package/dist/files/BrsFile.Class.spec.js +444 -269
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +17 -11
- package/dist/files/BrsFile.js +220 -153
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +620 -272
- package/dist/files/BrsFile.spec.js.map +1 -1
- package/dist/files/XmlFile.d.ts +6 -5
- package/dist/files/XmlFile.js +14 -9
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/files/XmlFile.spec.js +238 -191
- package/dist/files/XmlFile.spec.js.map +1 -1
- package/dist/files/tests/imports.spec.js +29 -27
- package/dist/files/tests/imports.spec.js.map +1 -1
- package/dist/globalCallables.d.ts +3 -1
- package/dist/globalCallables.js +198 -99
- package/dist/globalCallables.js.map +1 -1
- package/dist/index.d.ts +12 -3
- package/dist/index.js +22 -4
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +71 -10
- package/dist/lexer/Lexer.d.ts +5 -1
- package/dist/lexer/Lexer.js +52 -35
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/Lexer.spec.js +564 -534
- package/dist/lexer/Lexer.spec.js.map +1 -1
- package/dist/lexer/TokenKind.d.ts +4 -0
- package/dist/lexer/TokenKind.js +44 -1
- package/dist/lexer/TokenKind.js.map +1 -1
- package/dist/parser/Expression.d.ts +1 -1
- package/dist/parser/Expression.js +66 -66
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.Class.spec.js +107 -106
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +17 -5
- package/dist/parser/Parser.js +431 -315
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.js +418 -296
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.js +2 -2
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGParser.spec.js +22 -22
- package/dist/parser/SGParser.spec.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +3 -0
- package/dist/parser/SGTypes.js +12 -7
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/SGTypes.spec.js +84 -84
- package/dist/parser/SGTypes.spec.js.map +1 -1
- package/dist/parser/Statement.d.ts +3 -3
- package/dist/parser/Statement.js +61 -61
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/Statement.spec.js +10 -10
- package/dist/parser/Statement.spec.js.map +1 -1
- package/dist/parser/tests/Parser.spec.d.ts +3 -3
- package/dist/parser/tests/Parser.spec.js +4 -4
- package/dist/parser/tests/Parser.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/For.spec.js +58 -58
- package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.js +40 -39
- package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/If.spec.js +201 -200
- package/dist/parser/tests/controlFlow/If.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/While.spec.js +37 -37
- package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
- package/dist/parser/tests/expression/Additive.spec.js +30 -30
- package/dist/parser/tests/expression/Additive.spec.js.map +1 -1
- package/dist/parser/tests/expression/ArrayLiterals.spec.js +119 -119
- package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +141 -141
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/Boolean.spec.js +24 -24
- package/dist/parser/tests/expression/Boolean.spec.js.map +1 -1
- package/dist/parser/tests/expression/Call.spec.js +41 -40
- package/dist/parser/tests/expression/Call.spec.js.map +1 -1
- package/dist/parser/tests/expression/Exponential.spec.js +17 -17
- package/dist/parser/tests/expression/Exponential.spec.js.map +1 -1
- package/dist/parser/tests/expression/Function.spec.js +256 -256
- package/dist/parser/tests/expression/Function.spec.js.map +1 -1
- package/dist/parser/tests/expression/Indexing.spec.js +87 -87
- package/dist/parser/tests/expression/Indexing.spec.js.map +1 -1
- package/dist/parser/tests/expression/Multiplicative.spec.js +37 -37
- package/dist/parser/tests/expression/Multiplicative.spec.js.map +1 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +74 -62
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/PrefixUnary.spec.js +41 -41
- package/dist/parser/tests/expression/PrefixUnary.spec.js.map +1 -1
- package/dist/parser/tests/expression/Primary.spec.js +41 -41
- package/dist/parser/tests/expression/Primary.spec.js.map +1 -1
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +110 -2
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/Relational.spec.js +43 -43
- package/dist/parser/tests/expression/Relational.spec.js.map +1 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +6 -6
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js +18 -18
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +100 -100
- package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
- package/dist/parser/tests/statement/AssignmentOperators.spec.js +36 -36
- package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +1 -1
- package/dist/parser/tests/statement/Declaration.spec.js +44 -44
- package/dist/parser/tests/statement/Declaration.spec.js.map +1 -1
- package/dist/parser/tests/statement/Dim.spec.js +21 -21
- package/dist/parser/tests/statement/Dim.spec.js.map +1 -1
- package/dist/parser/tests/statement/Function.spec.js +198 -197
- package/dist/parser/tests/statement/Function.spec.js.map +1 -1
- package/dist/parser/tests/statement/Goto.spec.js +15 -14
- package/dist/parser/tests/statement/Goto.spec.js.map +1 -1
- package/dist/parser/tests/statement/Increment.spec.js +50 -50
- package/dist/parser/tests/statement/Increment.spec.js.map +1 -1
- package/dist/parser/tests/statement/InterfaceStatement.spec.js +14 -2
- package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/LibraryStatement.spec.js +17 -17
- package/dist/parser/tests/statement/LibraryStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Misc.spec.js +91 -90
- package/dist/parser/tests/statement/Misc.spec.js.map +1 -1
- package/dist/parser/tests/statement/PrintStatement.spec.js +34 -34
- package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.js +46 -46
- package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Set.spec.js +83 -83
- package/dist/parser/tests/statement/Set.spec.js.map +1 -1
- package/dist/parser/tests/statement/Stop.spec.js +12 -11
- package/dist/parser/tests/statement/Stop.spec.js.map +1 -1
- package/dist/parser/tests/statement/Throw.spec.js +5 -5
- package/dist/parser/tests/statement/Throw.spec.js.map +1 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +13 -13
- package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
- package/dist/preprocessor/Chunk.d.ts +1 -1
- package/dist/preprocessor/Chunk.js.map +1 -1
- package/dist/preprocessor/Manifest.d.ts +1 -1
- package/dist/preprocessor/Preprocessor.d.ts +1 -1
- package/dist/preprocessor/Preprocessor.js +8 -8
- package/dist/preprocessor/Preprocessor.js.map +1 -1
- package/dist/preprocessor/Preprocessor.spec.js +49 -49
- package/dist/preprocessor/Preprocessor.spec.js.map +1 -1
- package/dist/preprocessor/PreprocessorParser.spec.js +72 -72
- package/dist/preprocessor/PreprocessorParser.spec.js.map +1 -1
- package/dist/types/ArrayType.d.ts +8 -5
- package/dist/types/ArrayType.js +48 -12
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +69 -10
- package/dist/types/ArrayType.spec.js.map +1 -1
- package/dist/types/BooleanType.js +3 -3
- package/dist/types/BooleanType.js.map +1 -1
- package/dist/types/BooleanType.spec.js +2 -2
- package/dist/types/BooleanType.spec.js.map +1 -1
- package/dist/types/BscType.d.ts +1 -1
- package/dist/types/BscType.js +1 -1
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/CustomType.d.ts +1 -1
- package/dist/types/CustomType.js +6 -4
- package/dist/types/CustomType.js.map +1 -1
- package/dist/types/DoubleType.js +7 -7
- package/dist/types/DoubleType.js.map +1 -1
- package/dist/types/DoubleType.spec.js +2 -2
- package/dist/types/DoubleType.spec.js.map +1 -1
- package/dist/types/DynamicType.js +1 -1
- package/dist/types/DynamicType.js.map +1 -1
- package/dist/types/DynamicType.spec.js +2 -2
- package/dist/types/DynamicType.spec.js.map +1 -1
- package/dist/types/FloatType.js +7 -7
- package/dist/types/FloatType.js.map +1 -1
- package/dist/types/FloatType.spec.js +2 -2
- package/dist/types/FloatType.spec.js.map +1 -1
- package/dist/types/FunctionType.d.ts +5 -5
- package/dist/types/FunctionType.js +13 -13
- package/dist/types/FunctionType.js.map +1 -1
- package/dist/types/FunctionType.spec.js +7 -7
- package/dist/types/FunctionType.spec.js.map +1 -1
- package/dist/types/IntegerType.js +7 -7
- package/dist/types/IntegerType.js.map +1 -1
- package/dist/types/IntegerType.spec.js +2 -2
- package/dist/types/IntegerType.spec.js.map +1 -1
- package/dist/types/InterfaceType.js +3 -3
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/InterfaceType.spec.js +7 -7
- package/dist/types/InterfaceType.spec.js.map +1 -1
- package/dist/types/InvalidType.js +4 -4
- package/dist/types/InvalidType.js.map +1 -1
- package/dist/types/InvalidType.spec.js +2 -2
- package/dist/types/InvalidType.spec.js.map +1 -1
- package/dist/types/LazyType.d.ts +1 -2
- package/dist/types/LazyType.js +1 -5
- package/dist/types/LazyType.js.map +1 -1
- package/dist/types/LongIntegerType.js +8 -8
- package/dist/types/LongIntegerType.js.map +1 -1
- package/dist/types/LongIntegerType.spec.js +2 -2
- package/dist/types/LongIntegerType.spec.js.map +1 -1
- package/dist/types/ObjectType.js +3 -3
- package/dist/types/ObjectType.js.map +1 -1
- package/dist/types/ObjectType.spec.js +2 -2
- package/dist/types/ObjectType.spec.js.map +1 -1
- package/dist/types/StringType.js +3 -3
- package/dist/types/StringType.js.map +1 -1
- package/dist/types/StringType.spec.js +2 -2
- package/dist/types/StringType.spec.js.map +1 -1
- package/dist/types/UninitializedType.js +3 -3
- package/dist/types/UninitializedType.js.map +1 -1
- package/dist/types/VoidType.js +3 -3
- package/dist/types/VoidType.js.map +1 -1
- package/dist/types/VoidType.spec.js +2 -2
- package/dist/types/VoidType.spec.js.map +1 -1
- package/dist/types/helpers.js +6 -6
- package/dist/types/helpers.js.map +1 -1
- package/dist/util.d.ts +15 -9
- package/dist/util.js +104 -57
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.js +40 -40
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +10 -9
- package/dist/astUtils/index.d.ts +0 -7
- package/dist/astUtils/index.js +0 -26
- package/dist/astUtils/index.js.map +0 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.d.ts +0 -7
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js.map +0 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js.map +0 -1
- package/dist/lexer/index.d.ts +0 -3
- package/dist/lexer/index.js +0 -17
- package/dist/lexer/index.js.map +0 -1
- package/dist/parser/index.d.ts +0 -3
- package/dist/parser/index.js +0 -16
- package/dist/parser/index.js.map +0 -1
- package/dist/preprocessor/index.d.ts +0 -3
- package/dist/preprocessor/index.js +0 -16
- package/dist/preprocessor/index.js.map +0 -1
package/dist/parser/Statement.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ThrowStatement = exports.TryCatchStatement = exports.ClassFieldStatement = exports.ClassMethodStatement = exports.ClassStatement = exports.InterfaceMethodStatement = exports.InterfaceFieldStatement = exports.InterfaceStatement = exports.ImportStatement = exports.NamespaceStatement = exports.LibraryStatement = exports.IndexedSetStatement = exports.DottedSetStatement = exports.WhileStatement = exports.ForEachStatement = exports.ForStatement = exports.StopStatement = exports.EndStatement = exports.ReturnStatement = exports.LabelStatement = exports.GotoStatement = exports.DimStatement = exports.PrintStatement = exports.IncrementStatement = exports.IfStatement = exports.FunctionStatement = exports.ExitWhileStatement = exports.ExitForStatement = exports.CommentStatement = exports.ExpressionStatement = exports.Block = exports.AssignmentStatement = exports.Body = exports.EmptyStatement = exports.Statement = void 0;
|
|
4
|
-
const
|
|
4
|
+
const TokenKind_1 = require("../lexer/TokenKind");
|
|
5
5
|
const Expression_1 = require("./Expression");
|
|
6
6
|
const util_1 = require("../util");
|
|
7
7
|
const vscode_languageserver_1 = require("vscode-languageserver");
|
|
@@ -63,15 +63,15 @@ class Body extends Statement {
|
|
|
63
63
|
//this is the first statement. do nothing related to spacing and newlines
|
|
64
64
|
//if comment is on same line as prior sibling
|
|
65
65
|
}
|
|
66
|
-
else if (reflection_1.isCommentStatement(statement) && previousStatement && statement.range.start.line === previousStatement.range.end.line) {
|
|
66
|
+
else if ((0, reflection_1.isCommentStatement)(statement) && previousStatement && statement.range.start.line === previousStatement.range.end.line) {
|
|
67
67
|
result.push(' ');
|
|
68
68
|
//add double newline if this is a comment, and next is a function
|
|
69
69
|
}
|
|
70
|
-
else if (reflection_1.isCommentStatement(statement) && nextStatement && reflection_1.isFunctionStatement(nextStatement)) {
|
|
70
|
+
else if ((0, reflection_1.isCommentStatement)(statement) && nextStatement && (0, reflection_1.isFunctionStatement)(nextStatement)) {
|
|
71
71
|
result.push('\n\n');
|
|
72
72
|
//add double newline if is function not preceeded by a comment
|
|
73
73
|
}
|
|
74
|
-
else if (reflection_1.isFunctionStatement(statement) && previousStatement && !(reflection_1.isCommentStatement(previousStatement))) {
|
|
74
|
+
else if ((0, reflection_1.isFunctionStatement)(statement) && previousStatement && !((0, reflection_1.isCommentStatement)(previousStatement))) {
|
|
75
75
|
result.push('\n\n');
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
@@ -86,7 +86,7 @@ class Body extends Statement {
|
|
|
86
86
|
let result = [];
|
|
87
87
|
for (const statement of this.statements) {
|
|
88
88
|
//if the current statement supports generating typedef, call it
|
|
89
|
-
if (
|
|
89
|
+
if ((0, reflection_1.isTypedefProvider)(statement)) {
|
|
90
90
|
result.push(state.indent(), ...statement.getTypedef(state), state.newline);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -95,7 +95,7 @@ class Body extends Statement {
|
|
|
95
95
|
walk(visitor, options) {
|
|
96
96
|
if (options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
97
97
|
for (let i = 0; i < this.statements.length; i++) {
|
|
98
|
-
visitors_1.walk(this.statements, i, visitor, options, this);
|
|
98
|
+
(0, visitors_1.walk)(this.statements, i, visitor, options, this);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -113,7 +113,7 @@ class AssignmentStatement extends Statement {
|
|
|
113
113
|
transpile(state) {
|
|
114
114
|
var _a, _b;
|
|
115
115
|
//if the value is a compound assignment, just transpile the expression itself
|
|
116
|
-
if (
|
|
116
|
+
if (TokenKind_1.CompoundAssignmentOperators.includes((_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.operator) === null || _b === void 0 ? void 0 : _b.kind)) {
|
|
117
117
|
return this.value.transpile(state);
|
|
118
118
|
}
|
|
119
119
|
else {
|
|
@@ -128,7 +128,7 @@ class AssignmentStatement extends Statement {
|
|
|
128
128
|
}
|
|
129
129
|
walk(visitor, options) {
|
|
130
130
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
131
|
-
visitors_1.walk(this, 'value', visitor, options);
|
|
131
|
+
(0, visitors_1.walk)(this, 'value', visitor, options);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -149,7 +149,7 @@ class Block extends Statement {
|
|
|
149
149
|
let previousStatement = this.statements[i - 1];
|
|
150
150
|
let statement = this.statements[i];
|
|
151
151
|
//if comment is on same line as parent
|
|
152
|
-
if (reflection_1.isCommentStatement(statement) &&
|
|
152
|
+
if ((0, reflection_1.isCommentStatement)(statement) &&
|
|
153
153
|
(util_1.util.linesTouch(state.lineage[0], statement) || util_1.util.linesTouch(previousStatement, statement))) {
|
|
154
154
|
results.push(' ');
|
|
155
155
|
//is not a comment
|
|
@@ -169,7 +169,7 @@ class Block extends Statement {
|
|
|
169
169
|
walk(visitor, options) {
|
|
170
170
|
if (options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
171
171
|
for (let i = 0; i < this.statements.length; i++) {
|
|
172
|
-
visitors_1.walk(this.statements, i, visitor, options, this);
|
|
172
|
+
(0, visitors_1.walk)(this.statements, i, visitor, options, this);
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
}
|
|
@@ -186,7 +186,7 @@ class ExpressionStatement extends Statement {
|
|
|
186
186
|
}
|
|
187
187
|
walk(visitor, options) {
|
|
188
188
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
189
|
-
visitors_1.walk(this, 'expression', visitor, options);
|
|
189
|
+
(0, visitors_1.walk)(this, 'expression', visitor, options);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
}
|
|
@@ -296,7 +296,7 @@ class FunctionStatement extends Statement {
|
|
|
296
296
|
}
|
|
297
297
|
walk(visitor, options) {
|
|
298
298
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
299
|
-
visitors_1.walk(this, 'func', visitor, options);
|
|
299
|
+
(0, visitors_1.walk)(this, 'func', visitor, options);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}
|
|
@@ -341,7 +341,7 @@ class IfStatement extends Statement {
|
|
|
341
341
|
results.push(state.indent(), state.transpileToken(this.tokens.else));
|
|
342
342
|
}
|
|
343
343
|
if (this.elseBranch) {
|
|
344
|
-
if (reflection_1.isIfStatement(this.elseBranch)) {
|
|
344
|
+
if ((0, reflection_1.isIfStatement)(this.elseBranch)) {
|
|
345
345
|
//chained elseif
|
|
346
346
|
state.lineage.unshift(this.elseBranch);
|
|
347
347
|
let body = this.elseBranch.transpile(state);
|
|
@@ -379,13 +379,13 @@ class IfStatement extends Statement {
|
|
|
379
379
|
}
|
|
380
380
|
walk(visitor, options) {
|
|
381
381
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
382
|
-
visitors_1.walk(this, 'condition', visitor, options);
|
|
382
|
+
(0, visitors_1.walk)(this, 'condition', visitor, options);
|
|
383
383
|
}
|
|
384
384
|
if (options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
385
|
-
visitors_1.walk(this, 'thenBranch', visitor, options);
|
|
385
|
+
(0, visitors_1.walk)(this, 'thenBranch', visitor, options);
|
|
386
386
|
}
|
|
387
387
|
if (this.elseBranch && options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
388
|
-
visitors_1.walk(this, 'elseBranch', visitor, options);
|
|
388
|
+
(0, visitors_1.walk)(this, 'elseBranch', visitor, options);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
}
|
|
@@ -405,7 +405,7 @@ class IncrementStatement extends Statement {
|
|
|
405
405
|
}
|
|
406
406
|
walk(visitor, options) {
|
|
407
407
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
408
|
-
visitors_1.walk(this, 'value', visitor, options);
|
|
408
|
+
(0, visitors_1.walk)(this, 'value', visitor, options);
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
}
|
|
@@ -452,8 +452,8 @@ class PrintStatement extends Statement {
|
|
|
452
452
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
453
453
|
for (let i = 0; i < this.expressions.length; i++) {
|
|
454
454
|
//sometimes we have semicolon `Token`s in the expressions list (should probably fix that...), so only emit the actual expressions
|
|
455
|
-
if (reflection_1.isExpression(this.expressions[i])) {
|
|
456
|
-
visitors_1.walk(this.expressions, i, visitor, options, this);
|
|
455
|
+
if ((0, reflection_1.isExpression)(this.expressions[i])) {
|
|
456
|
+
(0, visitors_1.walk)(this.expressions, i, visitor, options, this);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
}
|
|
@@ -491,7 +491,7 @@ class DimStatement extends Statement {
|
|
|
491
491
|
var _a;
|
|
492
492
|
if (((_a = this.dimensions) === null || _a === void 0 ? void 0 : _a.length) > 0 && options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
493
493
|
for (let i = 0; i < this.dimensions.length; i++) {
|
|
494
|
-
visitors_1.walk(this.dimensions, i, visitor, options, this);
|
|
494
|
+
(0, visitors_1.walk)(this.dimensions, i, visitor, options, this);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
}
|
|
@@ -551,7 +551,7 @@ class ReturnStatement extends Statement {
|
|
|
551
551
|
}
|
|
552
552
|
walk(visitor, options) {
|
|
553
553
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
554
|
-
visitors_1.walk(this, 'value', visitor, options);
|
|
554
|
+
(0, visitors_1.walk)(this, 'value', visitor, options);
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
}
|
|
@@ -630,14 +630,14 @@ class ForStatement extends Statement {
|
|
|
630
630
|
}
|
|
631
631
|
walk(visitor, options) {
|
|
632
632
|
if (options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
633
|
-
visitors_1.walk(this, 'counterDeclaration', visitor, options);
|
|
633
|
+
(0, visitors_1.walk)(this, 'counterDeclaration', visitor, options);
|
|
634
634
|
}
|
|
635
635
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
636
|
-
visitors_1.walk(this, 'finalValue', visitor, options);
|
|
637
|
-
visitors_1.walk(this, 'increment', visitor, options);
|
|
636
|
+
(0, visitors_1.walk)(this, 'finalValue', visitor, options);
|
|
637
|
+
(0, visitors_1.walk)(this, 'increment', visitor, options);
|
|
638
638
|
}
|
|
639
639
|
if (options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
640
|
-
visitors_1.walk(this, 'body', visitor, options);
|
|
640
|
+
(0, visitors_1.walk)(this, 'body', visitor, options);
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
}
|
|
@@ -677,10 +677,10 @@ class ForEachStatement extends Statement {
|
|
|
677
677
|
}
|
|
678
678
|
walk(visitor, options) {
|
|
679
679
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
680
|
-
visitors_1.walk(this, 'target', visitor, options);
|
|
680
|
+
(0, visitors_1.walk)(this, 'target', visitor, options);
|
|
681
681
|
}
|
|
682
682
|
if (options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
683
|
-
visitors_1.walk(this, 'body', visitor, options);
|
|
683
|
+
(0, visitors_1.walk)(this, 'body', visitor, options);
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
686
|
}
|
|
@@ -713,10 +713,10 @@ class WhileStatement extends Statement {
|
|
|
713
713
|
}
|
|
714
714
|
walk(visitor, options) {
|
|
715
715
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
716
|
-
visitors_1.walk(this, 'condition', visitor, options);
|
|
716
|
+
(0, visitors_1.walk)(this, 'condition', visitor, options);
|
|
717
717
|
}
|
|
718
718
|
if (options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
719
|
-
visitors_1.walk(this, 'body', visitor, options);
|
|
719
|
+
(0, visitors_1.walk)(this, 'body', visitor, options);
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
}
|
|
@@ -732,7 +732,7 @@ class DottedSetStatement extends Statement {
|
|
|
732
732
|
transpile(state) {
|
|
733
733
|
var _a, _b;
|
|
734
734
|
//if the value is a compound assignment, don't add the obj, dot, name, or operator...the expression will handle that
|
|
735
|
-
if (
|
|
735
|
+
if (TokenKind_1.CompoundAssignmentOperators.includes((_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.operator) === null || _b === void 0 ? void 0 : _b.kind)) {
|
|
736
736
|
return this.value.transpile(state);
|
|
737
737
|
}
|
|
738
738
|
else {
|
|
@@ -750,8 +750,8 @@ class DottedSetStatement extends Statement {
|
|
|
750
750
|
}
|
|
751
751
|
walk(visitor, options) {
|
|
752
752
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
753
|
-
visitors_1.walk(this, 'obj', visitor, options);
|
|
754
|
-
visitors_1.walk(this, 'value', visitor, options);
|
|
753
|
+
(0, visitors_1.walk)(this, 'obj', visitor, options);
|
|
754
|
+
(0, visitors_1.walk)(this, 'value', visitor, options);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
757
|
}
|
|
@@ -769,7 +769,7 @@ class IndexedSetStatement extends Statement {
|
|
|
769
769
|
transpile(state) {
|
|
770
770
|
var _a, _b;
|
|
771
771
|
//if the value is a component assignment, don't add the obj, index or operator...the expression will handle that
|
|
772
|
-
if (
|
|
772
|
+
if (TokenKind_1.CompoundAssignmentOperators.includes((_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.operator) === null || _b === void 0 ? void 0 : _b.kind)) {
|
|
773
773
|
return this.value.transpile(state);
|
|
774
774
|
}
|
|
775
775
|
else {
|
|
@@ -791,9 +791,9 @@ class IndexedSetStatement extends Statement {
|
|
|
791
791
|
}
|
|
792
792
|
walk(visitor, options) {
|
|
793
793
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
794
|
-
visitors_1.walk(this, 'obj', visitor, options);
|
|
795
|
-
visitors_1.walk(this, 'index', visitor, options);
|
|
796
|
-
visitors_1.walk(this, 'value', visitor, options);
|
|
794
|
+
(0, visitors_1.walk)(this, 'obj', visitor, options);
|
|
795
|
+
(0, visitors_1.walk)(this, 'index', visitor, options);
|
|
796
|
+
(0, visitors_1.walk)(this, 'value', visitor, options);
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
}
|
|
@@ -859,10 +859,10 @@ class NamespaceStatement extends Statement {
|
|
|
859
859
|
}
|
|
860
860
|
walk(visitor, options) {
|
|
861
861
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
862
|
-
visitors_1.walk(this, 'nameExpression', visitor, options);
|
|
862
|
+
(0, visitors_1.walk)(this, 'nameExpression', visitor, options);
|
|
863
863
|
}
|
|
864
864
|
if (this.body.statements.length > 0 && options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
865
|
-
visitors_1.walk(this, 'body', visitor, options);
|
|
865
|
+
(0, visitors_1.walk)(this, 'body', visitor, options);
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
}
|
|
@@ -919,10 +919,10 @@ class InterfaceStatement extends Statement {
|
|
|
919
919
|
this.tokens.endInterface = endInterfaceToken;
|
|
920
920
|
}
|
|
921
921
|
get fields() {
|
|
922
|
-
return this.body.filter(x => reflection_1.isInterfaceFieldStatement(x));
|
|
922
|
+
return this.body.filter(x => (0, reflection_1.isInterfaceFieldStatement)(x));
|
|
923
923
|
}
|
|
924
924
|
get methods() {
|
|
925
|
-
return this.body.filter(x => reflection_1.isInterfaceMethodStatement(x));
|
|
925
|
+
return this.body.filter(x => (0, reflection_1.isInterfaceMethodStatement)(x));
|
|
926
926
|
}
|
|
927
927
|
/**
|
|
928
928
|
* The name of the interface WITH its leading namespace (if applicable)
|
|
@@ -971,7 +971,7 @@ class InterfaceStatement extends Statement {
|
|
|
971
971
|
state.blockDepth++;
|
|
972
972
|
}
|
|
973
973
|
for (const statement of body) {
|
|
974
|
-
if (reflection_1.isInterfaceMethodStatement(statement) || reflection_1.isInterfaceFieldStatement(statement)) {
|
|
974
|
+
if ((0, reflection_1.isInterfaceMethodStatement)(statement) || (0, reflection_1.isInterfaceFieldStatement)(statement)) {
|
|
975
975
|
result.push(state.newline, state.indent(), ...statement.getTypedef(state));
|
|
976
976
|
}
|
|
977
977
|
else {
|
|
@@ -987,7 +987,7 @@ class InterfaceStatement extends Statement {
|
|
|
987
987
|
walk(visitor, options) {
|
|
988
988
|
if (options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
989
989
|
for (let i = 0; i < this.body.length; i++) {
|
|
990
|
-
visitors_1.walk(this.body, i, visitor, options, this);
|
|
990
|
+
(0, visitors_1.walk)(this.body, i, visitor, options, this);
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
993
|
}
|
|
@@ -1103,11 +1103,11 @@ class ClassStatement extends Statement {
|
|
|
1103
1103
|
this.symbolTable.setParent(currentSymbolTable);
|
|
1104
1104
|
this.range = util_1.util.createRangeFromPositions(this.classKeyword.range.start, this.end.range.end);
|
|
1105
1105
|
for (let statement of this.body) {
|
|
1106
|
-
if (reflection_1.isClassMethodStatement(statement)) {
|
|
1106
|
+
if ((0, reflection_1.isClassMethodStatement)(statement)) {
|
|
1107
1107
|
this.methods.push(statement);
|
|
1108
1108
|
this.memberMap[(_b = statement === null || statement === void 0 ? void 0 : statement.name) === null || _b === void 0 ? void 0 : _b.text.toLowerCase()] = statement;
|
|
1109
1109
|
}
|
|
1110
|
-
else if (reflection_1.isClassFieldStatement(statement)) {
|
|
1110
|
+
else if ((0, reflection_1.isClassFieldStatement)(statement)) {
|
|
1111
1111
|
this.fields.push(statement);
|
|
1112
1112
|
this.memberMap[(_c = statement === null || statement === void 0 ? void 0 : statement.name) === null || _c === void 0 ? void 0 : _c.text.toLowerCase()] = statement;
|
|
1113
1113
|
}
|
|
@@ -1184,7 +1184,7 @@ class ClassStatement extends Statement {
|
|
|
1184
1184
|
result.push(state.newline);
|
|
1185
1185
|
state.blockDepth++;
|
|
1186
1186
|
for (const member of this.body) {
|
|
1187
|
-
if (
|
|
1187
|
+
if ((0, reflection_1.isTypedefProvider)(member)) {
|
|
1188
1188
|
result.push(state.indent(), ...member.getTypedef(state), state.newline);
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
@@ -1330,12 +1330,12 @@ class ClassStatement extends Statement {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
for (let statement of this.body) {
|
|
1332
1332
|
//is field statement
|
|
1333
|
-
if (reflection_1.isClassFieldStatement(statement)) {
|
|
1333
|
+
if ((0, reflection_1.isClassFieldStatement)(statement)) {
|
|
1334
1334
|
//do nothing with class fields in this situation, they are handled elsewhere
|
|
1335
1335
|
continue;
|
|
1336
1336
|
//methods
|
|
1337
1337
|
}
|
|
1338
|
-
else if (reflection_1.isClassMethodStatement(statement)) {
|
|
1338
|
+
else if ((0, reflection_1.isClassMethodStatement)(statement)) {
|
|
1339
1339
|
//store overridden parent methods as super{parentIndex}_{methodName}
|
|
1340
1340
|
if (
|
|
1341
1341
|
//is override method
|
|
@@ -1404,7 +1404,7 @@ class ClassStatement extends Statement {
|
|
|
1404
1404
|
walk(visitor, options) {
|
|
1405
1405
|
if (options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
1406
1406
|
for (let i = 0; i < this.body.length; i++) {
|
|
1407
|
-
visitors_1.walk(this.body, i, visitor, options, this);
|
|
1407
|
+
(0, visitors_1.walk)(this.body, i, visitor, options, this);
|
|
1408
1408
|
}
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
@@ -1427,7 +1427,7 @@ class ClassMethodStatement extends FunctionStatement {
|
|
|
1427
1427
|
//TODO - remove type information from these methods because that doesn't work
|
|
1428
1428
|
//convert the `super` calls into the proper methods
|
|
1429
1429
|
const parentClassIndex = state.classStatement.getParentClassIndex(state);
|
|
1430
|
-
const visitor = visitors_1.createVisitor({
|
|
1430
|
+
const visitor = (0, visitors_1.createVisitor)({
|
|
1431
1431
|
VariableExpression: e => {
|
|
1432
1432
|
if (e.name.text.toLocaleLowerCase() === 'super') {
|
|
1433
1433
|
e.name.text = `m.super${parentClassIndex}_new`;
|
|
@@ -1477,26 +1477,26 @@ class ClassMethodStatement extends FunctionStatement {
|
|
|
1477
1477
|
let firstStatement = this.func.body.statements[0];
|
|
1478
1478
|
if (
|
|
1479
1479
|
//is a call statement
|
|
1480
|
-
reflection_1.isExpressionStatement(firstStatement) && reflection_1.isCallExpression(firstStatement.expression) &&
|
|
1480
|
+
(0, reflection_1.isExpressionStatement)(firstStatement) && (0, reflection_1.isCallExpression)(firstStatement.expression) &&
|
|
1481
1481
|
//is a call to super
|
|
1482
1482
|
util_1.util.findBeginningVariableExpression(firstStatement === null || firstStatement === void 0 ? void 0 : firstStatement.expression.callee).name.text.toLowerCase() === 'super') {
|
|
1483
1483
|
return;
|
|
1484
1484
|
}
|
|
1485
1485
|
//this is a child class, and the first statement isn't a call to super. Inject one
|
|
1486
1486
|
this.func.body.statements.unshift(new ExpressionStatement(new Expression_1.CallExpression(new Expression_1.VariableExpression({
|
|
1487
|
-
kind:
|
|
1487
|
+
kind: TokenKind_1.TokenKind.Identifier,
|
|
1488
1488
|
text: 'super',
|
|
1489
1489
|
isReserved: false,
|
|
1490
1490
|
range: state.classStatement.name.range,
|
|
1491
1491
|
leadingWhitespace: ''
|
|
1492
1492
|
}, null), {
|
|
1493
|
-
kind:
|
|
1493
|
+
kind: TokenKind_1.TokenKind.LeftParen,
|
|
1494
1494
|
text: '(',
|
|
1495
1495
|
isReserved: false,
|
|
1496
1496
|
range: state.classStatement.name.range,
|
|
1497
1497
|
leadingWhitespace: ''
|
|
1498
1498
|
}, {
|
|
1499
|
-
kind:
|
|
1499
|
+
kind: TokenKind_1.TokenKind.RightParen,
|
|
1500
1500
|
text: ')',
|
|
1501
1501
|
isReserved: false,
|
|
1502
1502
|
range: state.classStatement.name.range,
|
|
@@ -1518,14 +1518,14 @@ class ClassMethodStatement extends FunctionStatement {
|
|
|
1518
1518
|
}
|
|
1519
1519
|
else {
|
|
1520
1520
|
//if there is no initial value, set the initial value to `invalid`
|
|
1521
|
-
newStatements.push(new AssignmentStatement(thisQualifiedName, creators_1.createToken(
|
|
1521
|
+
newStatements.push(new AssignmentStatement(thisQualifiedName, (0, creators_1.createToken)(TokenKind_1.TokenKind.Equal, '=', field.name.range), (0, creators_1.createInvalidLiteral)('invalid', field.name.range), this.func));
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
1524
|
this.func.body.statements.splice(startingIndex, 0, ...newStatements);
|
|
1525
1525
|
}
|
|
1526
1526
|
walk(visitor, options) {
|
|
1527
1527
|
if (options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
1528
|
-
visitors_1.walk(this, 'func', visitor, options);
|
|
1528
|
+
(0, visitors_1.walk)(this, 'func', visitor, options);
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
@@ -1551,7 +1551,7 @@ class ClassFieldStatement extends Statement {
|
|
|
1551
1551
|
if (this.type) {
|
|
1552
1552
|
return util_1.util.tokenToBscType(this.type, parseMode === Parser_1.ParseMode.BrighterScript, this.namespaceName);
|
|
1553
1553
|
}
|
|
1554
|
-
else if (reflection_1.isLiteralExpression(this.initialValue)) {
|
|
1554
|
+
else if ((0, reflection_1.isLiteralExpression)(this.initialValue)) {
|
|
1555
1555
|
return this.initialValue.type;
|
|
1556
1556
|
}
|
|
1557
1557
|
else {
|
|
@@ -1569,7 +1569,7 @@ class ClassFieldStatement extends Statement {
|
|
|
1569
1569
|
result.push(...annotation.getTypedef(state), state.newline, state.indent());
|
|
1570
1570
|
}
|
|
1571
1571
|
let type = this.getType(Parser_1.ParseMode.BrightScript);
|
|
1572
|
-
if (!type || reflection_1.isInvalidType(type) || reflection_1.isVoidType(type)) {
|
|
1572
|
+
if (!type || (0, reflection_1.isInvalidType)(type) || (0, reflection_1.isVoidType)(type)) {
|
|
1573
1573
|
type = new DynamicType_1.DynamicType();
|
|
1574
1574
|
}
|
|
1575
1575
|
result.push((_c = (_b = this.accessModifier) === null || _b === void 0 ? void 0 : _b.text) !== null && _c !== void 0 ? _c : 'public', ' ', (_d = this.name) === null || _d === void 0 ? void 0 : _d.text, ' as ', type.toTypeString());
|
|
@@ -1578,7 +1578,7 @@ class ClassFieldStatement extends Statement {
|
|
|
1578
1578
|
}
|
|
1579
1579
|
walk(visitor, options) {
|
|
1580
1580
|
if (this.initialValue && options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
1581
|
-
visitors_1.walk(this, 'initialValue', visitor, options);
|
|
1581
|
+
(0, visitors_1.walk)(this, 'initialValue', visitor, options);
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
}
|
|
@@ -1614,8 +1614,8 @@ class TryCatchStatement extends Statement {
|
|
|
1614
1614
|
}
|
|
1615
1615
|
walk(visitor, options) {
|
|
1616
1616
|
if (this.tryBranch && options.walkMode & visitors_1.InternalWalkMode.walkStatements) {
|
|
1617
|
-
visitors_1.walk(this, 'tryBranch', visitor, options);
|
|
1618
|
-
visitors_1.walk(this, 'catchBranch', visitor, options);
|
|
1617
|
+
(0, visitors_1.walk)(this, 'tryBranch', visitor, options);
|
|
1618
|
+
(0, visitors_1.walk)(this, 'catchBranch', visitor, options);
|
|
1619
1619
|
}
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
@@ -1645,7 +1645,7 @@ class ThrowStatement extends Statement {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
walk(visitor, options) {
|
|
1647
1647
|
if (this.expression && options.walkMode & visitors_1.InternalWalkMode.walkExpressions) {
|
|
1648
|
-
visitors_1.walk(this, 'expression', visitor, options);
|
|
1648
|
+
(0, visitors_1.walk)(this, 'expression', visitor, options);
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|