@mojir/lits 1.2.2-alpha.1 → 1.2.2-alpha.2
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/cli/cli.js +1 -10
- package/dist/cli/src/analyze/index.d.ts +1 -2
- package/dist/cli/src/index.d.ts +0 -1
- package/dist/index.esm.js +2 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -31
- package/dist/index.js.map +1 -1
- package/dist/lits.iife.js +1 -31
- package/dist/lits.iife.js.map +1 -1
- package/dist/src/analyze/index.d.ts +1 -2
- package/dist/src/index.d.ts +0 -1
- package/dist/testFramework.esm.js +1 -10
- package/dist/testFramework.esm.js.map +1 -1
- package/dist/testFramework.js +1 -10
- package/dist/testFramework.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/cli.js
CHANGED
|
@@ -92,7 +92,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
92
92
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
var version = "1.2.2-alpha.
|
|
95
|
+
var version = "1.2.2-alpha.2";
|
|
96
96
|
|
|
97
97
|
var AstNodeType;
|
|
98
98
|
(function (AstNodeType) {
|
|
@@ -6289,15 +6289,6 @@ function evaluateNumberAsFunction(fn, params, sourceCodeInfo) {
|
|
|
6289
6289
|
return toAny(param[fn]);
|
|
6290
6290
|
}
|
|
6291
6291
|
|
|
6292
|
-
// export function findUnresolvedIdentifiersInFunction(ast, contextStack, builtin: Builtin) => {
|
|
6293
|
-
// const astNodes = Array.isArray(ast) ? ast : ast.b
|
|
6294
|
-
// const unresolvedIdentifiers = new Set<UnresolvedIdentifier>()
|
|
6295
|
-
// for (const subNode of astNodes) {
|
|
6296
|
-
// findUnresolvedIdentifiersInAstNode(subNode, contextStack, builtin)
|
|
6297
|
-
// .forEach(symbol => unresolvedIdentifiers.add(symbol))
|
|
6298
|
-
// }
|
|
6299
|
-
// return unresolvedIdentifiers
|
|
6300
|
-
// }
|
|
6301
6292
|
var findUnresolvedIdentifiers = function (ast, contextStack, builtin) {
|
|
6302
6293
|
var e_1, _a;
|
|
6303
6294
|
var astNodes = Array.isArray(ast) ? ast : ast.b;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LitsParams } from '../Lits/Lits';
|
|
2
2
|
import type { Builtin } from '../builtin/interface';
|
|
3
3
|
import { type ContextStack } from '../evaluator/ContextStack';
|
|
4
|
-
import type { Ast, AstNode
|
|
4
|
+
import type { Ast, AstNode } from '../parser/interface';
|
|
5
5
|
import type { Token } from '../tokenizer/interface';
|
|
6
6
|
export interface UnresolvedIdentifier {
|
|
7
7
|
symbol: string;
|
|
@@ -15,4 +15,3 @@ export interface Analysis {
|
|
|
15
15
|
}
|
|
16
16
|
export type FindUnresolvedIdentifiers = (ast: Ast | AstNode[], contextStack: ContextStack, builtin: Builtin) => UnresolvedIdentifiers;
|
|
17
17
|
export declare function analyze(ast: Ast, params: LitsParams): Analysis;
|
|
18
|
-
export declare function findUnresolvedIdentifiersInFunction(fun: LitsFunction, params: LitsParams): UnresolvedIdentifiers;
|
package/dist/cli/src/index.d.ts
CHANGED
|
@@ -14,4 +14,3 @@ export { apiReference, isDatatypeReference, isFunctionReference, isNormalExpress
|
|
|
14
14
|
export type { Argument, CommonReference, DatatypeReference, FunctionReference, Reference, ShorthandReference } from '../reference';
|
|
15
15
|
export type { ApiName, FunctionName, ShorthandName, DatatypeName } from '../reference/api';
|
|
16
16
|
export { isApiName, isDataType } from '../reference/api';
|
|
17
|
-
export { findUnresolvedIdentifiersInFunction } from './analyze';
|
package/dist/index.esm.js
CHANGED
|
@@ -2864,7 +2864,7 @@ var mathNormalExpression = {
|
|
|
2864
2864
|
},
|
|
2865
2865
|
};
|
|
2866
2866
|
|
|
2867
|
-
var version = "1.2.2-alpha.
|
|
2867
|
+
var version = "1.2.2-alpha.2";
|
|
2868
2868
|
|
|
2869
2869
|
var uuidTemplate = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
|
|
2870
2870
|
var xyRegexp = /[xy]/g;
|
|
@@ -6321,15 +6321,6 @@ function evaluateNumberAsFunction(fn, params, sourceCodeInfo) {
|
|
|
6321
6321
|
return toAny(param[fn]);
|
|
6322
6322
|
}
|
|
6323
6323
|
|
|
6324
|
-
// export function findUnresolvedIdentifiersInFunction(ast, contextStack, builtin: Builtin) => {
|
|
6325
|
-
// const astNodes = Array.isArray(ast) ? ast : ast.b
|
|
6326
|
-
// const unresolvedIdentifiers = new Set<UnresolvedIdentifier>()
|
|
6327
|
-
// for (const subNode of astNodes) {
|
|
6328
|
-
// findUnresolvedIdentifiersInAstNode(subNode, contextStack, builtin)
|
|
6329
|
-
// .forEach(symbol => unresolvedIdentifiers.add(symbol))
|
|
6330
|
-
// }
|
|
6331
|
-
// return unresolvedIdentifiers
|
|
6332
|
-
// }
|
|
6333
6324
|
var findUnresolvedIdentifiers = function (ast, contextStack, builtin) {
|
|
6334
6325
|
var e_1, _a;
|
|
6335
6326
|
var astNodes = Array.isArray(ast) ? ast : ast.b;
|
|
@@ -6938,26 +6929,6 @@ function analyze(ast, params) {
|
|
|
6938
6929
|
outcomes: calculateOutcomes(createContextStack(params), ast.b),
|
|
6939
6930
|
};
|
|
6940
6931
|
}
|
|
6941
|
-
function findUnresolvedIdentifiersInFunction(fun, params) {
|
|
6942
|
-
if (!isUserDefinedFunction(fun)) {
|
|
6943
|
-
return new Set();
|
|
6944
|
-
}
|
|
6945
|
-
var result = new Set();
|
|
6946
|
-
var contextStack = createContextStack(params);
|
|
6947
|
-
fun.o.forEach(function (overload) {
|
|
6948
|
-
var innerContextStack = contextStack.clone();
|
|
6949
|
-
var newContext = overload.as.mandatoryArguments.reduce(function (acc, arg) {
|
|
6950
|
-
acc[arg] = { value: null };
|
|
6951
|
-
return acc;
|
|
6952
|
-
}, {});
|
|
6953
|
-
if (overload.as.restArgument) {
|
|
6954
|
-
newContext[overload.as.restArgument] = { value: null };
|
|
6955
|
-
}
|
|
6956
|
-
var overloadSymbols = findUnresolvedIdentifiers(overload.b, innerContextStack.create(newContext), builtin);
|
|
6957
|
-
overloadSymbols.forEach(function (symbol) { return result.add(symbol); });
|
|
6958
|
-
});
|
|
6959
|
-
return result;
|
|
6960
|
-
}
|
|
6961
6932
|
|
|
6962
6933
|
function parseNumber(tokenStream, position) {
|
|
6963
6934
|
var _a;
|
|
@@ -15592,5 +15563,5 @@ function isDataType(arg) {
|
|
|
15592
15563
|
return dataTypes.includes(arg);
|
|
15593
15564
|
}
|
|
15594
15565
|
|
|
15595
|
-
export { AstNodeType, FunctionType, Lits, TokenType, apiReference, asLitsFunction, asNativeJsFunction, asUserDefinedFunction, assertLitsFunction, assertNativeJsFunction, assertUserDefinedFunction, createNativeJsFunction,
|
|
15566
|
+
export { AstNodeType, FunctionType, Lits, TokenType, apiReference, asLitsFunction, asNativeJsFunction, asUserDefinedFunction, assertLitsFunction, assertNativeJsFunction, assertUserDefinedFunction, createNativeJsFunction, isApiName, isBuiltinFunction, isDataType, isDatatypeReference, isFunctionReference, isLitsError, isLitsFunction, isNativeJsFunction, isNormalExpressionArgument, isShorthandReference, isSpecialExpressionArgument, isTypedValue, isUserDefinedFunction, normalExpressionKeys, reservedNames, specialExpressionKeys };
|
|
15596
15567
|
//# sourceMappingURL=index.esm.js.map
|