typescript-to-lua 1.6.1 → 1.7.0
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/dist/CompilerOptions.d.ts +1 -0
- package/dist/LuaPrinter.js +1 -0
- package/dist/cli/diagnostics.d.ts +3 -0
- package/dist/cli/diagnostics.js +2 -1
- package/dist/cli/parse.d.ts +1 -1
- package/dist/cli/parse.js +47 -11
- package/dist/lualib/ArraySlice.lua +10 -2
- package/dist/lualib/ArraySplice.lua +5 -1
- package/dist/lualib/Generator.lua +8 -1
- package/dist/lualib/ParseFloat.lua +5 -1
- package/dist/lualib/Promise.lua +6 -3
- package/dist/lualib/SparseArraySpread.lua +5 -1
- package/dist/lualib/StringCharCodeAt.lua +5 -1
- package/dist/lualib/lualib_bundle.lua +44 -10
- package/dist/lualib-build/plugin.js +1 -2
- package/dist/measure-performance.d.ts +15 -0
- package/dist/measure-performance.js +83 -0
- package/dist/transformation/builtins/array.js +2 -1
- package/dist/transformation/builtins/function.js +1 -1
- package/dist/transformation/builtins/global.d.ts +1 -1
- package/dist/transformation/builtins/global.js +13 -12
- package/dist/transformation/builtins/index.d.ts +2 -2
- package/dist/transformation/builtins/index.js +87 -89
- package/dist/transformation/builtins/object.d.ts +1 -1
- package/dist/transformation/builtins/object.js +4 -4
- package/dist/transformation/builtins/promise.js +4 -2
- package/dist/transformation/builtins/string.js +2 -0
- package/dist/transformation/context/context.d.ts +15 -0
- package/dist/transformation/context/context.js +66 -24
- package/dist/transformation/context/visitors.d.ts +1 -1
- package/dist/transformation/index.js +6 -5
- package/dist/transformation/utils/annotations.d.ts +1 -17
- package/dist/transformation/utils/annotations.js +48 -88
- package/dist/transformation/utils/assignment-validation.js +27 -23
- package/dist/transformation/utils/diagnostics.d.ts +1 -4
- package/dist/transformation/utils/diagnostics.js +2 -3
- package/dist/transformation/utils/function-context.d.ts +1 -1
- package/dist/transformation/utils/function-context.js +57 -51
- package/dist/transformation/utils/language-extensions.d.ts +57 -51
- package/dist/transformation/utils/language-extensions.js +99 -119
- package/dist/transformation/utils/lualib.d.ts +0 -1
- package/dist/transformation/utils/lualib.js +2 -8
- package/dist/transformation/utils/safe-names.d.ts +1 -1
- package/dist/transformation/utils/safe-names.js +3 -6
- package/dist/transformation/utils/scope.d.ts +0 -2
- package/dist/transformation/utils/scope.js +10 -27
- package/dist/transformation/utils/symbols.d.ts +1 -1
- package/dist/transformation/utils/symbols.js +7 -20
- package/dist/transformation/utils/typescript/index.d.ts +1 -0
- package/dist/transformation/utils/typescript/index.js +2 -1
- package/dist/transformation/utils/typescript/types.d.ts +2 -5
- package/dist/transformation/utils/typescript/types.js +27 -37
- package/dist/transformation/visitors/access.js +1 -4
- package/dist/transformation/visitors/block.js +4 -4
- package/dist/transformation/visitors/call.js +7 -18
- package/dist/transformation/visitors/class/index.js +8 -20
- package/dist/transformation/visitors/class/members/constructor.js +2 -2
- package/dist/transformation/visitors/class/new.js +2 -5
- package/dist/transformation/visitors/class/setup.d.ts +1 -1
- package/dist/transformation/visitors/class/setup.js +4 -4
- package/dist/transformation/visitors/class/utils.d.ts +1 -1
- package/dist/transformation/visitors/class/utils.js +2 -9
- package/dist/transformation/visitors/conditional.js +4 -4
- package/dist/transformation/visitors/function.d.ts +1 -1
- package/dist/transformation/visitors/function.js +8 -16
- package/dist/transformation/visitors/identifier.d.ts +1 -0
- package/dist/transformation/visitors/identifier.js +40 -44
- package/dist/transformation/visitors/language-extensions/call-extension.d.ts +10 -0
- package/dist/transformation/visitors/language-extensions/call-extension.js +23 -0
- package/dist/transformation/visitors/language-extensions/identifier.d.ts +5 -0
- package/dist/transformation/visitors/language-extensions/identifier.js +27 -0
- package/dist/transformation/visitors/language-extensions/iterable.d.ts +2 -3
- package/dist/transformation/visitors/language-extensions/iterable.js +21 -22
- package/dist/transformation/visitors/language-extensions/multi.d.ts +0 -1
- package/dist/transformation/visitors/language-extensions/multi.js +10 -24
- package/dist/transformation/visitors/language-extensions/operators.d.ts +2 -5
- package/dist/transformation/visitors/language-extensions/operators.js +89 -96
- package/dist/transformation/visitors/language-extensions/range.js +4 -2
- package/dist/transformation/visitors/language-extensions/table.d.ts +6 -3
- package/dist/transformation/visitors/language-extensions/table.js +46 -75
- package/dist/transformation/visitors/language-extensions/vararg.js +7 -3
- package/dist/transformation/visitors/literal.js +2 -23
- package/dist/transformation/visitors/loops/for-of.js +18 -18
- package/dist/transformation/visitors/loops/utils.js +5 -5
- package/dist/transformation/visitors/namespace.js +5 -14
- package/dist/transformation/visitors/return.js +2 -3
- package/dist/transformation/visitors/sourceFile.js +3 -4
- package/dist/transformation/visitors/spread.js +0 -5
- package/dist/transformation/visitors/switch.js +2 -2
- package/dist/transformation/visitors/variable-declaration.js +1 -1
- package/dist/transpilation/index.js +4 -8
- package/dist/transpilation/plugins.js +3 -0
- package/dist/transpilation/resolve.js +144 -161
- package/dist/transpilation/transpile.js +10 -0
- package/dist/transpilation/transpiler.d.ts +1 -0
- package/dist/transpilation/transpiler.js +18 -5
- package/dist/tstl.js +23 -4
- package/language-extensions/index.d.ts +156 -67
- package/package.json +2 -2
- package/dist/transformation/visitors/language-extensions/index.d.ts +0 -4
- package/dist/transformation/visitors/language-extensions/index.js +0 -17
- package/dist/transformation/visitors/language-extensions/pairsIterable.d.ts +0 -5
- package/dist/transformation/visitors/language-extensions/pairsIterable.js +0 -53
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as ts from "typescript";
|
|
2
2
|
import * as lua from "../../../LuaAST";
|
|
3
3
|
import { TransformationContext } from "../../context";
|
|
4
|
-
export declare function isIterableType(type: ts.Type): boolean;
|
|
5
|
-
export declare function returnsIterableType(context: TransformationContext, node: ts.CallExpression): boolean;
|
|
6
|
-
export declare function isIterableExpression(context: TransformationContext, expression: ts.Expression): boolean;
|
|
7
4
|
export declare function transformForOfIterableStatement(context: TransformationContext, statement: ts.ForOfStatement, block: lua.Block): lua.Statement;
|
|
5
|
+
export declare function transformForOfPairsIterableStatement(context: TransformationContext, statement: ts.ForOfStatement, block: lua.Block): lua.Statement;
|
|
6
|
+
export declare function transformForOfPairsKeyIterableStatement(context: TransformationContext, statement: ts.ForOfStatement, block: lua.Block): lua.Statement;
|
|
@@ -1,31 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.transformForOfPairsKeyIterableStatement = exports.transformForOfPairsIterableStatement = exports.transformForOfIterableStatement = void 0;
|
|
4
4
|
const ts = require("typescript");
|
|
5
5
|
const lua = require("../../../LuaAST");
|
|
6
|
-
const extensions = require("../../utils/language-extensions");
|
|
7
6
|
const utils_1 = require("../loops/utils");
|
|
8
7
|
const variable_declaration_1 = require("../variable-declaration");
|
|
9
8
|
const diagnostics_1 = require("../../utils/diagnostics");
|
|
10
9
|
const utils_2 = require("../../../utils");
|
|
11
10
|
const multi_1 = require("./multi");
|
|
12
|
-
function
|
|
13
|
-
return extensions.isExtensionType(type, extensions.ExtensionKind.IterableType);
|
|
14
|
-
}
|
|
15
|
-
exports.isIterableType = isIterableType;
|
|
16
|
-
function returnsIterableType(context, node) {
|
|
17
|
-
const signature = context.checker.getResolvedSignature(node);
|
|
18
|
-
const type = signature === null || signature === void 0 ? void 0 : signature.getReturnType();
|
|
19
|
-
return type ? isIterableType(type) : false;
|
|
20
|
-
}
|
|
21
|
-
exports.returnsIterableType = returnsIterableType;
|
|
22
|
-
function isIterableExpression(context, expression) {
|
|
23
|
-
const type = context.checker.getTypeAtLocation(expression);
|
|
24
|
-
return isIterableType(type);
|
|
25
|
-
}
|
|
26
|
-
exports.isIterableExpression = isIterableExpression;
|
|
27
|
-
function transformForOfMultiIterableStatement(context, statement, block) {
|
|
28
|
-
const luaIterator = context.transformExpression(statement.expression);
|
|
11
|
+
function transformForOfMultiIterableStatement(context, statement, block, luaIterator, invalidMultiUseDiagnostic) {
|
|
29
12
|
let identifiers = [];
|
|
30
13
|
if (ts.isVariableDeclarationList(statement.initializer)) {
|
|
31
14
|
// Variables declared in for loop
|
|
@@ -35,7 +18,7 @@ function transformForOfMultiIterableStatement(context, statement, block) {
|
|
|
35
18
|
identifiers = binding.elements.map(e => (0, variable_declaration_1.transformArrayBindingElement)(context, e));
|
|
36
19
|
}
|
|
37
20
|
else {
|
|
38
|
-
context.diagnostics.push((
|
|
21
|
+
context.diagnostics.push(invalidMultiUseDiagnostic(binding));
|
|
39
22
|
}
|
|
40
23
|
}
|
|
41
24
|
else if (ts.isArrayLiteralExpression(statement.initializer)) {
|
|
@@ -48,7 +31,7 @@ function transformForOfMultiIterableStatement(context, statement, block) {
|
|
|
48
31
|
}
|
|
49
32
|
}
|
|
50
33
|
else {
|
|
51
|
-
context.diagnostics.push((
|
|
34
|
+
context.diagnostics.push(invalidMultiUseDiagnostic(statement.initializer));
|
|
52
35
|
}
|
|
53
36
|
if (identifiers.length === 0) {
|
|
54
37
|
identifiers.push(lua.createAnonymousIdentifier());
|
|
@@ -59,11 +42,27 @@ function transformForOfIterableStatement(context, statement, block) {
|
|
|
59
42
|
var _a;
|
|
60
43
|
const type = context.checker.getTypeAtLocation(statement.expression);
|
|
61
44
|
if (((_a = type.aliasTypeArguments) === null || _a === void 0 ? void 0 : _a.length) === 2 && (0, multi_1.isMultiReturnType)(type.aliasTypeArguments[0])) {
|
|
62
|
-
|
|
45
|
+
const luaIterator = context.transformExpression(statement.expression);
|
|
46
|
+
return transformForOfMultiIterableStatement(context, statement, block, luaIterator, diagnostics_1.invalidMultiIterableWithoutDestructuring);
|
|
63
47
|
}
|
|
64
48
|
const luaIterator = context.transformExpression(statement.expression);
|
|
65
49
|
const identifier = (0, utils_1.transformForInitializer)(context, statement.initializer, block);
|
|
66
50
|
return lua.createForInStatement(block, [identifier], [luaIterator], statement);
|
|
67
51
|
}
|
|
68
52
|
exports.transformForOfIterableStatement = transformForOfIterableStatement;
|
|
53
|
+
function transformForOfPairsIterableStatement(context, statement, block) {
|
|
54
|
+
const pairsCall = lua.createCallExpression(lua.createIdentifier("pairs"), [
|
|
55
|
+
context.transformExpression(statement.expression),
|
|
56
|
+
]);
|
|
57
|
+
return transformForOfMultiIterableStatement(context, statement, block, pairsCall, diagnostics_1.invalidPairsIterableWithoutDestructuring);
|
|
58
|
+
}
|
|
59
|
+
exports.transformForOfPairsIterableStatement = transformForOfPairsIterableStatement;
|
|
60
|
+
function transformForOfPairsKeyIterableStatement(context, statement, block) {
|
|
61
|
+
const pairsCall = lua.createCallExpression(lua.createIdentifier("pairs"), [
|
|
62
|
+
context.transformExpression(statement.expression),
|
|
63
|
+
]);
|
|
64
|
+
const identifier = (0, utils_1.transformForInitializer)(context, statement.initializer, block);
|
|
65
|
+
return lua.createForInStatement(block, [identifier], [pairsCall], statement);
|
|
66
|
+
}
|
|
67
|
+
exports.transformForOfPairsKeyIterableStatement = transformForOfPairsKeyIterableStatement;
|
|
69
68
|
//# sourceMappingURL=iterable.js.map
|
|
@@ -8,4 +8,3 @@ export declare function isMultiReturnCall(context: TransformationContext, expres
|
|
|
8
8
|
export declare function isMultiFunctionNode(context: TransformationContext, node: ts.Node): boolean;
|
|
9
9
|
export declare function isInMultiReturnFunction(context: TransformationContext, node: ts.Node): boolean;
|
|
10
10
|
export declare function shouldMultiReturnCallBeWrapped(context: TransformationContext, node: ts.CallExpression): boolean;
|
|
11
|
-
export declare function findMultiAssignmentViolations(context: TransformationContext, node: ts.ObjectLiteralExpression): ts.Node[];
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.shouldMultiReturnCallBeWrapped = exports.isInMultiReturnFunction = exports.isMultiFunctionNode = exports.isMultiReturnCall = exports.returnsMultiType = exports.isMultiFunctionCall = exports.canBeMultiReturnType = exports.isMultiReturnType = void 0;
|
|
4
4
|
const ts = require("typescript");
|
|
5
5
|
const extensions = require("../../utils/language-extensions");
|
|
6
|
+
const language_extensions_1 = require("../../utils/language-extensions");
|
|
6
7
|
const typescript_1 = require("../../utils/typescript");
|
|
7
|
-
const
|
|
8
|
-
const diagnostics_1 = require("../../utils/diagnostics");
|
|
8
|
+
const multiReturnExtensionName = "__tstlMultiReturn";
|
|
9
9
|
function isMultiReturnType(type) {
|
|
10
|
-
return
|
|
10
|
+
return type.getProperty(multiReturnExtensionName) !== undefined;
|
|
11
11
|
}
|
|
12
12
|
exports.isMultiReturnType = isMultiReturnType;
|
|
13
13
|
function canBeMultiReturnType(type) {
|
|
14
|
-
return isMultiReturnType(type) || (type.isUnion() && type.types.some(canBeMultiReturnType));
|
|
14
|
+
return isMultiReturnType(type) || (type.isUnion() && type.types.some(t => canBeMultiReturnType(t)));
|
|
15
15
|
}
|
|
16
16
|
exports.canBeMultiReturnType = canBeMultiReturnType;
|
|
17
17
|
function isMultiFunctionCall(context, expression) {
|
|
@@ -29,8 +29,9 @@ function isMultiReturnCall(context, expression) {
|
|
|
29
29
|
}
|
|
30
30
|
exports.isMultiReturnCall = isMultiReturnCall;
|
|
31
31
|
function isMultiFunctionNode(context, node) {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
return (ts.isIdentifier(node) &&
|
|
33
|
+
node.text === "$multi" &&
|
|
34
|
+
(0, language_extensions_1.getExtensionKindForNode)(context, node) === extensions.ExtensionKind.MultiFunction);
|
|
34
35
|
}
|
|
35
36
|
exports.isMultiFunctionNode = isMultiFunctionNode;
|
|
36
37
|
function isInMultiReturnFunction(context, node) {
|
|
@@ -75,26 +76,11 @@ function shouldMultiReturnCallBeWrapped(context, node) {
|
|
|
75
76
|
return false;
|
|
76
77
|
}
|
|
77
78
|
// LuaIterable in for...of
|
|
78
|
-
if (ts.isForOfStatement(node.parent) &&
|
|
79
|
+
if (ts.isForOfStatement(node.parent) &&
|
|
80
|
+
(0, language_extensions_1.getIterableExtensionKindForNode)(context, node) === language_extensions_1.IterableExtensionKind.Iterable) {
|
|
79
81
|
return false;
|
|
80
82
|
}
|
|
81
83
|
return true;
|
|
82
84
|
}
|
|
83
85
|
exports.shouldMultiReturnCallBeWrapped = shouldMultiReturnCallBeWrapped;
|
|
84
|
-
function findMultiAssignmentViolations(context, node) {
|
|
85
|
-
const result = [];
|
|
86
|
-
for (const element of node.properties) {
|
|
87
|
-
if (!ts.isShorthandPropertyAssignment(element))
|
|
88
|
-
continue;
|
|
89
|
-
const valueSymbol = context.checker.getShorthandAssignmentValueSymbol(element);
|
|
90
|
-
if (valueSymbol) {
|
|
91
|
-
if (extensions.isExtensionValue(context, valueSymbol, extensions.ExtensionKind.MultiFunction)) {
|
|
92
|
-
context.diagnostics.push((0, diagnostics_1.invalidMultiFunctionUse)(element));
|
|
93
|
-
result.push(element);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return result;
|
|
98
|
-
}
|
|
99
|
-
exports.findMultiAssignmentViolations = findMultiAssignmentViolations;
|
|
100
86
|
//# sourceMappingURL=multi.js.map
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { TransformationContext } from "../../context";
|
|
4
|
-
export declare function isOperatorMapping(context: TransformationContext, node: ts.CallExpression | ts.Identifier): boolean;
|
|
5
|
-
export declare function transformOperatorMappingExpression(context: TransformationContext, node: ts.CallExpression, isOptionalCall: boolean): lua.Expression | undefined;
|
|
1
|
+
import { LanguageExtensionCallTransformerMap } from "./call-extension";
|
|
2
|
+
export declare const operatorExtensionTransformers: LanguageExtensionCallTransformerMap;
|
|
@@ -1,127 +1,120 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.operatorExtensionTransformers = void 0;
|
|
4
4
|
const ts = require("typescript");
|
|
5
5
|
const lua = require("../../../LuaAST");
|
|
6
|
-
const extensions = require("../../utils/language-extensions");
|
|
7
6
|
const utils_1 = require("../../../utils");
|
|
8
|
-
const typescript_1 = require("../../utils/typescript");
|
|
9
7
|
const CompilerOptions_1 = require("../../../CompilerOptions");
|
|
10
8
|
const diagnostics_1 = require("../../utils/diagnostics");
|
|
9
|
+
const language_extensions_1 = require("../../utils/language-extensions");
|
|
11
10
|
const binaryOperatorMappings = new Map([
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
11
|
+
[language_extensions_1.ExtensionKind.AdditionOperatorType, lua.SyntaxKind.AdditionOperator],
|
|
12
|
+
[language_extensions_1.ExtensionKind.AdditionOperatorMethodType, lua.SyntaxKind.AdditionOperator],
|
|
13
|
+
[language_extensions_1.ExtensionKind.SubtractionOperatorType, lua.SyntaxKind.SubtractionOperator],
|
|
14
|
+
[language_extensions_1.ExtensionKind.SubtractionOperatorMethodType, lua.SyntaxKind.SubtractionOperator],
|
|
15
|
+
[language_extensions_1.ExtensionKind.MultiplicationOperatorType, lua.SyntaxKind.MultiplicationOperator],
|
|
16
|
+
[language_extensions_1.ExtensionKind.MultiplicationOperatorMethodType, lua.SyntaxKind.MultiplicationOperator],
|
|
17
|
+
[language_extensions_1.ExtensionKind.DivisionOperatorType, lua.SyntaxKind.DivisionOperator],
|
|
18
|
+
[language_extensions_1.ExtensionKind.DivisionOperatorMethodType, lua.SyntaxKind.DivisionOperator],
|
|
19
|
+
[language_extensions_1.ExtensionKind.ModuloOperatorType, lua.SyntaxKind.ModuloOperator],
|
|
20
|
+
[language_extensions_1.ExtensionKind.ModuloOperatorMethodType, lua.SyntaxKind.ModuloOperator],
|
|
21
|
+
[language_extensions_1.ExtensionKind.PowerOperatorType, lua.SyntaxKind.PowerOperator],
|
|
22
|
+
[language_extensions_1.ExtensionKind.PowerOperatorMethodType, lua.SyntaxKind.PowerOperator],
|
|
23
|
+
[language_extensions_1.ExtensionKind.FloorDivisionOperatorType, lua.SyntaxKind.FloorDivisionOperator],
|
|
24
|
+
[language_extensions_1.ExtensionKind.FloorDivisionOperatorMethodType, lua.SyntaxKind.FloorDivisionOperator],
|
|
25
|
+
[language_extensions_1.ExtensionKind.BitwiseAndOperatorType, lua.SyntaxKind.BitwiseAndOperator],
|
|
26
|
+
[language_extensions_1.ExtensionKind.BitwiseAndOperatorMethodType, lua.SyntaxKind.BitwiseAndOperator],
|
|
27
|
+
[language_extensions_1.ExtensionKind.BitwiseOrOperatorType, lua.SyntaxKind.BitwiseOrOperator],
|
|
28
|
+
[language_extensions_1.ExtensionKind.BitwiseOrOperatorMethodType, lua.SyntaxKind.BitwiseOrOperator],
|
|
29
|
+
[language_extensions_1.ExtensionKind.BitwiseExclusiveOrOperatorType, lua.SyntaxKind.BitwiseExclusiveOrOperator],
|
|
30
|
+
[language_extensions_1.ExtensionKind.BitwiseExclusiveOrOperatorMethodType, lua.SyntaxKind.BitwiseExclusiveOrOperator],
|
|
31
|
+
[language_extensions_1.ExtensionKind.BitwiseLeftShiftOperatorType, lua.SyntaxKind.BitwiseLeftShiftOperator],
|
|
32
|
+
[language_extensions_1.ExtensionKind.BitwiseLeftShiftOperatorMethodType, lua.SyntaxKind.BitwiseLeftShiftOperator],
|
|
33
|
+
[language_extensions_1.ExtensionKind.BitwiseRightShiftOperatorType, lua.SyntaxKind.BitwiseRightShiftOperator],
|
|
34
|
+
[language_extensions_1.ExtensionKind.BitwiseRightShiftOperatorMethodType, lua.SyntaxKind.BitwiseRightShiftOperator],
|
|
35
|
+
[language_extensions_1.ExtensionKind.ConcatOperatorType, lua.SyntaxKind.ConcatOperator],
|
|
36
|
+
[language_extensions_1.ExtensionKind.ConcatOperatorMethodType, lua.SyntaxKind.ConcatOperator],
|
|
37
|
+
[language_extensions_1.ExtensionKind.LessThanOperatorType, lua.SyntaxKind.LessThanOperator],
|
|
38
|
+
[language_extensions_1.ExtensionKind.LessThanOperatorMethodType, lua.SyntaxKind.LessThanOperator],
|
|
39
|
+
[language_extensions_1.ExtensionKind.GreaterThanOperatorType, lua.SyntaxKind.GreaterThanOperator],
|
|
40
|
+
[language_extensions_1.ExtensionKind.GreaterThanOperatorMethodType, lua.SyntaxKind.GreaterThanOperator],
|
|
42
41
|
]);
|
|
43
42
|
const unaryOperatorMappings = new Map([
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
43
|
+
[language_extensions_1.ExtensionKind.NegationOperatorType, lua.SyntaxKind.NegationOperator],
|
|
44
|
+
[language_extensions_1.ExtensionKind.NegationOperatorMethodType, lua.SyntaxKind.NegationOperator],
|
|
45
|
+
[language_extensions_1.ExtensionKind.BitwiseNotOperatorType, lua.SyntaxKind.BitwiseNotOperator],
|
|
46
|
+
[language_extensions_1.ExtensionKind.BitwiseNotOperatorMethodType, lua.SyntaxKind.BitwiseNotOperator],
|
|
47
|
+
[language_extensions_1.ExtensionKind.LengthOperatorType, lua.SyntaxKind.LengthOperator],
|
|
48
|
+
[language_extensions_1.ExtensionKind.LengthOperatorMethodType, lua.SyntaxKind.LengthOperator],
|
|
50
49
|
]);
|
|
51
|
-
const operatorMapExtensions = [...binaryOperatorMappings.keys(), ...unaryOperatorMappings.keys()];
|
|
52
50
|
const bitwiseOperatorMapExtensions = new Set([
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
language_extensions_1.ExtensionKind.BitwiseAndOperatorType,
|
|
52
|
+
language_extensions_1.ExtensionKind.BitwiseAndOperatorMethodType,
|
|
53
|
+
language_extensions_1.ExtensionKind.BitwiseOrOperatorType,
|
|
54
|
+
language_extensions_1.ExtensionKind.BitwiseOrOperatorMethodType,
|
|
55
|
+
language_extensions_1.ExtensionKind.BitwiseExclusiveOrOperatorType,
|
|
56
|
+
language_extensions_1.ExtensionKind.BitwiseExclusiveOrOperatorMethodType,
|
|
57
|
+
language_extensions_1.ExtensionKind.BitwiseLeftShiftOperatorType,
|
|
58
|
+
language_extensions_1.ExtensionKind.BitwiseLeftShiftOperatorMethodType,
|
|
59
|
+
language_extensions_1.ExtensionKind.BitwiseRightShiftOperatorType,
|
|
60
|
+
language_extensions_1.ExtensionKind.BitwiseRightShiftOperatorMethodType,
|
|
61
|
+
language_extensions_1.ExtensionKind.BitwiseNotOperatorType,
|
|
62
|
+
language_extensions_1.ExtensionKind.BitwiseNotOperatorMethodType,
|
|
65
63
|
]);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
const requiresLua53 = new Set([
|
|
65
|
+
...bitwiseOperatorMapExtensions,
|
|
66
|
+
language_extensions_1.ExtensionKind.FloorDivisionOperatorType,
|
|
67
|
+
language_extensions_1.ExtensionKind.FloorDivisionOperatorMethodType,
|
|
68
|
+
]);
|
|
69
|
+
exports.operatorExtensionTransformers = {};
|
|
70
|
+
for (const kind of binaryOperatorMappings.keys()) {
|
|
71
|
+
exports.operatorExtensionTransformers[kind] = transformBinaryOperator;
|
|
72
|
+
}
|
|
73
|
+
for (const kind of unaryOperatorMappings.keys()) {
|
|
74
|
+
exports.operatorExtensionTransformers[kind] = transformUnaryOperator;
|
|
75
|
+
}
|
|
76
|
+
function transformBinaryOperator(context, node, kind) {
|
|
77
|
+
if (requiresLua53.has(kind))
|
|
78
|
+
checkHasLua53(context, node, kind);
|
|
79
|
+
let args = node.arguments;
|
|
80
|
+
if (args.length === 1 &&
|
|
81
|
+
(ts.isPropertyAccessExpression(node.expression) || ts.isElementAccessExpression(node.expression))) {
|
|
82
|
+
args = [node.expression.expression, ...args];
|
|
83
|
+
}
|
|
84
|
+
const luaOperator = binaryOperatorMappings.get(kind);
|
|
85
|
+
(0, utils_1.assert)(luaOperator);
|
|
86
|
+
return lua.createBinaryExpression(context.transformExpression(args[0]), context.transformExpression(args[1]), luaOperator);
|
|
69
87
|
}
|
|
70
|
-
function
|
|
71
|
-
if (
|
|
72
|
-
|
|
88
|
+
function transformUnaryOperator(context, node, kind) {
|
|
89
|
+
if (requiresLua53.has(kind))
|
|
90
|
+
checkHasLua53(context, node, kind);
|
|
91
|
+
let arg;
|
|
92
|
+
if (node.arguments.length === 0 &&
|
|
93
|
+
(ts.isPropertyAccessExpression(node.expression) || ts.isElementAccessExpression(node.expression))) {
|
|
94
|
+
arg = node.expression.expression;
|
|
73
95
|
}
|
|
74
96
|
else {
|
|
75
|
-
|
|
76
|
-
return operatorMapExtensions.some(extensionKind => extensions.isExtensionType(type, extensionKind));
|
|
97
|
+
arg = node.arguments[0];
|
|
77
98
|
}
|
|
99
|
+
const luaOperator = unaryOperatorMappings.get(kind);
|
|
100
|
+
(0, utils_1.assert)(luaOperator);
|
|
101
|
+
return lua.createUnaryExpression(context.transformExpression(arg), luaOperator);
|
|
78
102
|
}
|
|
79
|
-
|
|
80
|
-
function transformOperatorMappingExpression(context, node, isOptionalCall) {
|
|
81
|
-
const extensionKind = getOperatorMapExtensionKindForCall(context, node);
|
|
82
|
-
if (!extensionKind)
|
|
83
|
-
return undefined;
|
|
84
|
-
if (isOptionalCall) {
|
|
85
|
-
context.diagnostics.push((0, diagnostics_1.unsupportedBuiltinOptionalCall)(node));
|
|
86
|
-
return lua.createNilLiteral();
|
|
87
|
-
}
|
|
103
|
+
function checkHasLua53(context, node, kind) {
|
|
88
104
|
const isBefore53 = context.luaTarget === CompilerOptions_1.LuaTarget.Lua51 ||
|
|
89
105
|
context.luaTarget === CompilerOptions_1.LuaTarget.Lua52 ||
|
|
90
106
|
context.luaTarget === CompilerOptions_1.LuaTarget.LuaJIT ||
|
|
91
107
|
context.luaTarget === CompilerOptions_1.LuaTarget.Universal;
|
|
92
108
|
if (isBefore53) {
|
|
93
109
|
const luaTarget = context.luaTarget === CompilerOptions_1.LuaTarget.Universal ? CompilerOptions_1.LuaTarget.Lua51 : context.luaTarget;
|
|
94
|
-
if (
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
else if (extensionKind === extensions.ExtensionKind.FloorDivisionOperatorType ||
|
|
98
|
-
extensionKind === extensions.ExtensionKind.FloorDivisionOperatorMethodType) {
|
|
110
|
+
if (kind === language_extensions_1.ExtensionKind.FloorDivisionOperatorType ||
|
|
111
|
+
kind === language_extensions_1.ExtensionKind.FloorDivisionOperatorMethodType) {
|
|
99
112
|
context.diagnostics.push((0, diagnostics_1.unsupportedForTarget)(node, "Floor division operator", luaTarget));
|
|
100
113
|
}
|
|
101
|
-
}
|
|
102
|
-
const args = node.arguments.slice();
|
|
103
|
-
if (binaryOperatorMappings.has(extensionKind)) {
|
|
104
|
-
if (args.length === 1 &&
|
|
105
|
-
(ts.isPropertyAccessExpression(node.expression) || ts.isElementAccessExpression(node.expression))) {
|
|
106
|
-
args.unshift(node.expression.expression);
|
|
107
|
-
}
|
|
108
|
-
const luaOperator = binaryOperatorMappings.get(extensionKind);
|
|
109
|
-
(0, utils_1.assert)(luaOperator);
|
|
110
|
-
return lua.createBinaryExpression(context.transformExpression(args[0]), context.transformExpression(args[1]), luaOperator);
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
let arg;
|
|
114
|
-
if (args.length === 0 &&
|
|
115
|
-
(ts.isPropertyAccessExpression(node.expression) || ts.isElementAccessExpression(node.expression))) {
|
|
116
|
-
arg = node.expression.expression;
|
|
117
|
-
}
|
|
118
114
|
else {
|
|
119
|
-
|
|
115
|
+
// is bitwise operator
|
|
116
|
+
context.diagnostics.push((0, diagnostics_1.unsupportedForTarget)(node, "Native bitwise operations", luaTarget));
|
|
120
117
|
}
|
|
121
|
-
const luaOperator = unaryOperatorMappings.get(extensionKind);
|
|
122
|
-
(0, utils_1.assert)(luaOperator);
|
|
123
|
-
return lua.createUnaryExpression(context.transformExpression(arg), luaOperator);
|
|
124
118
|
}
|
|
125
119
|
}
|
|
126
|
-
exports.transformOperatorMappingExpression = transformOperatorMappingExpression;
|
|
127
120
|
//# sourceMappingURL=operators.js.map
|
|
@@ -9,13 +9,15 @@ const identifier_1 = require("../identifier");
|
|
|
9
9
|
const call_1 = require("../call");
|
|
10
10
|
const utils_2 = require("../../../utils");
|
|
11
11
|
const diagnostics_1 = require("../../utils/diagnostics");
|
|
12
|
+
const language_extensions_1 = require("../../utils/language-extensions");
|
|
12
13
|
function isRangeFunction(context, expression) {
|
|
13
14
|
return isRangeFunctionNode(context, expression.expression);
|
|
14
15
|
}
|
|
15
16
|
exports.isRangeFunction = isRangeFunction;
|
|
16
17
|
function isRangeFunctionNode(context, node) {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
return (ts.isIdentifier(node) &&
|
|
19
|
+
node.text === "$range" &&
|
|
20
|
+
(0, language_extensions_1.getExtensionKindForNode)(context, node) === extensions.ExtensionKind.RangeFunction);
|
|
19
21
|
}
|
|
20
22
|
exports.isRangeFunctionNode = isRangeFunctionNode;
|
|
21
23
|
function getControlVariable(context, statement) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as ts from "typescript";
|
|
2
|
-
import * as lua from "../../../LuaAST";
|
|
3
2
|
import { TransformationContext } from "../../context";
|
|
4
|
-
|
|
3
|
+
import { ExtensionKind } from "../../utils/language-extensions";
|
|
4
|
+
import { LanguageExtensionCallTransformer } from "./call-extension";
|
|
5
5
|
export declare function isTableNewCall(context: TransformationContext, node: ts.NewExpression): boolean;
|
|
6
|
-
export declare
|
|
6
|
+
export declare const tableNewExtensions: ExtensionKind[];
|
|
7
|
+
export declare const tableExtensionTransformers: {
|
|
8
|
+
[P in ExtensionKind]?: LanguageExtensionCallTransformer;
|
|
9
|
+
};
|
|
@@ -1,109 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.tableExtensionTransformers = exports.tableNewExtensions = exports.isTableNewCall = void 0;
|
|
4
4
|
const ts = require("typescript");
|
|
5
5
|
const lua = require("../../../LuaAST");
|
|
6
|
-
const
|
|
7
|
-
const typescript_1 = require("../../utils/typescript");
|
|
6
|
+
const language_extensions_1 = require("../../utils/language-extensions");
|
|
8
7
|
const expression_list_1 = require("../expression-list");
|
|
9
|
-
const diagnostics_1 = require("../../utils/diagnostics");
|
|
10
|
-
const tableCallExtensions = [
|
|
11
|
-
extensions.ExtensionKind.TableDeleteType,
|
|
12
|
-
extensions.ExtensionKind.TableDeleteMethodType,
|
|
13
|
-
extensions.ExtensionKind.TableGetType,
|
|
14
|
-
extensions.ExtensionKind.TableGetMethodType,
|
|
15
|
-
extensions.ExtensionKind.TableHasType,
|
|
16
|
-
extensions.ExtensionKind.TableHasMethodType,
|
|
17
|
-
extensions.ExtensionKind.TableSetType,
|
|
18
|
-
extensions.ExtensionKind.TableSetMethodType,
|
|
19
|
-
];
|
|
20
|
-
const tableExtensions = [extensions.ExtensionKind.TableNewType, ...tableCallExtensions];
|
|
21
|
-
function getTableExtensionKindForCall(context, node, validExtensions) {
|
|
22
|
-
const type = (0, typescript_1.getFunctionTypeForCall)(context, node);
|
|
23
|
-
return type && validExtensions.find(extensionKind => extensions.isExtensionType(type, extensionKind));
|
|
24
|
-
}
|
|
25
|
-
function isTableExtensionIdentifier(context, node) {
|
|
26
|
-
const type = context.checker.getTypeAtLocation(node);
|
|
27
|
-
return tableExtensions.some(extensionKind => extensions.isExtensionType(type, extensionKind));
|
|
28
|
-
}
|
|
29
|
-
exports.isTableExtensionIdentifier = isTableExtensionIdentifier;
|
|
30
8
|
function isTableNewCall(context, node) {
|
|
31
|
-
|
|
32
|
-
return extensions.isExtensionType(type, extensions.ExtensionKind.TableNewType);
|
|
9
|
+
return (0, language_extensions_1.getExtensionKindForNode)(context, node.expression) === language_extensions_1.ExtensionKind.TableNewType;
|
|
33
10
|
}
|
|
34
11
|
exports.isTableNewCall = isTableNewCall;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
extensionType === extensions.ExtensionKind.TableGetMethodType) {
|
|
49
|
-
return transformTableGetExpression(context, node, extensionType);
|
|
50
|
-
}
|
|
51
|
-
if (extensionType === extensions.ExtensionKind.TableHasType ||
|
|
52
|
-
extensionType === extensions.ExtensionKind.TableHasMethodType) {
|
|
53
|
-
return transformTableHasExpression(context, node, extensionType);
|
|
54
|
-
}
|
|
55
|
-
if (extensionType === extensions.ExtensionKind.TableSetType ||
|
|
56
|
-
extensionType === extensions.ExtensionKind.TableSetMethodType) {
|
|
57
|
-
return transformTableSetExpression(context, node, extensionType);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.transformTableExtensionCall = transformTableExtensionCall;
|
|
12
|
+
exports.tableNewExtensions = [language_extensions_1.ExtensionKind.TableNewType];
|
|
13
|
+
exports.tableExtensionTransformers = {
|
|
14
|
+
[language_extensions_1.ExtensionKind.TableDeleteType]: transformTableDeleteExpression,
|
|
15
|
+
[language_extensions_1.ExtensionKind.TableDeleteMethodType]: transformTableDeleteExpression,
|
|
16
|
+
[language_extensions_1.ExtensionKind.TableGetType]: transformTableGetExpression,
|
|
17
|
+
[language_extensions_1.ExtensionKind.TableGetMethodType]: transformTableGetExpression,
|
|
18
|
+
[language_extensions_1.ExtensionKind.TableHasType]: transformTableHasExpression,
|
|
19
|
+
[language_extensions_1.ExtensionKind.TableHasMethodType]: transformTableHasExpression,
|
|
20
|
+
[language_extensions_1.ExtensionKind.TableSetType]: transformTableSetExpression,
|
|
21
|
+
[language_extensions_1.ExtensionKind.TableSetMethodType]: transformTableSetExpression,
|
|
22
|
+
[language_extensions_1.ExtensionKind.TableAddKeyType]: transformTableAddExpression,
|
|
23
|
+
[language_extensions_1.ExtensionKind.TableAddKeyMethodType]: transformTableAddExpression,
|
|
24
|
+
};
|
|
61
25
|
function transformTableDeleteExpression(context, node, extensionKind) {
|
|
62
26
|
const args = node.arguments.slice();
|
|
63
|
-
if (extensionKind ===
|
|
27
|
+
if (extensionKind === language_extensions_1.ExtensionKind.TableDeleteMethodType &&
|
|
64
28
|
(ts.isPropertyAccessExpression(node.expression) || ts.isElementAccessExpression(node.expression))) {
|
|
65
29
|
// In case of method (no table argument), push method owner to front of args list
|
|
66
30
|
args.unshift(node.expression.expression);
|
|
67
31
|
}
|
|
68
|
-
// arg0[arg1] = nil
|
|
69
32
|
const [table, accessExpression] = (0, expression_list_1.transformExpressionList)(context, args);
|
|
33
|
+
// arg0[arg1] = nil
|
|
70
34
|
context.addPrecedingStatements(lua.createAssignmentStatement(lua.createTableIndexExpression(table, accessExpression), lua.createNilLiteral(), node));
|
|
71
35
|
return lua.createBooleanLiteral(true);
|
|
72
36
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
(ts.isPropertyAccessExpression(node.expression) || ts.isElementAccessExpression(node.expression))) {
|
|
77
|
-
// In case of method (no table argument), push method owner to front of args list
|
|
78
|
-
args.unshift(node.expression.expression);
|
|
37
|
+
function transformWithTableArgument(context, node) {
|
|
38
|
+
if (ts.isPropertyAccessExpression(node.expression) || ts.isElementAccessExpression(node.expression)) {
|
|
39
|
+
return (0, expression_list_1.transformExpressionList)(context, [node.expression.expression, ...node.arguments]);
|
|
79
40
|
}
|
|
80
|
-
|
|
41
|
+
// todo: report diagnostic?
|
|
42
|
+
return [lua.createNilLiteral(), ...(0, expression_list_1.transformExpressionList)(context, node.arguments)];
|
|
43
|
+
}
|
|
44
|
+
function transformTableGetExpression(context, node, extensionKind) {
|
|
45
|
+
const args = extensionKind === language_extensions_1.ExtensionKind.TableGetMethodType
|
|
46
|
+
? transformWithTableArgument(context, node)
|
|
47
|
+
: (0, expression_list_1.transformExpressionList)(context, node.arguments);
|
|
48
|
+
const [table, accessExpression] = args;
|
|
81
49
|
// arg0[arg1]
|
|
82
50
|
return lua.createTableIndexExpression(table, accessExpression, node);
|
|
83
51
|
}
|
|
84
52
|
function transformTableHasExpression(context, node, extensionKind) {
|
|
85
|
-
const args =
|
|
86
|
-
|
|
87
|
-
(
|
|
88
|
-
|
|
89
|
-
args.unshift(node.expression.expression);
|
|
90
|
-
}
|
|
53
|
+
const args = extensionKind === language_extensions_1.ExtensionKind.TableHasMethodType
|
|
54
|
+
? transformWithTableArgument(context, node)
|
|
55
|
+
: (0, expression_list_1.transformExpressionList)(context, node.arguments);
|
|
56
|
+
const [table, accessExpression] = args;
|
|
91
57
|
// arg0[arg1]
|
|
92
|
-
const [table, accessExpression] = (0, expression_list_1.transformExpressionList)(context, args);
|
|
93
58
|
const tableIndexExpression = lua.createTableIndexExpression(table, accessExpression);
|
|
94
59
|
// arg0[arg1] ~= nil
|
|
95
60
|
return lua.createBinaryExpression(tableIndexExpression, lua.createNilLiteral(), lua.SyntaxKind.InequalityOperator, node);
|
|
96
61
|
}
|
|
97
62
|
function transformTableSetExpression(context, node, extensionKind) {
|
|
98
|
-
const args =
|
|
99
|
-
|
|
100
|
-
(
|
|
101
|
-
|
|
102
|
-
args.unshift(node.expression.expression);
|
|
103
|
-
}
|
|
63
|
+
const args = extensionKind === language_extensions_1.ExtensionKind.TableSetMethodType
|
|
64
|
+
? transformWithTableArgument(context, node)
|
|
65
|
+
: (0, expression_list_1.transformExpressionList)(context, node.arguments);
|
|
66
|
+
const [table, accessExpression, value] = args;
|
|
104
67
|
// arg0[arg1] = arg2
|
|
105
|
-
const [table, accessExpression, value] = (0, expression_list_1.transformExpressionList)(context, args);
|
|
106
68
|
context.addPrecedingStatements(lua.createAssignmentStatement(lua.createTableIndexExpression(table, accessExpression), value, node));
|
|
107
69
|
return lua.createNilLiteral();
|
|
108
70
|
}
|
|
71
|
+
function transformTableAddExpression(context, node, extensionKind) {
|
|
72
|
+
const args = extensionKind === language_extensions_1.ExtensionKind.TableAddKeyMethodType
|
|
73
|
+
? transformWithTableArgument(context, node)
|
|
74
|
+
: (0, expression_list_1.transformExpressionList)(context, node.arguments);
|
|
75
|
+
const [table, value] = args;
|
|
76
|
+
// arg0[arg1] = true
|
|
77
|
+
context.addPrecedingStatements(lua.createAssignmentStatement(lua.createTableIndexExpression(table, value), lua.createBooleanLiteral(true), node));
|
|
78
|
+
return lua.createNilLiteral();
|
|
79
|
+
}
|
|
109
80
|
//# sourceMappingURL=table.js.map
|
|
@@ -2,15 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isVarargConstantNode = exports.isGlobalVarargConstant = void 0;
|
|
4
4
|
const extensions = require("../../utils/language-extensions");
|
|
5
|
+
const language_extensions_1 = require("../../utils/language-extensions");
|
|
5
6
|
const scope_1 = require("../../utils/scope");
|
|
6
7
|
function isGlobalVarargConstant(context, symbol, scope) {
|
|
7
|
-
return
|
|
8
|
-
extensions.isExtensionValue(context, symbol, extensions.ExtensionKind.VarargConstant));
|
|
8
|
+
return scope.type === scope_1.ScopeType.File && isVarargConstantSymbol(context, symbol);
|
|
9
9
|
}
|
|
10
10
|
exports.isGlobalVarargConstant = isGlobalVarargConstant;
|
|
11
|
+
function isVarargConstantSymbol(context, symbol) {
|
|
12
|
+
return (symbol.getName() === "$vararg" &&
|
|
13
|
+
(0, language_extensions_1.getExtensionKindForSymbol)(context, symbol) === extensions.ExtensionKind.VarargConstant);
|
|
14
|
+
}
|
|
11
15
|
function isVarargConstantNode(context, node) {
|
|
12
16
|
const symbol = context.checker.getSymbolAtLocation(node);
|
|
13
|
-
return symbol
|
|
17
|
+
return symbol !== undefined && isVarargConstantSymbol(context, symbol);
|
|
14
18
|
}
|
|
15
19
|
exports.isVarargConstantNode = isVarargConstantNode;
|
|
16
20
|
//# sourceMappingURL=vararg.js.map
|