xslt-processor 3.0.0 → 3.0.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.
Files changed (224) hide show
  1. package/README.md +2 -2
  2. package/constants.d.ts +12 -12
  3. package/constants.js +16 -16
  4. package/dom/functions.d.ts +14 -14
  5. package/dom/functions.js +56 -57
  6. package/dom/functions.js.map +1 -1
  7. package/dom/index.d.ts +6 -6
  8. package/dom/index.js +22 -22
  9. package/dom/util.d.ts +7 -7
  10. package/dom/util.js +42 -43
  11. package/dom/util.js.map +1 -1
  12. package/dom/xdocument.d.ts +16 -16
  13. package/dom/xdocument.js +73 -74
  14. package/dom/xdocument.js.map +1 -1
  15. package/dom/xml-functions.d.ts +58 -58
  16. package/dom/xml-functions.js +369 -370
  17. package/dom/xml-functions.js.map +1 -1
  18. package/dom/xml-output-options.d.ts +6 -6
  19. package/dom/xml-output-options.js +2 -2
  20. package/dom/xml-parser.d.ts +47 -47
  21. package/dom/xml-parser.js +307 -307
  22. package/dom/xml-parser.js.map +1 -1
  23. package/dom/xmltoken.d.ts +12 -12
  24. package/dom/xmltoken.js +101 -101
  25. package/dom/xnode.d.ts +73 -73
  26. package/dom/xnode.js +450 -450
  27. package/dom/xnode.js.map +1 -1
  28. package/index.d.ts +4 -4
  29. package/index.js +12 -12
  30. package/package.json +11 -11
  31. package/test-without-jest.d.ts +1 -0
  32. package/test-without-jest.js +63 -0
  33. package/test-without-jest.js.map +1 -0
  34. package/umd/constants.d.ts +12 -12
  35. package/umd/dom/functions.d.ts +14 -14
  36. package/umd/dom/index.d.ts +6 -6
  37. package/umd/dom/util.d.ts +7 -7
  38. package/umd/dom/xdocument.d.ts +16 -16
  39. package/umd/dom/xml-functions.d.ts +58 -58
  40. package/umd/dom/xml-output-options.d.ts +6 -6
  41. package/umd/dom/xml-parser.d.ts +47 -47
  42. package/umd/dom/xmltoken.d.ts +12 -12
  43. package/umd/dom/xnode.d.ts +73 -73
  44. package/umd/index.d.ts +4 -4
  45. package/umd/test-without-jest.d.ts +1 -0
  46. package/umd/xpath/common-function.d.ts +8 -8
  47. package/umd/xpath/expr-context.d.ts +111 -111
  48. package/umd/xpath/expressions/binary-expr.d.ts +11 -11
  49. package/umd/xpath/expressions/expression.d.ts +4 -4
  50. package/umd/xpath/expressions/filter-expr.d.ts +9 -9
  51. package/umd/xpath/expressions/function-call-expr.d.ts +12 -12
  52. package/umd/xpath/expressions/index.d.ts +13 -13
  53. package/umd/xpath/expressions/literal-expr.d.ts +7 -7
  54. package/umd/xpath/expressions/location-expr.d.ts +15 -15
  55. package/umd/xpath/expressions/number-expr.d.ts +7 -7
  56. package/umd/xpath/expressions/path-expr.d.ts +9 -9
  57. package/umd/xpath/expressions/predicate-expr.d.ts +8 -8
  58. package/umd/xpath/expressions/step-expr.d.ts +25 -25
  59. package/umd/xpath/expressions/token-expr.d.ts +7 -7
  60. package/umd/xpath/expressions/unary-minus-expr.d.ts +8 -8
  61. package/umd/xpath/expressions/union-expr.d.ts +9 -9
  62. package/umd/xpath/expressions/variable-expr.d.ts +7 -7
  63. package/umd/xpath/functions/index.d.ts +2 -2
  64. package/umd/xpath/functions/internal-functions.d.ts +2 -2
  65. package/umd/xpath/functions/non-standard.d.ts +12 -12
  66. package/umd/xpath/functions/standard-20.d.ts +5 -5
  67. package/umd/xpath/functions/standard.d.ts +40 -40
  68. package/umd/xpath/grammar-rule-candidate.d.ts +8 -8
  69. package/umd/xpath/index.d.ts +3 -3
  70. package/umd/xpath/match-resolver.d.ts +55 -55
  71. package/umd/xpath/node-tests/index.d.ts +8 -8
  72. package/umd/xpath/node-tests/node-test-any.d.ts +6 -6
  73. package/umd/xpath/node-tests/node-test-comment.d.ts +6 -6
  74. package/umd/xpath/node-tests/node-test-element-or-attribute.d.ts +6 -6
  75. package/umd/xpath/node-tests/node-test-name.d.ts +10 -10
  76. package/umd/xpath/node-tests/node-test-nc.d.ts +9 -9
  77. package/umd/xpath/node-tests/node-test-pi.d.ts +8 -8
  78. package/umd/xpath/node-tests/node-test-text.d.ts +6 -6
  79. package/umd/xpath/node-tests/node-test.d.ts +5 -5
  80. package/umd/xpath/tokens.d.ts +62 -62
  81. package/umd/xpath/values/boolean-value.d.ts +11 -11
  82. package/umd/xpath/values/index.d.ts +5 -5
  83. package/umd/xpath/values/node-set-value.d.ts +11 -11
  84. package/umd/xpath/values/node-value.d.ts +7 -7
  85. package/umd/xpath/values/number-value.d.ts +11 -11
  86. package/umd/xpath/values/string-value.d.ts +11 -11
  87. package/umd/xpath/xpath-grammar-rules.d.ts +68 -68
  88. package/umd/xpath/xpath-token-rule.d.ts +7 -7
  89. package/umd/xpath/xpath.d.ts +174 -170
  90. package/umd/xpathdebug.d.ts +2 -2
  91. package/umd/xslt/index.d.ts +3 -3
  92. package/umd/xslt/xslt-decimal-format-settings.d.ts +28 -28
  93. package/umd/xslt/xslt-options.d.ts +7 -7
  94. package/umd/xslt/xslt-parameter.d.ts +5 -5
  95. package/umd/xslt/xslt.d.ts +207 -190
  96. package/umd/xslt-processor.js +1 -15
  97. package/umd/xslt-processor.js.map +1 -1
  98. package/xpath/common-function.d.ts +8 -8
  99. package/xpath/common-function.js +31 -32
  100. package/xpath/common-function.js.map +1 -1
  101. package/xpath/expr-context.d.ts +111 -111
  102. package/xpath/expr-context.js +189 -189
  103. package/xpath/expr-context.js.map +1 -1
  104. package/xpath/expressions/binary-expr.d.ts +11 -11
  105. package/xpath/expressions/binary-expr.js +165 -165
  106. package/xpath/expressions/binary-expr.js.map +1 -1
  107. package/xpath/expressions/expression.d.ts +4 -4
  108. package/xpath/expressions/expression.js +9 -9
  109. package/xpath/expressions/filter-expr.d.ts +9 -9
  110. package/xpath/expressions/filter-expr.js +52 -52
  111. package/xpath/expressions/filter-expr.js.map +1 -1
  112. package/xpath/expressions/function-call-expr.d.ts +12 -12
  113. package/xpath/expressions/function-call-expr.js +95 -95
  114. package/xpath/expressions/function-call-expr.js.map +1 -1
  115. package/xpath/expressions/index.d.ts +13 -13
  116. package/xpath/expressions/index.js +29 -29
  117. package/xpath/expressions/literal-expr.d.ts +7 -7
  118. package/xpath/expressions/literal-expr.js +33 -33
  119. package/xpath/expressions/literal-expr.js.map +1 -1
  120. package/xpath/expressions/location-expr.d.ts +15 -15
  121. package/xpath/expressions/location-expr.js +98 -98
  122. package/xpath/expressions/location-expr.js.map +1 -1
  123. package/xpath/expressions/number-expr.d.ts +7 -7
  124. package/xpath/expressions/number-expr.js +33 -33
  125. package/xpath/expressions/number-expr.js.map +1 -1
  126. package/xpath/expressions/path-expr.d.ts +9 -9
  127. package/xpath/expressions/path-expr.js +51 -51
  128. package/xpath/expressions/path-expr.js.map +1 -1
  129. package/xpath/expressions/predicate-expr.d.ts +8 -8
  130. package/xpath/expressions/predicate-expr.js +40 -40
  131. package/xpath/expressions/predicate-expr.js.map +1 -1
  132. package/xpath/expressions/step-expr.d.ts +25 -25
  133. package/xpath/expressions/step-expr.js +280 -280
  134. package/xpath/expressions/step-expr.js.map +1 -1
  135. package/xpath/expressions/token-expr.d.ts +7 -7
  136. package/xpath/expressions/token-expr.js +33 -33
  137. package/xpath/expressions/token-expr.js.map +1 -1
  138. package/xpath/expressions/unary-minus-expr.d.ts +8 -8
  139. package/xpath/expressions/unary-minus-expr.js +33 -33
  140. package/xpath/expressions/unary-minus-expr.js.map +1 -1
  141. package/xpath/expressions/union-expr.d.ts +9 -9
  142. package/xpath/expressions/union-expr.js +50 -50
  143. package/xpath/expressions/union-expr.js.map +1 -1
  144. package/xpath/expressions/variable-expr.d.ts +7 -7
  145. package/xpath/expressions/variable-expr.js +32 -32
  146. package/xpath/expressions/variable-expr.js.map +1 -1
  147. package/xpath/functions/index.d.ts +2 -2
  148. package/xpath/functions/index.js +18 -18
  149. package/xpath/functions/internal-functions.d.ts +2 -2
  150. package/xpath/functions/internal-functions.js +21 -22
  151. package/xpath/functions/internal-functions.js.map +1 -1
  152. package/xpath/functions/non-standard.d.ts +12 -12
  153. package/xpath/functions/non-standard.js +44 -45
  154. package/xpath/functions/non-standard.js.map +1 -1
  155. package/xpath/functions/standard-20.d.ts +5 -5
  156. package/xpath/functions/standard-20.js +25 -26
  157. package/xpath/functions/standard-20.js.map +1 -1
  158. package/xpath/functions/standard.d.ts +40 -40
  159. package/xpath/functions/standard.js +441 -442
  160. package/xpath/functions/standard.js.map +1 -1
  161. package/xpath/grammar-rule-candidate.d.ts +8 -8
  162. package/xpath/grammar-rule-candidate.js +2 -2
  163. package/xpath/index.d.ts +3 -3
  164. package/xpath/index.js +19 -19
  165. package/xpath/match-resolver.d.ts +55 -55
  166. package/xpath/match-resolver.js +136 -136
  167. package/xpath/match-resolver.js.map +1 -1
  168. package/xpath/node-tests/index.d.ts +8 -8
  169. package/xpath/node-tests/index.js +17 -17
  170. package/xpath/node-tests/node-test-any.d.ts +6 -6
  171. package/xpath/node-tests/node-test-any.js +14 -14
  172. package/xpath/node-tests/node-test-comment.d.ts +6 -6
  173. package/xpath/node-tests/node-test-comment.js +14 -14
  174. package/xpath/node-tests/node-test-element-or-attribute.d.ts +6 -6
  175. package/xpath/node-tests/node-test-element-or-attribute.js +15 -15
  176. package/xpath/node-tests/node-test-name.d.ts +10 -10
  177. package/xpath/node-tests/node-test-name.js +38 -38
  178. package/xpath/node-tests/node-test-name.js.map +1 -1
  179. package/xpath/node-tests/node-test-nc.d.ts +9 -9
  180. package/xpath/node-tests/node-test-nc.js +16 -16
  181. package/xpath/node-tests/node-test-pi.d.ts +8 -8
  182. package/xpath/node-tests/node-test-pi.js +16 -16
  183. package/xpath/node-tests/node-test-pi.js.map +1 -1
  184. package/xpath/node-tests/node-test-text.d.ts +6 -6
  185. package/xpath/node-tests/node-test-text.js +14 -14
  186. package/xpath/node-tests/node-test.d.ts +5 -5
  187. package/xpath/node-tests/node-test.js +2 -2
  188. package/xpath/tokens.d.ts +62 -62
  189. package/xpath/tokens.js +300 -300
  190. package/xpath/tokens.js.map +1 -1
  191. package/xpath/values/boolean-value.d.ts +11 -11
  192. package/xpath/values/boolean-value.js +23 -23
  193. package/xpath/values/index.d.ts +5 -5
  194. package/xpath/values/index.js +46 -46
  195. package/xpath/values/node-set-value.d.ts +11 -11
  196. package/xpath/values/node-set-value.js +27 -27
  197. package/xpath/values/node-set-value.js.map +1 -1
  198. package/xpath/values/node-value.d.ts +7 -7
  199. package/xpath/values/node-value.js +2 -2
  200. package/xpath/values/number-value.d.ts +11 -11
  201. package/xpath/values/number-value.js +23 -23
  202. package/xpath/values/string-value.d.ts +11 -11
  203. package/xpath/values/string-value.js +23 -23
  204. package/xpath/xpath-grammar-rules.d.ts +68 -68
  205. package/xpath/xpath-grammar-rules.js +74 -74
  206. package/xpath/xpath-token-rule.d.ts +7 -7
  207. package/xpath/xpath-token-rule.js +2 -2
  208. package/xpath/xpath.d.ts +174 -170
  209. package/xpath/xpath.js +911 -909
  210. package/xpath/xpath.js.map +1 -1
  211. package/xpathdebug.d.ts +2 -2
  212. package/xpathdebug.js +187 -187
  213. package/xpathdebug.js.map +1 -1
  214. package/xslt/index.d.ts +3 -3
  215. package/xslt/index.js +19 -19
  216. package/xslt/xslt-decimal-format-settings.d.ts +28 -28
  217. package/xslt/xslt-decimal-format-settings.js +2 -2
  218. package/xslt/xslt-options.d.ts +7 -7
  219. package/xslt/xslt-options.js +2 -2
  220. package/xslt/xslt-parameter.d.ts +5 -5
  221. package/xslt/xslt-parameter.js +2 -2
  222. package/xslt/xslt.d.ts +207 -190
  223. package/xslt/xslt.js +1135 -1079
  224. package/xslt/xslt.js.map +1 -1
