json-p3 2.2.1 → 2.2.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/json-p3.cjs.js +42 -14
- package/dist/json-p3.esm.js +42 -14
- package/dist/json-p3.iife.js +42 -14
- package/dist/json-p3.iife.min.js +1 -1
- package/dist/json-p3.iife.min.js.map +1 -1
- package/dist/path/lex.d.ts +6 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/json-p3.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* json-p3 version 2.2.
|
|
2
|
+
* json-p3 version 2.2.2
|
|
3
3
|
* https://github.com/jg-rp/json-p3
|
|
4
4
|
*
|
|
5
5
|
* MIT License
|
|
@@ -2718,7 +2718,13 @@ class Lexer {
|
|
|
2718
2718
|
* If the stack is empty, we are not in a function call. Remember that
|
|
2719
2719
|
* function arguments can use arbitrarily nested in parentheses.
|
|
2720
2720
|
*/
|
|
2721
|
-
|
|
2721
|
+
funcCallStack = [];
|
|
2722
|
+
|
|
2723
|
+
/**
|
|
2724
|
+
* A stack of parentheses and square brackets used to check for balanced
|
|
2725
|
+
* brackets.
|
|
2726
|
+
*/
|
|
2727
|
+
bracketStack = [];
|
|
2722
2728
|
|
|
2723
2729
|
/** Tokens resulting from tokenizing a JSONPath query. */
|
|
2724
2730
|
tokens = [];
|
|
@@ -2847,9 +2853,19 @@ function lex(environment, path) {
|
|
|
2847
2853
|
function tokenize(environment, path) {
|
|
2848
2854
|
const [lexer, tokens] = lex(environment, path);
|
|
2849
2855
|
lexer.run();
|
|
2856
|
+
|
|
2857
|
+
// If there's an error, it will be the last token with kind set to ERROR.
|
|
2850
2858
|
if (tokens.length && tokens[tokens.length - 1].kind === TokenKind.ERROR) {
|
|
2851
2859
|
throw new JSONPathSyntaxError(tokens[tokens.length - 1].value, tokens[tokens.length - 1]);
|
|
2852
2860
|
}
|
|
2861
|
+
|
|
2862
|
+
// If the bracket stack is not empty, we hav unbalanced brackets.
|
|
2863
|
+
// This might not be reachable.
|
|
2864
|
+
if (lexer.bracketStack.length !== 0) {
|
|
2865
|
+
const [ch, index] = lexer.bracketStack[lexer.bracketStack.length - 1];
|
|
2866
|
+
const msg = "unbalanced brackets";
|
|
2867
|
+
throw new JSONPathSyntaxError(msg, new Token(TokenKind.ERROR, ch, index, path));
|
|
2868
|
+
}
|
|
2853
2869
|
return tokens;
|
|
2854
2870
|
}
|
|
2855
2871
|
function lexRoot(l) {
|
|
@@ -2879,6 +2895,7 @@ function lexSegment(l) {
|
|
|
2879
2895
|
}
|
|
2880
2896
|
return lexDotSelector;
|
|
2881
2897
|
case "[":
|
|
2898
|
+
l.bracketStack.push(["[", l.start]);
|
|
2882
2899
|
l.emit(TokenKind.LBRACKET);
|
|
2883
2900
|
return lexInsideBracketedSelection;
|
|
2884
2901
|
default:
|
|
@@ -2935,6 +2952,7 @@ function lexDescendantSelection(l) {
|
|
|
2935
2952
|
l.emit(TokenKind.WILD);
|
|
2936
2953
|
return lexSegment;
|
|
2937
2954
|
case "[":
|
|
2955
|
+
l.bracketStack.push(["[", l.start]);
|
|
2938
2956
|
l.emit(TokenKind.LBRACKET);
|
|
2939
2957
|
return lexInsideBracketedSelection;
|
|
2940
2958
|
default:
|
|
@@ -3016,6 +3034,12 @@ function lexInsideBracketedSelection(l) {
|
|
|
3016
3034
|
const ch = l.next();
|
|
3017
3035
|
switch (ch) {
|
|
3018
3036
|
case "]":
|
|
3037
|
+
if (l.bracketStack.length === 0 || l.bracketStack[l.bracketStack.length - 1][0] !== "[") {
|
|
3038
|
+
l.backup();
|
|
3039
|
+
l.error("unbalanced brackets");
|
|
3040
|
+
return null;
|
|
3041
|
+
}
|
|
3042
|
+
l.bracketStack.pop();
|
|
3019
3043
|
l.emit(TokenKind.RBRACKET);
|
|
3020
3044
|
return lexSegment;
|
|
3021
3045
|
case "":
|
|
@@ -3057,17 +3081,13 @@ function lexInsideFilter(l) {
|
|
|
3057
3081
|
return null;
|
|
3058
3082
|
case "]":
|
|
3059
3083
|
l.filterLevel -= 1;
|
|
3060
|
-
if (l.parenStack.length === 1) {
|
|
3061
|
-
l.error("unbalanced parentheses");
|
|
3062
|
-
return null;
|
|
3063
|
-
}
|
|
3064
3084
|
l.backup();
|
|
3065
3085
|
return lexInsideBracketedSelection;
|
|
3066
3086
|
case ",":
|
|
3067
3087
|
l.emit(TokenKind.COMMA);
|
|
3068
3088
|
// If we have unbalanced parens, we are inside a function call and a
|
|
3069
3089
|
// comma separates arguments. Otherwise a comma separates selectors.
|
|
3070
|
-
if (l.
|
|
3090
|
+
if (l.funcCallStack.length) continue;
|
|
3071
3091
|
l.filterLevel -= 1;
|
|
3072
3092
|
return lexInsideBracketedSelection;
|
|
3073
3093
|
case "'":
|
|
@@ -3075,18 +3095,25 @@ function lexInsideFilter(l) {
|
|
|
3075
3095
|
case '"':
|
|
3076
3096
|
return lexDoubleQuoteStringInsideFilterExpression;
|
|
3077
3097
|
case "(":
|
|
3098
|
+
l.bracketStack.push(["(", l.start]);
|
|
3078
3099
|
l.emit(TokenKind.LPAREN);
|
|
3079
3100
|
// Are we in a function call? If so, a function argument contains parens.
|
|
3080
|
-
if (l.
|
|
3101
|
+
if (l.funcCallStack.length) l.funcCallStack[l.funcCallStack.length - 1] += 1;
|
|
3081
3102
|
continue;
|
|
3082
3103
|
case ")":
|
|
3104
|
+
if (l.bracketStack.length === 0 || l.bracketStack[l.bracketStack.length - 1][0] !== "(") {
|
|
3105
|
+
l.backup();
|
|
3106
|
+
l.error("unbalanced brackets");
|
|
3107
|
+
return null;
|
|
3108
|
+
}
|
|
3109
|
+
l.bracketStack.pop();
|
|
3083
3110
|
l.emit(TokenKind.RPAREN);
|
|
3084
3111
|
// Are we closing a function call or a parenthesized expression?
|
|
3085
|
-
if (l.
|
|
3086
|
-
if (l.
|
|
3087
|
-
l.
|
|
3112
|
+
if (l.funcCallStack.length) {
|
|
3113
|
+
if (l.funcCallStack[l.funcCallStack.length - 1] === 1) {
|
|
3114
|
+
l.funcCallStack.pop();
|
|
3088
3115
|
} else {
|
|
3089
|
-
l.
|
|
3116
|
+
l.funcCallStack[l.funcCallStack.length - 1] -= 1;
|
|
3090
3117
|
}
|
|
3091
3118
|
}
|
|
3092
3119
|
continue;
|
|
@@ -3183,8 +3210,9 @@ function lexInsideFilter(l) {
|
|
|
3183
3210
|
// functions
|
|
3184
3211
|
if (l.acceptMatchRun(functionNamePattern) && l.peek() === "(") {
|
|
3185
3212
|
// Keep track of parentheses for this function call.
|
|
3186
|
-
l.
|
|
3213
|
+
l.funcCallStack.push(1);
|
|
3187
3214
|
l.emit(TokenKind.FUNCTION);
|
|
3215
|
+
l.bracketStack.push(["(", l.start]);
|
|
3188
3216
|
l.next();
|
|
3189
3217
|
l.ignore();
|
|
3190
3218
|
continue;
|
|
@@ -5299,7 +5327,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
5299
5327
|
apply: apply
|
|
5300
5328
|
});
|
|
5301
5329
|
|
|
5302
|
-
const version = "2.2.
|
|
5330
|
+
const version = "2.2.2";
|
|
5303
5331
|
|
|
5304
5332
|
exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT;
|
|
5305
5333
|
exports.FunctionExpressionType = FunctionExpressionType;
|
package/dist/json-p3.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* json-p3 version 2.2.
|
|
2
|
+
* json-p3 version 2.2.2
|
|
3
3
|
* https://github.com/jg-rp/json-p3
|
|
4
4
|
*
|
|
5
5
|
* MIT License
|
|
@@ -2716,7 +2716,13 @@ class Lexer {
|
|
|
2716
2716
|
* If the stack is empty, we are not in a function call. Remember that
|
|
2717
2717
|
* function arguments can use arbitrarily nested in parentheses.
|
|
2718
2718
|
*/
|
|
2719
|
-
|
|
2719
|
+
funcCallStack = [];
|
|
2720
|
+
|
|
2721
|
+
/**
|
|
2722
|
+
* A stack of parentheses and square brackets used to check for balanced
|
|
2723
|
+
* brackets.
|
|
2724
|
+
*/
|
|
2725
|
+
bracketStack = [];
|
|
2720
2726
|
|
|
2721
2727
|
/** Tokens resulting from tokenizing a JSONPath query. */
|
|
2722
2728
|
tokens = [];
|
|
@@ -2845,9 +2851,19 @@ function lex(environment, path) {
|
|
|
2845
2851
|
function tokenize(environment, path) {
|
|
2846
2852
|
const [lexer, tokens] = lex(environment, path);
|
|
2847
2853
|
lexer.run();
|
|
2854
|
+
|
|
2855
|
+
// If there's an error, it will be the last token with kind set to ERROR.
|
|
2848
2856
|
if (tokens.length && tokens[tokens.length - 1].kind === TokenKind.ERROR) {
|
|
2849
2857
|
throw new JSONPathSyntaxError(tokens[tokens.length - 1].value, tokens[tokens.length - 1]);
|
|
2850
2858
|
}
|
|
2859
|
+
|
|
2860
|
+
// If the bracket stack is not empty, we hav unbalanced brackets.
|
|
2861
|
+
// This might not be reachable.
|
|
2862
|
+
if (lexer.bracketStack.length !== 0) {
|
|
2863
|
+
const [ch, index] = lexer.bracketStack[lexer.bracketStack.length - 1];
|
|
2864
|
+
const msg = "unbalanced brackets";
|
|
2865
|
+
throw new JSONPathSyntaxError(msg, new Token(TokenKind.ERROR, ch, index, path));
|
|
2866
|
+
}
|
|
2851
2867
|
return tokens;
|
|
2852
2868
|
}
|
|
2853
2869
|
function lexRoot(l) {
|
|
@@ -2877,6 +2893,7 @@ function lexSegment(l) {
|
|
|
2877
2893
|
}
|
|
2878
2894
|
return lexDotSelector;
|
|
2879
2895
|
case "[":
|
|
2896
|
+
l.bracketStack.push(["[", l.start]);
|
|
2880
2897
|
l.emit(TokenKind.LBRACKET);
|
|
2881
2898
|
return lexInsideBracketedSelection;
|
|
2882
2899
|
default:
|
|
@@ -2933,6 +2950,7 @@ function lexDescendantSelection(l) {
|
|
|
2933
2950
|
l.emit(TokenKind.WILD);
|
|
2934
2951
|
return lexSegment;
|
|
2935
2952
|
case "[":
|
|
2953
|
+
l.bracketStack.push(["[", l.start]);
|
|
2936
2954
|
l.emit(TokenKind.LBRACKET);
|
|
2937
2955
|
return lexInsideBracketedSelection;
|
|
2938
2956
|
default:
|
|
@@ -3014,6 +3032,12 @@ function lexInsideBracketedSelection(l) {
|
|
|
3014
3032
|
const ch = l.next();
|
|
3015
3033
|
switch (ch) {
|
|
3016
3034
|
case "]":
|
|
3035
|
+
if (l.bracketStack.length === 0 || l.bracketStack[l.bracketStack.length - 1][0] !== "[") {
|
|
3036
|
+
l.backup();
|
|
3037
|
+
l.error("unbalanced brackets");
|
|
3038
|
+
return null;
|
|
3039
|
+
}
|
|
3040
|
+
l.bracketStack.pop();
|
|
3017
3041
|
l.emit(TokenKind.RBRACKET);
|
|
3018
3042
|
return lexSegment;
|
|
3019
3043
|
case "":
|
|
@@ -3055,17 +3079,13 @@ function lexInsideFilter(l) {
|
|
|
3055
3079
|
return null;
|
|
3056
3080
|
case "]":
|
|
3057
3081
|
l.filterLevel -= 1;
|
|
3058
|
-
if (l.parenStack.length === 1) {
|
|
3059
|
-
l.error("unbalanced parentheses");
|
|
3060
|
-
return null;
|
|
3061
|
-
}
|
|
3062
3082
|
l.backup();
|
|
3063
3083
|
return lexInsideBracketedSelection;
|
|
3064
3084
|
case ",":
|
|
3065
3085
|
l.emit(TokenKind.COMMA);
|
|
3066
3086
|
// If we have unbalanced parens, we are inside a function call and a
|
|
3067
3087
|
// comma separates arguments. Otherwise a comma separates selectors.
|
|
3068
|
-
if (l.
|
|
3088
|
+
if (l.funcCallStack.length) continue;
|
|
3069
3089
|
l.filterLevel -= 1;
|
|
3070
3090
|
return lexInsideBracketedSelection;
|
|
3071
3091
|
case "'":
|
|
@@ -3073,18 +3093,25 @@ function lexInsideFilter(l) {
|
|
|
3073
3093
|
case '"':
|
|
3074
3094
|
return lexDoubleQuoteStringInsideFilterExpression;
|
|
3075
3095
|
case "(":
|
|
3096
|
+
l.bracketStack.push(["(", l.start]);
|
|
3076
3097
|
l.emit(TokenKind.LPAREN);
|
|
3077
3098
|
// Are we in a function call? If so, a function argument contains parens.
|
|
3078
|
-
if (l.
|
|
3099
|
+
if (l.funcCallStack.length) l.funcCallStack[l.funcCallStack.length - 1] += 1;
|
|
3079
3100
|
continue;
|
|
3080
3101
|
case ")":
|
|
3102
|
+
if (l.bracketStack.length === 0 || l.bracketStack[l.bracketStack.length - 1][0] !== "(") {
|
|
3103
|
+
l.backup();
|
|
3104
|
+
l.error("unbalanced brackets");
|
|
3105
|
+
return null;
|
|
3106
|
+
}
|
|
3107
|
+
l.bracketStack.pop();
|
|
3081
3108
|
l.emit(TokenKind.RPAREN);
|
|
3082
3109
|
// Are we closing a function call or a parenthesized expression?
|
|
3083
|
-
if (l.
|
|
3084
|
-
if (l.
|
|
3085
|
-
l.
|
|
3110
|
+
if (l.funcCallStack.length) {
|
|
3111
|
+
if (l.funcCallStack[l.funcCallStack.length - 1] === 1) {
|
|
3112
|
+
l.funcCallStack.pop();
|
|
3086
3113
|
} else {
|
|
3087
|
-
l.
|
|
3114
|
+
l.funcCallStack[l.funcCallStack.length - 1] -= 1;
|
|
3088
3115
|
}
|
|
3089
3116
|
}
|
|
3090
3117
|
continue;
|
|
@@ -3181,8 +3208,9 @@ function lexInsideFilter(l) {
|
|
|
3181
3208
|
// functions
|
|
3182
3209
|
if (l.acceptMatchRun(functionNamePattern) && l.peek() === "(") {
|
|
3183
3210
|
// Keep track of parentheses for this function call.
|
|
3184
|
-
l.
|
|
3211
|
+
l.funcCallStack.push(1);
|
|
3185
3212
|
l.emit(TokenKind.FUNCTION);
|
|
3213
|
+
l.bracketStack.push(["(", l.start]);
|
|
3186
3214
|
l.next();
|
|
3187
3215
|
l.ignore();
|
|
3188
3216
|
continue;
|
|
@@ -5297,6 +5325,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
5297
5325
|
apply: apply
|
|
5298
5326
|
});
|
|
5299
5327
|
|
|
5300
|
-
const version = "2.2.
|
|
5328
|
+
const version = "2.2.2";
|
|
5301
5329
|
|
|
5302
5330
|
export { DEFAULT_ENVIRONMENT, FunctionExpressionType, JSONPatch, JSONPatchError, JSONPatchTestFailure, JSONPathEnvironment, JSONPathError, JSONPathIndexError, JSONPathLexerError, JSONPathNode, JSONPathNodeList, JSONPathQuery, JSONPathRecursionLimitError, JSONPathSyntaxError, JSONPathTypeError, JSONPointer, Nothing, RelativeJSONPointer, Token, TokenKind, UNDEFINED, apply, compile, index as jsonpatch, index$1 as jsonpath, index$3 as jsonpointer, lazyQuery, query, resolve, version };
|
package/dist/json-p3.iife.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* json-p3 version 2.2.
|
|
2
|
+
* json-p3 version 2.2.2
|
|
3
3
|
* https://github.com/jg-rp/json-p3
|
|
4
4
|
*
|
|
5
5
|
* MIT License
|
|
@@ -2719,7 +2719,13 @@ var json_p3 = (function (exports) {
|
|
|
2719
2719
|
* If the stack is empty, we are not in a function call. Remember that
|
|
2720
2720
|
* function arguments can use arbitrarily nested in parentheses.
|
|
2721
2721
|
*/
|
|
2722
|
-
|
|
2722
|
+
funcCallStack = [];
|
|
2723
|
+
|
|
2724
|
+
/**
|
|
2725
|
+
* A stack of parentheses and square brackets used to check for balanced
|
|
2726
|
+
* brackets.
|
|
2727
|
+
*/
|
|
2728
|
+
bracketStack = [];
|
|
2723
2729
|
|
|
2724
2730
|
/** Tokens resulting from tokenizing a JSONPath query. */
|
|
2725
2731
|
tokens = [];
|
|
@@ -2848,9 +2854,19 @@ var json_p3 = (function (exports) {
|
|
|
2848
2854
|
function tokenize(environment, path) {
|
|
2849
2855
|
const [lexer, tokens] = lex(environment, path);
|
|
2850
2856
|
lexer.run();
|
|
2857
|
+
|
|
2858
|
+
// If there's an error, it will be the last token with kind set to ERROR.
|
|
2851
2859
|
if (tokens.length && tokens[tokens.length - 1].kind === TokenKind.ERROR) {
|
|
2852
2860
|
throw new JSONPathSyntaxError(tokens[tokens.length - 1].value, tokens[tokens.length - 1]);
|
|
2853
2861
|
}
|
|
2862
|
+
|
|
2863
|
+
// If the bracket stack is not empty, we hav unbalanced brackets.
|
|
2864
|
+
// This might not be reachable.
|
|
2865
|
+
if (lexer.bracketStack.length !== 0) {
|
|
2866
|
+
const [ch, index] = lexer.bracketStack[lexer.bracketStack.length - 1];
|
|
2867
|
+
const msg = "unbalanced brackets";
|
|
2868
|
+
throw new JSONPathSyntaxError(msg, new Token(TokenKind.ERROR, ch, index, path));
|
|
2869
|
+
}
|
|
2854
2870
|
return tokens;
|
|
2855
2871
|
}
|
|
2856
2872
|
function lexRoot(l) {
|
|
@@ -2880,6 +2896,7 @@ var json_p3 = (function (exports) {
|
|
|
2880
2896
|
}
|
|
2881
2897
|
return lexDotSelector;
|
|
2882
2898
|
case "[":
|
|
2899
|
+
l.bracketStack.push(["[", l.start]);
|
|
2883
2900
|
l.emit(TokenKind.LBRACKET);
|
|
2884
2901
|
return lexInsideBracketedSelection;
|
|
2885
2902
|
default:
|
|
@@ -2936,6 +2953,7 @@ var json_p3 = (function (exports) {
|
|
|
2936
2953
|
l.emit(TokenKind.WILD);
|
|
2937
2954
|
return lexSegment;
|
|
2938
2955
|
case "[":
|
|
2956
|
+
l.bracketStack.push(["[", l.start]);
|
|
2939
2957
|
l.emit(TokenKind.LBRACKET);
|
|
2940
2958
|
return lexInsideBracketedSelection;
|
|
2941
2959
|
default:
|
|
@@ -3017,6 +3035,12 @@ var json_p3 = (function (exports) {
|
|
|
3017
3035
|
const ch = l.next();
|
|
3018
3036
|
switch (ch) {
|
|
3019
3037
|
case "]":
|
|
3038
|
+
if (l.bracketStack.length === 0 || l.bracketStack[l.bracketStack.length - 1][0] !== "[") {
|
|
3039
|
+
l.backup();
|
|
3040
|
+
l.error("unbalanced brackets");
|
|
3041
|
+
return null;
|
|
3042
|
+
}
|
|
3043
|
+
l.bracketStack.pop();
|
|
3020
3044
|
l.emit(TokenKind.RBRACKET);
|
|
3021
3045
|
return lexSegment;
|
|
3022
3046
|
case "":
|
|
@@ -3058,17 +3082,13 @@ var json_p3 = (function (exports) {
|
|
|
3058
3082
|
return null;
|
|
3059
3083
|
case "]":
|
|
3060
3084
|
l.filterLevel -= 1;
|
|
3061
|
-
if (l.parenStack.length === 1) {
|
|
3062
|
-
l.error("unbalanced parentheses");
|
|
3063
|
-
return null;
|
|
3064
|
-
}
|
|
3065
3085
|
l.backup();
|
|
3066
3086
|
return lexInsideBracketedSelection;
|
|
3067
3087
|
case ",":
|
|
3068
3088
|
l.emit(TokenKind.COMMA);
|
|
3069
3089
|
// If we have unbalanced parens, we are inside a function call and a
|
|
3070
3090
|
// comma separates arguments. Otherwise a comma separates selectors.
|
|
3071
|
-
if (l.
|
|
3091
|
+
if (l.funcCallStack.length) continue;
|
|
3072
3092
|
l.filterLevel -= 1;
|
|
3073
3093
|
return lexInsideBracketedSelection;
|
|
3074
3094
|
case "'":
|
|
@@ -3076,18 +3096,25 @@ var json_p3 = (function (exports) {
|
|
|
3076
3096
|
case '"':
|
|
3077
3097
|
return lexDoubleQuoteStringInsideFilterExpression;
|
|
3078
3098
|
case "(":
|
|
3099
|
+
l.bracketStack.push(["(", l.start]);
|
|
3079
3100
|
l.emit(TokenKind.LPAREN);
|
|
3080
3101
|
// Are we in a function call? If so, a function argument contains parens.
|
|
3081
|
-
if (l.
|
|
3102
|
+
if (l.funcCallStack.length) l.funcCallStack[l.funcCallStack.length - 1] += 1;
|
|
3082
3103
|
continue;
|
|
3083
3104
|
case ")":
|
|
3105
|
+
if (l.bracketStack.length === 0 || l.bracketStack[l.bracketStack.length - 1][0] !== "(") {
|
|
3106
|
+
l.backup();
|
|
3107
|
+
l.error("unbalanced brackets");
|
|
3108
|
+
return null;
|
|
3109
|
+
}
|
|
3110
|
+
l.bracketStack.pop();
|
|
3084
3111
|
l.emit(TokenKind.RPAREN);
|
|
3085
3112
|
// Are we closing a function call or a parenthesized expression?
|
|
3086
|
-
if (l.
|
|
3087
|
-
if (l.
|
|
3088
|
-
l.
|
|
3113
|
+
if (l.funcCallStack.length) {
|
|
3114
|
+
if (l.funcCallStack[l.funcCallStack.length - 1] === 1) {
|
|
3115
|
+
l.funcCallStack.pop();
|
|
3089
3116
|
} else {
|
|
3090
|
-
l.
|
|
3117
|
+
l.funcCallStack[l.funcCallStack.length - 1] -= 1;
|
|
3091
3118
|
}
|
|
3092
3119
|
}
|
|
3093
3120
|
continue;
|
|
@@ -3184,8 +3211,9 @@ var json_p3 = (function (exports) {
|
|
|
3184
3211
|
// functions
|
|
3185
3212
|
if (l.acceptMatchRun(functionNamePattern) && l.peek() === "(") {
|
|
3186
3213
|
// Keep track of parentheses for this function call.
|
|
3187
|
-
l.
|
|
3214
|
+
l.funcCallStack.push(1);
|
|
3188
3215
|
l.emit(TokenKind.FUNCTION);
|
|
3216
|
+
l.bracketStack.push(["(", l.start]);
|
|
3189
3217
|
l.next();
|
|
3190
3218
|
l.ignore();
|
|
3191
3219
|
continue;
|
|
@@ -5300,7 +5328,7 @@ var json_p3 = (function (exports) {
|
|
|
5300
5328
|
apply: apply
|
|
5301
5329
|
});
|
|
5302
5330
|
|
|
5303
|
-
const version = "2.2.
|
|
5331
|
+
const version = "2.2.2";
|
|
5304
5332
|
|
|
5305
5333
|
exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT;
|
|
5306
5334
|
exports.FunctionExpressionType = FunctionExpressionType;
|