@@ -1,96 +1,96 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.FunctionCallExpr = void 0;
19
- var functions_1 = require("../functions");
20
- var non_standard_1 = require("../functions/non-standard");
21
- var standard_20_1 = require("../functions/standard-20");
22
- var boolean_value_1 = require("../values/boolean-value");
23
- var expression_1 = require("./expression");
24
- var FunctionCallExpr = /** @class */ (function (_super) {
25
- __extends(FunctionCallExpr, _super);
26
- function FunctionCallExpr(name) {
27
- var _this = _super.call(this) || this;
28
- _this.xPathFunctions = {
29
- boolean: functions_1.boolean,
30
- ceiling: functions_1.ceiling,
31
- concat: functions_1.concat,
32
- contains: functions_1.contains,
33
- count: functions_1.count,
34
- current: functions_1.current,
35
- 'ends-with': functions_1.endsWith,
36
- false: functions_1._false,
37
- 'format-number': functions_1.formatNumber,
38
- floor: functions_1.floor,
39
- 'generate-id': functions_1.generateId,
40
- id: functions_1.id,
41
- lang: functions_1.lang,
42
- last: functions_1.last,
43
- 'local-name': functions_1.localName,
44
- 'lower-case': standard_20_1.lowerCase,
45
- 'replace': standard_20_1._replace,
46
- matches: functions_1.matches,
47
- name: functions_1._name,
48
- 'namespace-uri': functions_1.namespaceUri,
49
- 'normalize-space': functions_1.normalizeSpace,
50
- not: functions_1.not,
51
- number: functions_1.number,
52
- position: functions_1.position,
53
- round: functions_1.round,
54
- 'starts-with': functions_1.startsWith,
55
- string: functions_1._string,
56
- 'xml-to-json': functions_1.xmlToJson,
57
- substring: functions_1.substring,
58
- 'substring-before': functions_1.substringBefore,
59
- 'substring-after': functions_1.substringAfter,
60
- sum: functions_1.sum,
61
- 'string-length': functions_1.stringLength,
62
- translate: functions_1.translate,
63
- true: functions_1._true,
64
- 'upper-case': standard_20_1.upperCase,
65
- // TODO(mesch): The following functions are custom. There is a
66
- // standard that defines how to add functions, which should be
67
- // applied here.
68
- 'ext-join': non_standard_1.extJoin,
69
- // ext-if() evaluates and returns its second argument, if the
70
- // boolean value of its first argument is true, otherwise it
71
- // evaluates and returns its third argument.
72
- 'ext-if': non_standard_1.extIf,
73
- // ext-cardinal() evaluates its single argument as a number, and
74
- // returns the current node that many times. It can be used in the
75
- // select attribute to iterate over an integer range.
76
- 'ext-cardinal': non_standard_1.extCardinal
77
- };
78
- _this.name = name;
79
- _this.args = [];
80
- return _this;
81
- }
82
- FunctionCallExpr.prototype.appendArg = function (arg) {
83
- this.args.push(arg);
84
- };
85
- FunctionCallExpr.prototype.evaluate = function (context) {
86
- var functionName = "".concat(this.name.value);
87
- var resolvedFunction = this.xPathFunctions[functionName];
88
- if (resolvedFunction) {
89
- return resolvedFunction.call(this, context);
90
- }
91
- return new boolean_value_1.BooleanValue(false);
92
- };
93
- return FunctionCallExpr;
94
- }(expression_1.Expression));
95
- exports.FunctionCallExpr = FunctionCallExpr;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.FunctionCallExpr = void 0;
19
+ var functions_1 = require("../functions");
20
+ var non_standard_1 = require("../functions/non-standard");
21
+ var standard_20_1 = require("../functions/standard-20");
22
+ var boolean_value_1 = require("../values/boolean-value");
23
+ var expression_1 = require("./expression");
24
+ var FunctionCallExpr = /** @class */ (function (_super) {
25
+ __extends(FunctionCallExpr, _super);
26
+ function FunctionCallExpr(name) {
27
+ var _this = _super.call(this) || this;
28
+ _this.xPathFunctions = {
29
+ boolean: functions_1.boolean,
30
+ ceiling: functions_1.ceiling,
31
+ concat: functions_1.concat,
32
+ contains: functions_1.contains,
33
+ count: functions_1.count,
34
+ current: functions_1.current,
35
+ 'ends-with': functions_1.endsWith,
36
+ false: functions_1._false,
37
+ 'format-number': functions_1.formatNumber,
38
+ floor: functions_1.floor,
39
+ 'generate-id': functions_1.generateId,
40
+ id: functions_1.id,
41
+ lang: functions_1.lang,
42
+ last: functions_1.last,
43
+ 'local-name': functions_1.localName,
44
+ 'lower-case': standard_20_1.lowerCase,
45
+ 'replace': standard_20_1._replace,
46
+ matches: functions_1.matches,
47
+ name: functions_1._name,
48
+ 'namespace-uri': functions_1.namespaceUri,
49
+ 'normalize-space': functions_1.normalizeSpace,
50
+ not: functions_1.not,
51
+ number: functions_1.number,
52
+ position: functions_1.position,
53
+ round: functions_1.round,
54
+ 'starts-with': functions_1.startsWith,
55
+ string: functions_1._string,
56
+ 'xml-to-json': functions_1.xmlToJson,
57
+ substring: functions_1.substring,
58
+ 'substring-before': functions_1.substringBefore,
59
+ 'substring-after': functions_1.substringAfter,
60
+ sum: functions_1.sum,
61
+ 'string-length': functions_1.stringLength,
62
+ translate: functions_1.translate,
63
+ true: functions_1._true,
64
+ 'upper-case': standard_20_1.upperCase,
65
+ // TODO(mesch): The following functions are custom. There is a
66
+ // standard that defines how to add functions, which should be
67
+ // applied here.
68
+ 'ext-join': non_standard_1.extJoin,
69
+ // ext-if() evaluates and returns its second argument, if the
70
+ // boolean value of its first argument is true, otherwise it
71
+ // evaluates and returns its third argument.
72
+ 'ext-if': non_standard_1.extIf,
73
+ // ext-cardinal() evaluates its single argument as a number, and
74
+ // returns the current node that many times. It can be used in the
75
+ // select attribute to iterate over an integer range.
76
+ 'ext-cardinal': non_standard_1.extCardinal
77
+ };
78
+ _this.name = name;
79
+ _this.args = [];
80
+ return _this;
81
+ }
82
+ FunctionCallExpr.prototype.appendArg = function (arg) {
83
+ this.args.push(arg);
84
+ };
85
+ FunctionCallExpr.prototype.evaluate = function (context) {
86
+ var functionName = "".concat(this.name.value);
87
+ var resolvedFunction = this.xPathFunctions[functionName];
88
+ if (resolvedFunction) {
89
+ return resolvedFunction.call(this, context);
90
+ }
91
+ return new boolean_value_1.BooleanValue(false);
92
+ };
93
+ return FunctionCallExpr;
94
+ }(expression_1.Expression));
95
+ exports.FunctionCallExpr = FunctionCallExpr;
96
96
  //# sourceMappingURL=function-call-expr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"function-call-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/function-call-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,0CAkCsB;AACtB,0DAAwE;AACxE,wDAA0E;AAC1E,yDAAuD;AACvD,2CAA0C;AAE1C;IAAsC,oCAAU;IA6D5C,0BAAY,IAAS;QAArB,YACI,iBAAO,SAGV;QA7DD,oBAAc,GAAgC;YAC1C,OAAO,qBAAA;YACP,OAAO,qBAAA;YACP,MAAM,oBAAA;YACN,QAAQ,sBAAA;YACR,KAAK,mBAAA;YACL,OAAO,qBAAA;YACP,WAAW,EAAE,oBAAQ;YACrB,KAAK,EAAE,kBAAM;YACb,eAAe,EAAE,wBAAY;YAC7B,KAAK,mBAAA;YACL,aAAa,EAAE,sBAAU;YACzB,EAAE,gBAAA;YACF,IAAI,kBAAA;YACJ,IAAI,kBAAA;YACJ,YAAY,EAAE,qBAAS;YACvB,YAAY,EAAE,uBAAS;YACvB,SAAS,EAAE,sBAAQ;YACnB,OAAO,qBAAA;YACP,IAAI,EAAE,iBAAK;YACX,eAAe,EAAE,wBAAY;YAC7B,iBAAiB,EAAE,0BAAc;YACjC,GAAG,iBAAA;YACH,MAAM,oBAAA;YACN,QAAQ,sBAAA;YACR,KAAK,mBAAA;YACL,aAAa,EAAE,sBAAU;YACzB,MAAM,EAAE,mBAAO;YACf,aAAa,EAAE,qBAAS;YACxB,SAAS,uBAAA;YACT,kBAAkB,EAAE,2BAAe;YACnC,iBAAiB,EAAE,0BAAc;YACjC,GAAG,iBAAA;YACH,eAAe,EAAE,wBAAY;YAC7B,SAAS,uBAAA;YACT,IAAI,EAAE,iBAAK;YACX,YAAY,EAAE,uBAAS;YAEvB,8DAA8D;YAC9D,8DAA8D;YAC9D,gBAAgB;YAEhB,UAAU,EAAE,sBAAO;YAEnB,6DAA6D;YAC7D,4DAA4D;YAC5D,4CAA4C;YAE5C,QAAQ,EAAE,oBAAK;YAEf,gEAAgE;YAChE,kEAAkE;YAClE,qDAAqD;YAErD,cAAc,EAAE,0BAAW;SAC9B,CAAC;QAIE,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,IAAI,GAAG,EAAE,CAAC;;IACnB,CAAC;IAED,oCAAS,GAAT,UAAU,GAAQ;QACd,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAED,mCAAQ,GAAR,UAAS,OAAoB;QACzB,IAAM,YAAY,GAAG,UAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QAC1C,IAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;QAC3D,IAAI,gBAAgB,EAAE;YAClB,OAAO,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SAC/C;QAED,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IACL,uBAAC;AAAD,CAAC,AAhFD,CAAsC,uBAAU,GAgF/C;AAhFY,4CAAgB"}
1
+ {"version":3,"file":"function-call-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/function-call-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,0CAkCsB;AACtB,0DAAwE;AACxE,wDAA0E;AAC1E,yDAAuD;AACvD,2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AAS,GAAT,UAAU,GAAQ;QACd,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAED,mCAAQ,GAAR,UAAS,OAAoB;QACzB,IAAM,YAAY,GAAG,UAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QAC1C,IAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;QAC3D,IAAI,gBAAgB,EAAE,CAAC;YACnB,OAAO,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IACL,uBAAC;AAAD,CAAC,AAhFD,CAAsC,uBAAU,GAgF/C;AAhFY,4CAAgB"}
@@ -1,13 +1,13 @@
1
- export * from './binary-expr';
2
- export * from './filter-expr';
3
- export * from './function-call-expr';
4
- export * from './literal-expr';
5
- export * from './location-expr';
6
- export * from './number-expr';
7
- export * from './path-expr';
8
- export * from './predicate-expr';
9
- export * from './step-expr';
10
- export * from './token-expr';
11
- export * from './unary-minus-expr';
12
- export * from './union-expr';
13
- export * from './variable-expr';
1
+ export * from './binary-expr';
2
+ export * from './filter-expr';
3
+ export * from './function-call-expr';
4
+ export * from './literal-expr';
5
+ export * from './location-expr';
6
+ export * from './number-expr';
7
+ export * from './path-expr';
8
+ export * from './predicate-expr';
9
+ export * from './step-expr';
10
+ export * from './token-expr';
11
+ export * from './unary-minus-expr';
12
+ export * from './union-expr';
13
+ export * from './variable-expr';
@@ -1,30 +1,30 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./binary-expr"), exports);
18
- __exportStar(require("./filter-expr"), exports);
19
- __exportStar(require("./function-call-expr"), exports);
20
- __exportStar(require("./literal-expr"), exports);
21
- __exportStar(require("./location-expr"), exports);
22
- __exportStar(require("./number-expr"), exports);
23
- __exportStar(require("./path-expr"), exports);
24
- __exportStar(require("./predicate-expr"), exports);
25
- __exportStar(require("./step-expr"), exports);
26
- __exportStar(require("./token-expr"), exports);
27
- __exportStar(require("./unary-minus-expr"), exports);
28
- __exportStar(require("./union-expr"), exports);
29
- __exportStar(require("./variable-expr"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./binary-expr"), exports);
18
+ __exportStar(require("./filter-expr"), exports);
19
+ __exportStar(require("./function-call-expr"), exports);
20
+ __exportStar(require("./literal-expr"), exports);
21
+ __exportStar(require("./location-expr"), exports);
22
+ __exportStar(require("./number-expr"), exports);
23
+ __exportStar(require("./path-expr"), exports);
24
+ __exportStar(require("./predicate-expr"), exports);
25
+ __exportStar(require("./step-expr"), exports);
26
+ __exportStar(require("./token-expr"), exports);
27
+ __exportStar(require("./unary-minus-expr"), exports);
28
+ __exportStar(require("./union-expr"), exports);
29
+ __exportStar(require("./variable-expr"), exports);
30
30
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
- import { StringValue } from "../values/string-value";
2
- import { Expression } from "./expression";
3
- export declare class LiteralExpr extends Expression {
4
- value: any;
5
- constructor(value: any);
6
- evaluate(): StringValue;
7
- }
1
+ import { StringValue } from "../values/string-value";
2
+ import { Expression } from "./expression";
3
+ export declare class LiteralExpr extends Expression {
4
+ value: any;
5
+ constructor(value: any);
6
+ evaluate(): StringValue;
7
+ }
@@ -1,34 +1,34 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.LiteralExpr = void 0;
19
- var string_value_1 = require("../values/string-value");
20
- var expression_1 = require("./expression");
21
- var LiteralExpr = /** @class */ (function (_super) {
22
- __extends(LiteralExpr, _super);
23
- function LiteralExpr(value) {
24
- var _this = _super.call(this) || this;
25
- _this.value = value;
26
- return _this;
27
- }
28
- LiteralExpr.prototype.evaluate = function () {
29
- return new string_value_1.StringValue(this.value);
30
- };
31
- return LiteralExpr;
32
- }(expression_1.Expression));
33
- exports.LiteralExpr = LiteralExpr;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.LiteralExpr = void 0;
19
+ var string_value_1 = require("../values/string-value");
20
+ var expression_1 = require("./expression");
21
+ var LiteralExpr = /** @class */ (function (_super) {
22
+ __extends(LiteralExpr, _super);
23
+ function LiteralExpr(value) {
24
+ var _this = _super.call(this) || this;
25
+ _this.value = value;
26
+ return _this;
27
+ }
28
+ LiteralExpr.prototype.evaluate = function () {
29
+ return new string_value_1.StringValue(this.value);
30
+ };
31
+ return LiteralExpr;
32
+ }(expression_1.Expression));
33
+ exports.LiteralExpr = LiteralExpr;
34
34
  //# sourceMappingURL=literal-expr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"literal-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/literal-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uDAAqD;AACrD,2CAA0C;AAE1C;IAAiC,+BAAU;IAGvC,qBAAY,KAAU;QAAtB,YACI,iBAAO,SAEV;QADG,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,8BAAQ,GAAR;QACI,OAAO,IAAI,0BAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACL,kBAAC;AAAD,CAAC,AAXD,CAAiC,uBAAU,GAW1C;AAXY,kCAAW"}
1
+ {"version":3,"file":"literal-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/literal-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uDAAqD;AACrD,2CAA0C;AAE1C;IAAiC,+BAAU;IAGvC,qBAAY,KAAU;QAClB,YAAA,MAAK,WAAE,SAAC;QACR,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,8BAAQ,GAAR;QACI,OAAO,IAAI,0BAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACL,kBAAC;AAAD,CAAC,AAXD,CAAiC,uBAAU,GAW1C;AAXY,kCAAW"}
@@ -1,15 +1,15 @@
1
- import { ExprContext } from "../expr-context";
2
- import { NodeSetValue } from "../values/node-set-value";
3
- import { Expression } from "./expression";
4
- import { XPath } from "../xpath";
5
- import { StepExpr } from "./step-expr";
6
- export declare class LocationExpr extends Expression {
7
- absolute: boolean;
8
- steps: StepExpr[];
9
- xPath: XPath;
10
- constructor(xPath: XPath);
11
- appendStep(s: any): void;
12
- prependStep(s: any): void;
13
- _combineSteps(prevStep: any, nextStep: any): any;
14
- evaluate(context: ExprContext): NodeSetValue;
15
- }
1
+ import { ExprContext } from "../expr-context";
2
+ import { NodeSetValue } from "../values/node-set-value";
3
+ import { Expression } from "./expression";
4
+ import { XPath } from "../xpath";
5
+ import { StepExpr } from "./step-expr";
6
+ export declare class LocationExpr extends Expression {
7
+ absolute: boolean;
8
+ steps: StepExpr[];
9
+ xPath: XPath;
10
+ constructor(xPath: XPath);
11
+ appendStep(s: any): void;
12
+ prependStep(s: any): void;
13
+ _combineSteps(prevStep: any, nextStep: any): any;
14
+ evaluate(context: ExprContext): NodeSetValue;
15
+ }
@@ -1,99 +1,99 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.LocationExpr = void 0;
19
- var node_set_value_1 = require("../values/node-set-value");
20
- var node_test_any_1 = require("../node-tests/node-test-any");
21
- var tokens_1 = require("../tokens");
22
- var expression_1 = require("./expression");
23
- var LocationExpr = /** @class */ (function (_super) {
24
- __extends(LocationExpr, _super);
25
- function LocationExpr(xPath) {
26
- var _this = _super.call(this) || this;
27
- _this.absolute = false;
28
- _this.steps = [];
29
- _this.xPath = xPath;
30
- return _this;
31
- }
32
- LocationExpr.prototype.appendStep = function (s) {
33
- var combinedStep = this._combineSteps(this.steps[this.steps.length - 1], s);
34
- if (combinedStep) {
35
- this.steps[this.steps.length - 1] = combinedStep;
36
- }
37
- else {
38
- this.steps.push(s);
39
- }
40
- };
41
- LocationExpr.prototype.prependStep = function (s) {
42
- var combinedStep = this._combineSteps(s, this.steps[0]);
43
- if (combinedStep) {
44
- this.steps[0] = combinedStep;
45
- }
46
- else {
47
- this.steps.unshift(s);
48
- }
49
- };
50
- // DGF try to combine two steps into one step (perf enhancement)
51
- LocationExpr.prototype._combineSteps = function (prevStep, nextStep) {
52
- if (!prevStep)
53
- return null;
54
- if (!nextStep)
55
- return null;
56
- var hasPredicates = prevStep.predicates && prevStep.predicates.length > 0;
57
- if (prevStep.nodeTest instanceof node_test_any_1.NodeTestAny && !hasPredicates) {
58
- // maybe suitable to be combined
59
- if (prevStep.axis == tokens_1.xPathAxis.DESCENDANT_OR_SELF) {
60
- if (nextStep.axis == tokens_1.xPathAxis.CHILD) {
61
- // HBC - commenting out, because this is not a valid reduction
62
- //nextStep.axis = xpathAxis.DESCENDANT;
63
- //return nextStep;
64
- }
65
- else if (nextStep.axis == tokens_1.xPathAxis.SELF) {
66
- nextStep.axis = tokens_1.xPathAxis.DESCENDANT_OR_SELF;
67
- return nextStep;
68
- }
69
- }
70
- else if (prevStep.axis == tokens_1.xPathAxis.DESCENDANT) {
71
- if (nextStep.axis == tokens_1.xPathAxis.SELF) {
72
- nextStep.axis = tokens_1.xPathAxis.DESCENDANT;
73
- return nextStep;
74
- }
75
- }
76
- }
77
- return null;
78
- };
79
- LocationExpr.prototype.evaluate = function (context) {
80
- var start;
81
- if (this.absolute) {
82
- start = context.root;
83
- }
84
- else {
85
- start = context.nodeList[context.position];
86
- // TODO: `<xsl:template>` with relative path, starting on root node,
87
- // conflicts with `<xsl:template match="/">`, for some reason considered as relative.
88
- /* if (start.nodeName === '#document' && this.steps[0].axis === 'self-and-siblings') {
89
- start = start.childNodes[0];
90
- } */
91
- }
92
- var nodes = [];
93
- this.xPath.xPathStep(nodes, this.steps, 0, start, context);
94
- return new node_set_value_1.NodeSetValue(nodes);
95
- };
96
- return LocationExpr;
97
- }(expression_1.Expression));
98
- exports.LocationExpr = LocationExpr;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.LocationExpr = void 0;
19
+ var node_set_value_1 = require("../values/node-set-value");
20
+ var node_test_any_1 = require("../node-tests/node-test-any");
21
+ var tokens_1 = require("../tokens");
22
+ var expression_1 = require("./expression");
23
+ var LocationExpr = /** @class */ (function (_super) {
24
+ __extends(LocationExpr, _super);
25
+ function LocationExpr(xPath) {
26
+ var _this = _super.call(this) || this;
27
+ _this.absolute = false;
28
+ _this.steps = [];
29
+ _this.xPath = xPath;
30
+ return _this;
31
+ }
32
+ LocationExpr.prototype.appendStep = function (s) {
33
+ var combinedStep = this._combineSteps(this.steps[this.steps.length - 1], s);
34
+ if (combinedStep) {
35
+ this.steps[this.steps.length - 1] = combinedStep;
36
+ }
37
+ else {
38
+ this.steps.push(s);
39
+ }
40
+ };
41
+ LocationExpr.prototype.prependStep = function (s) {
42
+ var combinedStep = this._combineSteps(s, this.steps[0]);
43
+ if (combinedStep) {
44
+ this.steps[0] = combinedStep;
45
+ }
46
+ else {
47
+ this.steps.unshift(s);
48
+ }
49
+ };
50
+ // DGF try to combine two steps into one step (perf enhancement)
51
+ LocationExpr.prototype._combineSteps = function (prevStep, nextStep) {
52
+ if (!prevStep)
53
+ return null;
54
+ if (!nextStep)
55
+ return null;
56
+ var hasPredicates = prevStep.predicates && prevStep.predicates.length > 0;
57
+ if (prevStep.nodeTest instanceof node_test_any_1.NodeTestAny && !hasPredicates) {
58
+ // maybe suitable to be combined
59
+ if (prevStep.axis == tokens_1.xPathAxis.DESCENDANT_OR_SELF) {
60
+ if (nextStep.axis == tokens_1.xPathAxis.CHILD) {
61
+ // HBC - commenting out, because this is not a valid reduction
62
+ //nextStep.axis = xpathAxis.DESCENDANT;
63
+ //return nextStep;
64
+ }
65
+ else if (nextStep.axis == tokens_1.xPathAxis.SELF) {
66
+ nextStep.axis = tokens_1.xPathAxis.DESCENDANT_OR_SELF;
67
+ return nextStep;
68
+ }
69
+ }
70
+ else if (prevStep.axis == tokens_1.xPathAxis.DESCENDANT) {
71
+ if (nextStep.axis == tokens_1.xPathAxis.SELF) {
72
+ nextStep.axis = tokens_1.xPathAxis.DESCENDANT;
73
+ return nextStep;
74
+ }
75
+ }
76
+ }
77
+ return null;
78
+ };
79
+ LocationExpr.prototype.evaluate = function (context) {
80
+ var start;
81
+ if (this.absolute) {
82
+ start = context.root;
83
+ }
84
+ else {
85
+ start = context.nodeList[context.position];
86
+ // TODO: `<xsl:template>` with relative path, starting on root node,
87
+ // conflicts with `<xsl:template match="/">`, for some reason considered as relative.
88
+ /* if (start.nodeName === '#document' && this.steps[0].axis === 'self-and-siblings') {
89
+ start = start.childNodes[0];
90
+ } */
91
+ }
92
+ var nodes = [];
93
+ this.xPath.xPathStep(nodes, this.steps, 0, start, context);
94
+ return new node_set_value_1.NodeSetValue(nodes);
95
+ };
96
+ return LocationExpr;
97
+ }(expression_1.Expression));
98
+ exports.LocationExpr = LocationExpr;
99
99
  //# sourceMappingURL=location-expr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"location-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/location-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2DAAwD;AACxD,6DAA0D;AAC1D,oCAAsC;AACtC,2CAA0C;AAK1C;IAAkC,gCAAU;IAKxC,sBAAY,KAAY;QAAxB,YACI,iBAAO,SAIV;QAHG,KAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,KAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,iCAAU,GAAV,UAAW,CAAC;QACR,IAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9E,IAAI,YAAY,EAAE;YACd,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CA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AAC;oBACzC,QAAQ,CAAC,IAAI,GAAG,kBAAS,CAAC,kBAAkB,CAAC;oBAC7C,OAAO,QAAQ,CAAC;gBACpB,CAAC;YACL,CAAC;iBAAM,IAAI,QAAQ,CAAC,IAAI,IAAI,kBAAS,CAAC,UAAU,EAAE,CAAC;gBAC/C,IAAI,QAAQ,CAAC,IAAI,IAAI,kBAAS,CAAC,IAAI,EAAE,CAAC;oBAClC,QAAQ,CAAC,IAAI,GAAG,kBAAS,CAAC,UAAU,CAAC;oBACrC,OAAO,QAAQ,CAAC;gBACpB,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,+BAAQ,GAAR,UAAS,OAAoB;QACzB,IAAI,KAAY,CAAC;QACjB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,CAAC;aAAM,CAAC;YACJ,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC3C,oEAAoE;YACpE,qFAAqF;YACrF;;gBAEI;QACR,CAAC;QAED,IAAM,KAAK,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC3D,OAAO,IAAI,6BAAY,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IACL,mBAAC;AAAD,CAAC,AAzED,CAAkC,uBAAU,GAyE3C;AAzEY,oCAAY"}
@@ -1,7 +1,7 @@
1
- import { NumberValue } from "../values/number-value";
2
- import { Expression } from "./expression";
3
- export declare class NumberExpr extends Expression {
4
- value: any;
5
- constructor(value: any);
6
- evaluate(): NumberValue;
7
- }
1
+ import { NumberValue } from "../values/number-value";
2
+ import { Expression } from "./expression";
3
+ export declare class NumberExpr extends Expression {
4
+ value: any;
5
+ constructor(value: any);
6
+ evaluate(): NumberValue;
7
+ }