@eagleoutice/flowr 2.1.1 → 2.1.3

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 (131) hide show
  1. package/README.md +2 -1
  2. package/cli/repl/commands/repl-parse.js +7 -16
  3. package/cli/repl/commands/repl-query.d.ts +0 -5
  4. package/cli/repl/commands/repl-query.js +2 -73
  5. package/core/print/parse-printer.js +1 -22
  6. package/core/steps/pipeline/default-pipelines.d.ts +64 -0
  7. package/core/steps/pipeline/default-pipelines.js +2 -1
  8. package/dataflow/cluster.d.ts +20 -0
  9. package/dataflow/cluster.js +46 -0
  10. package/dataflow/graph/edge.d.ts +2 -3
  11. package/dataflow/graph/graph.d.ts +1 -1
  12. package/documentation/data/server/doc-data-server-messages.d.ts +1 -1
  13. package/documentation/data/server/doc-data-server-messages.js +16 -5
  14. package/documentation/doc-util/doc-code.d.ts +1 -0
  15. package/documentation/doc-util/doc-code.js +9 -0
  16. package/documentation/doc-util/doc-dfg.d.ts +1 -0
  17. package/documentation/doc-util/doc-dfg.js +5 -4
  18. package/documentation/doc-util/doc-normalized-ast.js +2 -2
  19. package/documentation/doc-util/doc-query.d.ts +5 -1
  20. package/documentation/doc-util/doc-query.js +154 -9
  21. package/documentation/doc-util/doc-server-message.js +3 -5
  22. package/documentation/doc-util/doc-types.js +19 -11
  23. package/documentation/print-dataflow-graph-wiki.js +10 -1
  24. package/documentation/print-interface-wiki.js +1 -1
  25. package/documentation/print-normalized-ast-wiki.js +2 -2
  26. package/documentation/print-query-wiki.js +196 -37
  27. package/package.json +3 -2
  28. package/queries/{call-context-query → catalog/call-context-query}/call-context-query-executor.d.ts +4 -3
  29. package/queries/{call-context-query → catalog/call-context-query}/call-context-query-executor.js +22 -16
  30. package/queries/{call-context-query → catalog/call-context-query}/call-context-query-format.d.ts +6 -2
  31. package/queries/catalog/cluster-query/cluster-query-executor.d.ts +3 -0
  32. package/queries/catalog/cluster-query/cluster-query-executor.js +19 -0
  33. package/queries/catalog/cluster-query/cluster-query-format.d.ts +12 -0
  34. package/queries/catalog/cluster-query/cluster-query-format.js +3 -0
  35. package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +3 -0
  36. package/queries/catalog/dataflow-query/dataflow-query-executor.js +17 -0
  37. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +12 -0
  38. package/queries/catalog/dataflow-query/dataflow-query-format.js +3 -0
  39. package/queries/catalog/id-map-query/id-map-query-executor.d.ts +3 -0
  40. package/queries/catalog/id-map-query/id-map-query-executor.js +17 -0
  41. package/queries/catalog/id-map-query/id-map-query-format.d.ts +8 -0
  42. package/{r-bridge/lang-4.x/ast/parser/xml/normalizer-data.js → queries/catalog/id-map-query/id-map-query-format.js} +1 -1
  43. package/queries/catalog/lineage-query/lineage-query-executor.d.ts +3 -0
  44. package/queries/catalog/lineage-query/lineage-query-executor.js +22 -0
  45. package/queries/catalog/lineage-query/lineage-query-format.d.ts +14 -0
  46. package/queries/catalog/lineage-query/lineage-query-format.js +3 -0
  47. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +3 -0
  48. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +17 -0
  49. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +11 -0
  50. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +3 -0
  51. package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +4 -0
  52. package/queries/catalog/static-slice-query/static-slice-query-executor.js +40 -0
  53. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +24 -0
  54. package/queries/catalog/static-slice-query/static-slice-query-format.js +3 -0
  55. package/queries/query-schema.d.ts +6 -0
  56. package/queries/query-schema.js +26 -3
  57. package/queries/query.d.ts +22 -4
  58. package/queries/query.js +14 -2
  59. package/r-bridge/lang-4.x/ast/parser/json/format.d.ts +37 -13
  60. package/r-bridge/lang-4.x/ast/parser/json/format.js +59 -6
  61. package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +0 -3
  62. package/r-bridge/lang-4.x/ast/parser/json/parser.js +2 -40
  63. package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then-else.d.ts +15 -0
  64. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/control/normalize-if-then-else.js +5 -8
  65. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/control/normalize-if-then.d.ts +7 -7
  66. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/control/normalize-if-then.js +11 -12
  67. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/expression/normalize-expression.d.ts +3 -3
  68. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/expression/normalize-expression.js +4 -7
  69. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/functions/normalize-argument.d.ts +2 -2
  70. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/functions/normalize-argument.js +3 -3
  71. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/functions/normalize-call.d.ts +3 -3
  72. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/functions/normalize-call.js +6 -9
  73. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/functions/normalize-definition.d.ts +3 -3
  74. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/functions/normalize-definition.js +1 -3
  75. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/functions/normalize-parameter.d.ts +2 -2
  76. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/functions/normalize-parameter.js +6 -5
  77. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/loops/normalize-break.d.ts +2 -2
  78. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/loops/normalize-for.d.ts +2 -2
  79. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/loops/normalize-for.js +5 -6
  80. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/loops/normalize-next.d.ts +2 -2
  81. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/loops/normalize-repeat.d.ts +2 -2
  82. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.d.ts +4 -0
  83. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/loops/normalize-while.js +4 -4
  84. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/normalize-access.d.ts +3 -3
  85. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/normalize-access.js +1 -2
  86. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/operators/normalize-binary.d.ts +2 -2
  87. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/operators/normalize-binary.js +2 -2
  88. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/operators/normalize-unary.d.ts +2 -2
  89. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/other/normalize-comment.d.ts +3 -3
  90. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/other/normalize-comment.js +1 -1
  91. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/other/normalize-line-directive.d.ts +3 -3
  92. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/other/normalize-line-directive.js +1 -1
  93. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-delimiter.d.ts +3 -0
  94. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.d.ts +10 -0
  95. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/structure/normalize-root.d.ts +2 -2
  96. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/structure/normalize-root.js +3 -4
  97. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/structure/normalize-single-node.d.ts +2 -2
  98. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/structure/normalize-single-node.js +2 -2
  99. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/values/normalize-number.d.ts +3 -3
  100. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/values/normalize-number.js +1 -1
  101. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/values/normalize-string.d.ts +3 -3
  102. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/values/normalize-string.js +1 -1
  103. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/values/normalize-symbol.d.ts +3 -3
  104. package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/values/normalize-symbol.js +1 -3
  105. package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +41 -0
  106. package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +85 -0
  107. package/r-bridge/lang-4.x/ast/parser/{xml → main}/normalizer-data.d.ts +10 -4
  108. package/r-bridge/lang-4.x/ast/parser/main/normalizer-data.js +14 -0
  109. package/slicing/criterion/parse.d.ts +1 -1
  110. package/statistics/summarizer/post-process/clusterer.d.ts +1 -1
  111. package/util/ansi.js +9 -2
  112. package/util/time.d.ts +4 -0
  113. package/util/time.js +8 -0
  114. package/util/version.js +1 -1
  115. package/documentation/doc-util/doc-ms.d.ts +0 -1
  116. package/documentation/doc-util/doc-ms.js +0 -8
  117. package/r-bridge/lang-4.x/ast/parser/xml/input-format.d.ts +0 -39
  118. package/r-bridge/lang-4.x/ast/parser/xml/input-format.js +0 -38
  119. package/r-bridge/lang-4.x/ast/parser/xml/internal/control/normalize-if-then-else.d.ts +0 -15
  120. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/normalize-while.d.ts +0 -4
  121. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/normalize-delimiter.d.ts +0 -3
  122. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/normalize-expressions.d.ts +0 -10
  123. package/r-bridge/lang-4.x/ast/parser/xml/normalize-meta.d.ts +0 -47
  124. package/r-bridge/lang-4.x/ast/parser/xml/normalize-meta.js +0 -110
  125. /package/queries/{call-context-query → catalog/call-context-query}/call-context-query-format.js +0 -0
  126. /package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/loops/normalize-break.js +0 -0
  127. /package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/loops/normalize-next.js +0 -0
  128. /package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/loops/normalize-repeat.js +0 -0
  129. /package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/operators/normalize-unary.js +0 -0
  130. /package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/structure/normalize-delimiter.js +0 -0
  131. /package/r-bridge/lang-4.x/ast/parser/{xml → main}/internal/structure/normalize-expressions.js +0 -0
@@ -16,7 +16,6 @@ const normalize_single_node_1 = require("../structure/normalize-single-node");
16
16
  * @returns The parsed argument or `undefined` if the given object is not an argument.
17
17
  */
18
18
  function tryToNormalizeArgument(data, objs) {
19
- parser_1.parseLog.debug('[argument]');
20
19
  if (objs.length < 1 || objs.length > 3) {
21
20
  parser_1.parseLog.warn(`Either [expr|value], [SYMBOL_SUB, EQ_SUB], or [SYMBOL_SUB, EQ_SUB, expr], but got: ${objs.map(o => o.name).join(', ')}`);
22
21
  return undefined;
@@ -64,7 +63,8 @@ function tryToNormalizeArgument(data, objs) {
64
63
  }
65
64
  function parseWithValue(data, objs) {
66
65
  (0, assert_1.guard)(objs[1].name === type_1.RawRType.EqualSub, () => `[arg-default] second element of parameter must be ${type_1.RawRType.EqualFormals}, but: ${JSON.stringify(objs)}`);
67
- (0, assert_1.guard)(objs.length === 2 || objs[2].name === type_1.RawRType.Expression, () => `[arg-default] third element of parameter must be an Expression or undefined (for 'x=') but: ${JSON.stringify(objs)}`);
68
- return objs[2] ? (0, normalize_single_node_1.normalizeSingleNode)(data, objs[2]) : null;
66
+ const snd = objs[2];
67
+ (0, assert_1.guard)(objs.length === 2 || snd.name === type_1.RawRType.Expression, () => `[arg-default] third element of parameter must be an Expression or undefined (for 'x=') but: ${JSON.stringify(objs)}`);
68
+ return snd ? (0, normalize_single_node_1.normalizeSingleNode)(data, snd) : null;
69
69
  }
70
70
  //# sourceMappingURL=normalize-argument.js.map
@@ -1,15 +1,15 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { NamedXmlBasedJson } from '../../input-format';
3
2
  import type { RFunctionCall } from '../../../../model/nodes/r-function-call';
4
3
  import type { RNext } from '../../../../model/nodes/r-next';
5
4
  import type { RBreak } from '../../../../model/nodes/r-break';
5
+ import type { NamedJsonEntry } from '../../../json/format';
6
6
  /**
7
7
  * Tries to parse the given data as a function call.
8
8
  *
9
9
  * @param data - The data used by the parser (see {@link NormalizerData})
10
- * @param mappedWithName - The json object to extract the meta-information from
10
+ * @param mappedWithName - The JSON object to extract the meta-information from
11
11
  *
12
12
  * @returns The parsed {@link RFunctionCall} (either named or unnamed) or `undefined` if the given construct is not a function call
13
13
  * May return a {@link RNext} or {@link RBreak} as `next()` and `break()` work as such.
14
14
  */
15
- export declare function tryNormalizeFunctionCall(data: NormalizerData, mappedWithName: NamedXmlBasedJson[]): RFunctionCall | RNext | RBreak | undefined;
15
+ export declare function tryNormalizeFunctionCall(data: NormalizerData, mappedWithName: readonly NamedJsonEntry[]): RFunctionCall | RNext | RBreak | undefined;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tryNormalizeFunctionCall = tryNormalizeFunctionCall;
4
- const input_format_1 = require("../../input-format");
5
4
  const parser_1 = require("../../../json/parser");
6
5
  const normalize_meta_1 = require("../../normalize-meta");
7
6
  const arrays_1 = require("../../../../../../../util/arrays");
@@ -16,7 +15,7 @@ const normalize_symbol_1 = require("../values/normalize-symbol");
16
15
  * Tries to parse the given data as a function call.
17
16
  *
18
17
  * @param data - The data used by the parser (see {@link NormalizerData})
19
- * @param mappedWithName - The json object to extract the meta-information from
18
+ * @param mappedWithName - The JSON object to extract the meta-information from
20
19
  *
21
20
  * @returns The parsed {@link RFunctionCall} (either named or unnamed) or `undefined` if the given construct is not a function call
22
21
  * May return a {@link RNext} or {@link RBreak} as `next()` and `break()` work as such.
@@ -31,9 +30,8 @@ function tryNormalizeFunctionCall(data, mappedWithName) {
31
30
  parser_1.parseLog.trace('expected function call to have parenthesis for a call, but was not');
32
31
  return undefined;
33
32
  }
34
- parser_1.parseLog.trace('trying to parse function call');
35
- const { unwrappedObj, content, location } = (0, normalize_meta_1.retrieveMetaStructure)(fnBase.content);
36
- const symbolContent = (0, input_format_1.getKeyGuarded)(unwrappedObj, input_format_1.childrenKey);
33
+ const { content, location } = (0, normalize_meta_1.retrieveMetaStructure)(fnBase.content);
34
+ const symbolContent = fnBase.content.children;
37
35
  const namedSymbolContent = (0, normalize_meta_1.getWithTokenType)(symbolContent);
38
36
  if (namedSymbolContent.length === 1 && namedSymbolContent[0].name === type_1.RawRType.StringConst) {
39
37
  // special handling when someone calls a function by string
@@ -41,8 +39,7 @@ function tryNormalizeFunctionCall(data, mappedWithName) {
41
39
  }
42
40
  else if (namedSymbolContent.findIndex(x => x.name === type_1.RawRType.SymbolFunctionCall) < 0) {
43
41
  parser_1.parseLog.trace(`is not named function call, as the name is not of type ${type_1.RType.FunctionCall}, but: ${namedSymbolContent.map(n => n.name).join(',')}`);
44
- const mayResult = tryParseUnnamedFunctionCall(data, mappedWithName, location, content);
45
- return mayResult;
42
+ return tryParseUnnamedFunctionCall(data, mappedWithName, location, content);
46
43
  }
47
44
  else {
48
45
  return parseNamedFunctionCall(data, namedSymbolContent, mappedWithName, location, content);
@@ -68,7 +65,7 @@ function tryParseUnnamedFunctionCall(data, mappedWithName, location, content) {
68
65
  const calledFunction = (0, normalize_expression_1.normalizeExpression)(data, mappedWithName[0].content);
69
66
  const parsedArguments = parseArguments(mappedWithName, data);
70
67
  if (parsedArguments.length === 0) {
71
- // sadly, next() and break() work
68
+ // interestingly, next() and break() work
72
69
  if (calledFunction.type === type_1.RType.Next) {
73
70
  return {
74
71
  type: type_1.RType.Next,
@@ -125,7 +122,7 @@ function parseNamedFunctionCall(data, symbolContent, mappedWithName, location, c
125
122
  functionName = (0, normalize_symbol_1.tryNormalizeSymbol)(data, symbolContent);
126
123
  }
127
124
  (0, assert_1.guard)(functionName !== undefined, 'expected function name to be a symbol, yet received none');
128
- (0, assert_1.guard)((functionName).type === type_1.RType.Symbol, () => `expected function name to be a symbol, yet received ${JSON.stringify(functionName)}`);
125
+ (0, assert_1.guard)(functionName.type === type_1.RType.Symbol, () => `expected function name to be a symbol, yet received ${JSON.stringify(functionName)}`);
129
126
  const parsedArguments = parseArguments(mappedWithName, data);
130
127
  return {
131
128
  type: type_1.RType.FunctionCall,
@@ -1,12 +1,12 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { NamedXmlBasedJson } from '../../input-format';
3
2
  import type { RFunctionDefinition } from '../../../../model/nodes/r-function-definition';
3
+ import type { NamedJsonEntry } from '../../../json/format';
4
4
  /**
5
5
  * Tries to parse the given data as a function definition.
6
6
  *
7
7
  * @param data - The data used by the parser (see {@link NormalizerData})
8
- * @param mappedWithName - The json object to extract the meta-information from
8
+ * @param mappedWithName - The JSON object to extract the meta-information from
9
9
  *
10
10
  * @returns The parsed {@link RFunctionDefinition} or `undefined` if the given construct is not a function definition
11
11
  */
12
- export declare function tryNormalizeFunctionDefinition(data: NormalizerData, mappedWithName: readonly NamedXmlBasedJson[]): RFunctionDefinition | undefined;
12
+ export declare function tryNormalizeFunctionDefinition(data: NormalizerData, mappedWithName: readonly NamedJsonEntry[]): RFunctionDefinition | undefined;
@@ -12,7 +12,7 @@ const normalize_expressions_1 = require("../structure/normalize-expressions");
12
12
  * Tries to parse the given data as a function definition.
13
13
  *
14
14
  * @param data - The data used by the parser (see {@link NormalizerData})
15
- * @param mappedWithName - The json object to extract the meta-information from
15
+ * @param mappedWithName - The JSON object to extract the meta-information from
16
16
  *
17
17
  * @returns The parsed {@link RFunctionDefinition} or `undefined` if the given construct is not a function definition
18
18
  */
@@ -28,13 +28,11 @@ function tryNormalizeFunctionDefinition(data, mappedWithName) {
28
28
  const closingParenIndex = mappedWithName.findIndex(x => x.name === type_1.RawRType.ParenRight);
29
29
  (0, assert_1.guard)(closingParenIndex !== -1, () => `expected closing parenthesis, yet received ${JSON.stringify(mappedWithName)}`);
30
30
  const splitParameters = (0, arrays_1.splitArrayOn)(mappedWithName.slice(2, closingParenIndex), x => x.name === type_1.RawRType.Comma);
31
- parser_1.parseLog.trace(`function definition has ${splitParameters.length} parameters (by comma split)`);
32
31
  const parameters = splitParameters.map(x => (0, normalize_parameter_1.tryNormalizeParameter)(data, x));
33
32
  if (parameters.some(p => p === undefined)) {
34
33
  parser_1.parseLog.error(`function had unexpected unknown parameters: ${JSON.stringify(parameters.filter(assert_1.isNotUndefined))}, aborting.`);
35
34
  return undefined;
36
35
  }
37
- parser_1.parseLog.trace(`function definition retained ${parameters.length} parameters after parsing, moving to body.`);
38
36
  const bodyStructure = mappedWithName.slice(closingParenIndex + 1);
39
37
  (0, assert_1.guard)(bodyStructure.length === 1, () => `expected function body to be unique, yet received ${bodyStructure.length}`);
40
38
  const body = (0, normalize_expressions_1.normalizeExpressions)(data, bodyStructure);
@@ -1,6 +1,6 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { NamedXmlBasedJson } from '../../input-format';
3
2
  import type { RParameter } from '../../../../model/nodes/r-parameter';
3
+ import type { NamedJsonEntry } from '../../../json/format';
4
4
  /**
5
5
  * Either parses `[SYMBOL_FORMALS]` or `[SYMBOL_FORMALS, EQ_FORMALS, expr]` as a parameter of a function definition in R.
6
6
  * Probably directly called by the function definition parser as otherwise, we do not expect to find parameters.
@@ -10,4 +10,4 @@ import type { RParameter } from '../../../../model/nodes/r-parameter';
10
10
  *
11
11
  * @returns The parsed parameter or `undefined` if the given object is not a parameter.
12
12
  */
13
- export declare function tryNormalizeParameter(data: NormalizerData, objs: readonly NamedXmlBasedJson[]): RParameter | undefined;
13
+ export declare function tryNormalizeParameter(data: NormalizerData, objs: readonly NamedJsonEntry[]): RParameter | undefined;
@@ -16,7 +16,6 @@ const normalize_single_node_1 = require("../structure/normalize-single-node");
16
16
  * @returns The parsed parameter or `undefined` if the given object is not a parameter.
17
17
  */
18
18
  function tryNormalizeParameter(data, objs) {
19
- parser_1.parseLog.debug('[parameter]');
20
19
  if (objs.length !== 1 && objs.length !== 3) {
21
20
  parser_1.parseLog.warn(`Either [SYMBOL_FORMALS] or [SYMBOL_FORMALS, EQ_FORMALS, expr], but got: ${JSON.stringify(objs)}`);
22
21
  return undefined;
@@ -28,6 +27,7 @@ function tryNormalizeParameter(data, objs) {
28
27
  }
29
28
  const defaultValue = objs.length === 3 ? parseWithDefaultValue(data, objs) : undefined;
30
29
  const { location, content } = (0, normalize_meta_1.retrieveMetaStructure)(symbol.content);
30
+ const delim = defaultValue?.type === type_1.RType.Delimiter;
31
31
  return {
32
32
  type: type_1.RType.Parameter,
33
33
  location,
@@ -44,17 +44,18 @@ function tryNormalizeParameter(data, objs) {
44
44
  fullLexeme: content
45
45
  }
46
46
  },
47
- defaultValue: defaultValue?.type === type_1.RType.Delimiter ? undefined : defaultValue,
47
+ defaultValue: delim ? undefined : defaultValue,
48
48
  info: {
49
49
  fullRange: location,
50
50
  fullLexeme: content,
51
- additionalTokens: defaultValue?.type === type_1.RType.Delimiter ? [defaultValue] : []
51
+ additionalTokens: delim ? [defaultValue] : []
52
52
  }
53
53
  };
54
54
  }
55
55
  function parseWithDefaultValue(data, objs) {
56
56
  (0, assert_1.guard)(objs[1].name === type_1.RawRType.EqualFormals, () => `[arg-default] second element of parameter must be ${type_1.RawRType.EqualFormals}, but: ${JSON.stringify(objs)}`);
57
- (0, assert_1.guard)(objs[2].name === type_1.RawRType.Expression, () => `[arg-default] third element of parameter must be an Expression but: ${JSON.stringify(objs)}`);
58
- return (0, normalize_single_node_1.normalizeSingleNode)(data, objs[2]);
57
+ const snd = objs[2];
58
+ (0, assert_1.guard)(snd.name === type_1.RawRType.Expression, () => `[arg-default] third element of parameter must be an Expression but: ${JSON.stringify(objs)}`);
59
+ return (0, normalize_single_node_1.normalizeSingleNode)(data, snd);
59
60
  }
60
61
  //# sourceMappingURL=normalize-parameter.js.map
@@ -1,4 +1,4 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { XmlBasedJson } from '../../input-format';
3
2
  import type { RBreak } from '../../../../model/nodes/r-break';
4
- export declare function normalizeBreak(data: NormalizerData, obj: XmlBasedJson): RBreak;
3
+ import type { JsonEntry } from '../../../json/format';
4
+ export declare function normalizeBreak(data: NormalizerData, obj: JsonEntry): RBreak;
@@ -1,4 +1,4 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { NamedXmlBasedJson } from '../../input-format';
3
2
  import type { RForLoop } from '../../../../model/nodes/r-for-loop';
4
- export declare function tryNormalizeFor(data: NormalizerData, [forToken, head, body]: [NamedXmlBasedJson, NamedXmlBasedJson, NamedXmlBasedJson]): RForLoop | undefined;
3
+ import type { NamedJsonEntry } from '../../../json/format';
4
+ export declare function tryNormalizeFor(data: NormalizerData, [forToken, head, body]: [NamedJsonEntry, NamedJsonEntry, NamedJsonEntry]): RForLoop | undefined;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tryNormalizeFor = tryNormalizeFor;
4
- const input_format_1 = require("../../input-format");
4
+ const normalizer_data_1 = require("../../normalizer-data");
5
5
  const parser_1 = require("../../../json/parser");
6
6
  const normalize_meta_1 = require("../../normalize-meta");
7
7
  const assert_1 = require("../../../../../../../util/assert");
@@ -17,19 +17,18 @@ function tryNormalizeFor(data, [forToken, head, body]) {
17
17
  return undefined;
18
18
  }
19
19
  else if (head.name !== type_1.RawRType.ForCondition) {
20
- throw new input_format_1.XmlParseError(`expected condition for for-loop but found ${JSON.stringify(head)}`);
20
+ throw new normalizer_data_1.ParseError(`expected condition for for-loop but found ${JSON.stringify(head)}`);
21
21
  }
22
22
  else if (body.name !== type_1.RawRType.Expression && body.name !== type_1.RawRType.ExprOfAssignOrHelp && body.name !== type_1.RawRType.LegacyEqualAssign) {
23
- throw new input_format_1.XmlParseError(`expected expr body for for-loop but found ${JSON.stringify(body)}`);
23
+ throw new normalizer_data_1.ParseError(`expected expr body for for-loop but found ${JSON.stringify(body)}`);
24
24
  }
25
- parser_1.parseLog.debug('trying to parse for-loop');
26
25
  const newParseData = { ...data, data, currentRange: undefined, currentLexeme: undefined };
27
26
  const { variable: parsedVariable, vector: parsedVector, comments } = normalizeForHead(newParseData, head.content);
28
27
  const parseBody = (0, normalize_single_node_1.normalizeSingleNode)(newParseData, body);
29
28
  if (parsedVariable === undefined ||
30
29
  parsedVector === undefined ||
31
30
  parseBody.type === type_1.RType.Delimiter) {
32
- throw new input_format_1.XmlParseError(`unexpected under-sided for-loop, received ${JSON.stringify([
31
+ throw new normalizer_data_1.ParseError(`unexpected under-sided for-loop, received ${JSON.stringify([
33
32
  parsedVariable,
34
33
  parsedVariable,
35
34
  parseBody,
@@ -52,7 +51,7 @@ function tryNormalizeFor(data, [forToken, head, body]) {
52
51
  }
53
52
  function normalizeForHead(data, forCondition) {
54
53
  // must have a child which is `in`, a variable on the left, and a vector on the right
55
- const children = (0, input_format_1.getKeyGuarded)(forCondition, input_format_1.childrenKey).map(content => ({ name: (0, normalize_meta_1.getTokenType)(content), content }));
54
+ const children = (0, normalize_meta_1.getWithTokenType)(forCondition.children);
56
55
  const { comments, others } = (0, normalize_expressions_1.splitComments)(children);
57
56
  const inPosition = others.findIndex(elem => elem.name === type_1.RawRType.ForIn);
58
57
  (0, assert_1.guard)(inPosition > 0 && inPosition < others.length - 1, () => `for loop searched in and found at ${inPosition}, but this is not in legal bounds for ${JSON.stringify(children)}`);
@@ -1,4 +1,4 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { XmlBasedJson } from '../../input-format';
3
2
  import type { RNext } from '../../../../model/nodes/r-next';
4
- export declare function normalizeNext(data: NormalizerData, obj: XmlBasedJson): RNext;
3
+ import type { JsonEntry } from '../../../json/format';
4
+ export declare function normalizeNext(data: NormalizerData, obj: JsonEntry): RNext;
@@ -1,6 +1,6 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { NamedXmlBasedJson } from '../../input-format';
3
2
  import type { RRepeatLoop } from '../../../../model/nodes/r-repeat-loop';
3
+ import type { NamedJsonEntry } from '../../../json/format';
4
4
  /**
5
5
  * Try to parse the construct as a {@link RRepeatLoop}.
6
6
  *
@@ -10,4 +10,4 @@ import type { RRepeatLoop } from '../../../../model/nodes/r-repeat-loop';
10
10
  *
11
11
  * @returns The parsed {@link RRepeatLoop} or `undefined` if the given construct is not a repeat-loop
12
12
  */
13
- export declare function tryNormalizeRepeat(data: NormalizerData, [repeatToken, bodyToken]: [NamedXmlBasedJson, NamedXmlBasedJson]): RRepeatLoop | undefined;
13
+ export declare function tryNormalizeRepeat(data: NormalizerData, [repeatToken, bodyToken]: [NamedJsonEntry, NamedJsonEntry]): RRepeatLoop | undefined;
@@ -0,0 +1,4 @@
1
+ import type { NormalizerData } from '../../normalizer-data';
2
+ import type { RWhileLoop } from '../../../../model/nodes/r-while-loop';
3
+ import type { NamedJsonEntry } from '../../../json/format';
4
+ export declare function tryNormalizeWhile(data: NormalizerData, [whileToken, leftParen, condition, rightParen, body]: [NamedJsonEntry, NamedJsonEntry, NamedJsonEntry, NamedJsonEntry, NamedJsonEntry]): RWhileLoop | undefined;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tryNormalizeWhile = tryNormalizeWhile;
4
- const input_format_1 = require("../../input-format");
4
+ const normalizer_data_1 = require("../../normalizer-data");
5
5
  const parser_1 = require("../../../json/parser");
6
6
  const normalize_meta_1 = require("../../normalize-meta");
7
7
  const type_1 = require("../../../../model/type");
@@ -12,16 +12,16 @@ function tryNormalizeWhile(data, [whileToken, leftParen, condition, rightParen,
12
12
  return undefined;
13
13
  }
14
14
  else if (leftParen.name !== type_1.RawRType.ParenLeft) {
15
- throw new input_format_1.XmlParseError(`expected left-parenthesis for while but found ${JSON.stringify(leftParen)}`);
15
+ throw new normalizer_data_1.ParseError(`expected left-parenthesis for while but found ${JSON.stringify(leftParen)}`);
16
16
  }
17
17
  else if (rightParen.name !== type_1.RawRType.ParenRight) {
18
- throw new input_format_1.XmlParseError(`expected right-parenthesis for while but found ${JSON.stringify(rightParen)}`);
18
+ throw new normalizer_data_1.ParseError(`expected right-parenthesis for while but found ${JSON.stringify(rightParen)}`);
19
19
  }
20
20
  parser_1.parseLog.debug('trying to parse while-loop');
21
21
  const parsedCondition = (0, normalize_single_node_1.normalizeSingleNode)(data, condition);
22
22
  const parseBody = (0, normalize_single_node_1.normalizeSingleNode)(data, body);
23
23
  if (parsedCondition.type === type_1.RType.Delimiter || parseBody.type === type_1.RType.Delimiter) {
24
- throw new input_format_1.XmlParseError(`unexpected under-sided while-loop, received ${JSON.stringify([
24
+ throw new normalizer_data_1.ParseError(`unexpected under-sided while-loop, received ${JSON.stringify([
25
25
  parsedCondition,
26
26
  parseBody,
27
27
  ])} for ${JSON.stringify([whileToken, condition, body])}`);
@@ -1,12 +1,12 @@
1
- import type { NamedXmlBasedJson } from '../input-format';
2
1
  import type { NormalizerData } from '../normalizer-data';
3
2
  import type { RAccess } from '../../../model/nodes/r-access';
3
+ import type { NamedJsonEntry } from '../../json/format';
4
4
  /**
5
5
  * Tries to normalize the given data as access (e.g., indexing).
6
6
  *
7
7
  * @param data - The data used by the parser (see {@link NormalizerData})
8
- * @param mappedWithName - The json object to extract the meta-information from
8
+ * @param mappedWithName - The JSON object to extract the meta-information from
9
9
  *
10
10
  * @returns The parsed {@link RAccess} or `undefined` if the given construct is not accessing a value
11
11
  */
12
- export declare function tryNormalizeAccess(data: NormalizerData, mappedWithName: NamedXmlBasedJson[]): RAccess | undefined;
12
+ export declare function tryNormalizeAccess(data: NormalizerData, mappedWithName: NamedJsonEntry[]): RAccess | undefined;
@@ -40,12 +40,11 @@ function normalizeAbstractArgument(x, data, operator) {
40
40
  * Tries to normalize the given data as access (e.g., indexing).
41
41
  *
42
42
  * @param data - The data used by the parser (see {@link NormalizerData})
43
- * @param mappedWithName - The json object to extract the meta-information from
43
+ * @param mappedWithName - The JSON object to extract the meta-information from
44
44
  *
45
45
  * @returns The parsed {@link RAccess} or `undefined` if the given construct is not accessing a value
46
46
  */
47
47
  function tryNormalizeAccess(data, mappedWithName) {
48
- parser_1.parseLog.trace('trying to parse access');
49
48
  if (mappedWithName.length < 3) {
50
49
  parser_1.parseLog.trace('expected at least three elements are required to parse an access');
51
50
  return undefined;
@@ -1,8 +1,8 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { NamedXmlBasedJson } from '../../input-format';
3
2
  import type { RNode } from '../../../../model/model';
3
+ import type { NamedJsonEntry } from '../../../json/format';
4
4
  /**
5
5
  * Parsing binary operations includes the pipe, even though the produced PIPE construct is not a binary operation,
6
6
  * to ensure it is handled separately from the others (especially in the combination of a pipe bind)
7
7
  */
8
- export declare function tryNormalizeBinary(data: NormalizerData, [lhs, operator, rhs]: [NamedXmlBasedJson, NamedXmlBasedJson, NamedXmlBasedJson]): RNode | undefined;
8
+ export declare function tryNormalizeBinary(data: NormalizerData, [lhs, operator, rhs]: [NamedJsonEntry, NamedJsonEntry, NamedJsonEntry]): RNode | undefined;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tryNormalizeBinary = tryNormalizeBinary;
4
- const input_format_1 = require("../../input-format");
4
+ const normalizer_data_1 = require("../../normalizer-data");
5
5
  const parser_1 = require("../../../json/parser");
6
6
  const normalize_meta_1 = require("../../normalize-meta");
7
7
  const assert_1 = require("../../../../../../../util/assert");
@@ -28,7 +28,7 @@ function parseBinaryOp(data, lhs, operator, rhs) {
28
28
  const parsedLhs = (0, normalize_single_node_1.normalizeSingleNode)(data, lhs);
29
29
  const parsedRhs = (0, normalize_single_node_1.normalizeSingleNode)(data, rhs);
30
30
  if (parsedLhs.type === type_1.RType.Delimiter || parsedRhs.type === type_1.RType.Delimiter) {
31
- throw new input_format_1.XmlParseError(`unexpected under-sided binary op, received ${JSON.stringify([parsedLhs, parsedRhs])} for ${JSON.stringify([lhs, operator, rhs])}`);
31
+ throw new normalizer_data_1.ParseError(`unexpected under-sided binary op, received ${JSON.stringify([parsedLhs, parsedRhs])} for ${JSON.stringify([lhs, operator, rhs])}`);
32
32
  }
33
33
  const operationName = (0, normalize_meta_1.retrieveOpName)(operator);
34
34
  const { location, content } = (0, normalize_meta_1.retrieveMetaStructure)(operator.content);
@@ -1,6 +1,6 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { NamedXmlBasedJson } from '../../input-format';
3
2
  import type { RNode } from '../../../../model/model';
3
+ import type { NamedJsonEntry } from '../../../json/format';
4
4
  /**
5
5
  * Parses the construct as a {@link RUnaryOp}.
6
6
  *
@@ -10,4 +10,4 @@ import type { RNode } from '../../../../model/model';
10
10
  *
11
11
  * @returns The parsed {@link RUnaryOp} or `undefined` if the given construct is not a unary operator
12
12
  */
13
- export declare function tryNormalizeUnary(data: NormalizerData, [operator, operand]: [NamedXmlBasedJson, NamedXmlBasedJson]): RNode | undefined;
13
+ export declare function tryNormalizeUnary(data: NormalizerData, [operator, operand]: [NamedJsonEntry, NamedJsonEntry]): RNode | undefined;
@@ -1,11 +1,11 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { XmlBasedJson } from '../../input-format';
3
2
  import type { RComment } from '../../../../model/nodes/r-comment';
3
+ import type { JsonEntry } from '../../../json/format';
4
4
  /**
5
5
  * Normalize the given object as an R comment.
6
6
  * This requires you to check the corresponding name beforehand.
7
7
  *
8
8
  * @param data - The data used by the parser (see {@link NormalizerData})
9
- * @param obj - The json object to extract the meta-information from
9
+ * @param obj - The JSON object to extract the meta-information from
10
10
  */
11
- export declare function normalizeComment(data: NormalizerData, obj: XmlBasedJson): RComment;
11
+ export declare function normalizeComment(data: NormalizerData, obj: JsonEntry): RComment;
@@ -9,7 +9,7 @@ const type_1 = require("../../../../model/type");
9
9
  * This requires you to check the corresponding name beforehand.
10
10
  *
11
11
  * @param data - The data used by the parser (see {@link NormalizerData})
12
- * @param obj - The json object to extract the meta-information from
12
+ * @param obj - The JSON object to extract the meta-information from
13
13
  */
14
14
  function normalizeComment(data, obj) {
15
15
  const { location, content } = (0, normalize_meta_1.retrieveMetaStructure)(obj);
@@ -1,13 +1,13 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { XmlBasedJson } from '../../input-format';
3
2
  import type { RLineDirective } from '../../../../model/nodes/r-line-directive';
4
3
  import type { RComment } from '../../../../model/nodes/r-comment';
4
+ import type { JsonEntry } from '../../../json/format';
5
5
  /**
6
6
  * Normalize the given object as an R line directive (`#line <number> "<file>"`).
7
7
  * This requires you to check the corresponding name beforehand.
8
8
  * If the given object turns out to be no line directive, this returns a normal comment instead.
9
9
  *
10
10
  * @param data - The data used by the parser (see {@link NormalizerData})
11
- * @param obj - The json object to extract the meta-information from
11
+ * @param obj - The JSON object to extract the meta-information from
12
12
  */
13
- export declare function normalizeLineDirective(data: NormalizerData, obj: XmlBasedJson): RLineDirective | RComment;
13
+ export declare function normalizeLineDirective(data: NormalizerData, obj: JsonEntry): RLineDirective | RComment;
@@ -12,7 +12,7 @@ const LineDirectiveRegex = /^#line\s+(\d+)\s+"([^"]+)"\s*$/;
12
12
  * If the given object turns out to be no line directive, this returns a normal comment instead.
13
13
  *
14
14
  * @param data - The data used by the parser (see {@link NormalizerData})
15
- * @param obj - The json object to extract the meta-information from
15
+ * @param obj - The JSON object to extract the meta-information from
16
16
  */
17
17
  function normalizeLineDirective(data, obj) {
18
18
  const { location, content } = (0, normalize_meta_1.retrieveMetaStructure)(obj);
@@ -0,0 +1,3 @@
1
+ import type { RDelimiter } from '../../../../model/nodes/info/r-delimiter';
2
+ import type { NamedJsonEntry } from '../../../json/format';
3
+ export declare function normalizeDelimiter(elem: NamedJsonEntry): RDelimiter;
@@ -0,0 +1,10 @@
1
+ import type { NormalizerData } from '../../normalizer-data';
2
+ import type { RDelimiter } from '../../../../model/nodes/info/r-delimiter';
3
+ import type { RNode } from '../../../../model/model';
4
+ import type { JsonEntry, NamedJsonEntry } from '../../../json/format';
5
+ export declare function splitComments(tokens: readonly NamedJsonEntry[]): {
6
+ comments: NamedJsonEntry[];
7
+ others: NamedJsonEntry[];
8
+ };
9
+ export declare function normalizeExpressions(data: NormalizerData, tokens: readonly JsonEntry[] | readonly NamedJsonEntry[]): (RNode | RDelimiter)[];
10
+ export declare function parseNodesWithUnknownType(data: NormalizerData, mappedWithName: readonly NamedJsonEntry[] | undefined): (RNode | RDelimiter)[];
@@ -1,4 +1,4 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { XmlBasedJson } from '../../input-format';
3
2
  import type { RExpressionList } from '../../../../model/nodes/r-expression-list';
4
- export declare function normalizeRootObjToAst(data: NormalizerData, obj: XmlBasedJson): RExpressionList;
3
+ import type { JsonEntry } from '../../../json/format';
4
+ export declare function normalizeRootObjToAst(data: NormalizerData, obj: JsonEntry): RExpressionList;
@@ -1,18 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeRootObjToAst = normalizeRootObjToAst;
4
- const input_format_1 = require("../../input-format");
5
4
  const normalize_meta_1 = require("../../normalize-meta");
6
5
  const normalize_expressions_1 = require("./normalize-expressions");
7
6
  const log_1 = require("../../../../../../../util/log");
8
7
  const arrays_1 = require("../../../../../../../util/arrays");
9
8
  const type_1 = require("../../../../model/type");
10
9
  function normalizeRootObjToAst(data, obj) {
11
- const exprContent = (0, input_format_1.getKeyGuarded)(obj, type_1.RawRType.ExpressionList);
10
+ const exprContent = obj.token;
12
11
  (0, normalize_meta_1.assureTokenType)(exprContent, type_1.RawRType.ExpressionList);
13
12
  let parsedChildren = [];
14
- if (input_format_1.childrenKey in exprContent) {
15
- const children = (0, input_format_1.getKeyGuarded)(exprContent, input_format_1.childrenKey);
13
+ if (obj.children.length > 0) {
14
+ const children = obj.children;
16
15
  parsedChildren = (0, normalize_expressions_1.normalizeExpressions)(data, children);
17
16
  }
18
17
  else {
@@ -1,7 +1,7 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { NamedXmlBasedJson } from '../../input-format';
3
2
  import type { RNode } from '../../../../model/model';
4
3
  import type { RDelimiter } from '../../../../model/nodes/info/r-delimiter';
4
+ import type { NamedJsonEntry } from '../../../json/format';
5
5
  /**
6
6
  * Parses a single structure in the ast based on its type (e.g., a string, a number, a symbol, ...)
7
7
  *
@@ -10,4 +10,4 @@ import type { RDelimiter } from '../../../../model/nodes/info/r-delimiter';
10
10
  *
11
11
  * @returns The parsed element as an `RNode` or an `RDelimiter` if it is such.
12
12
  */
13
- export declare function normalizeSingleNode(data: NormalizerData, elem: NamedXmlBasedJson): RNode | RDelimiter;
13
+ export declare function normalizeSingleNode(data: NormalizerData, elem: NamedJsonEntry): RNode | RDelimiter;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeSingleNode = normalizeSingleNode;
4
4
  const normalize_meta_1 = require("../../normalize-meta");
5
- const input_format_1 = require("../../input-format");
5
+ const normalizer_data_1 = require("../../normalizer-data");
6
6
  const normalize_line_directive_1 = require("../other/normalize-line-directive");
7
7
  const assert_1 = require("../../../../../../../util/assert");
8
8
  const normalize_delimiter_1 = require("./normalize-delimiter");
@@ -54,7 +54,7 @@ function normalizeSingleNode(data, elem) {
54
54
  return symbol;
55
55
  }
56
56
  default:
57
- throw new input_format_1.XmlParseError(`unknown type ${elem.name} for ${JSON.stringify(elem)} in ${JSON.stringify(data)}`);
57
+ throw new normalizer_data_1.ParseError(`unknown type ${elem.name} for ${JSON.stringify(elem)} in ${JSON.stringify(data)}`);
58
58
  }
59
59
  }
60
60
  //# sourceMappingURL=normalize-single-node.js.map
@@ -1,16 +1,16 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { XmlBasedJson } from '../../input-format';
3
2
  import type { RNa } from '../../../../../convert-values';
4
3
  import type { RNumber } from '../../../../model/nodes/r-number';
5
4
  import type { RLogical } from '../../../../model/nodes/r-logical';
6
5
  import type { RSymbol } from '../../../../model/nodes/r-symbol';
7
6
  import type { NoInfo } from '../../../../model/model';
7
+ import type { JsonEntry } from '../../../json/format';
8
8
  /**
9
9
  * Normalize the given object as a R number (see {@link number2ts}), supporting booleans (see {@link boolean2ts}),
10
10
  * and special values.
11
11
  * This requires you to check the corresponding name beforehand.
12
12
  *
13
13
  * @param data - The data used by the parser (see {@link NormalizerData})
14
- * @param obj - The json object to extract the meta-information from
14
+ * @param obj - The JSON object to extract the meta-information from
15
15
  */
16
- export declare function normalizeNumber(data: NormalizerData, obj: XmlBasedJson): RNumber | RLogical | RSymbol<NoInfo, typeof RNa>;
16
+ export declare function normalizeNumber(data: NormalizerData, obj: JsonEntry): RNumber | RLogical | RSymbol<NoInfo, typeof RNa>;
@@ -10,7 +10,7 @@ const type_1 = require("../../../../model/type");
10
10
  * This requires you to check the corresponding name beforehand.
11
11
  *
12
12
  * @param data - The data used by the parser (see {@link NormalizerData})
13
- * @param obj - The json object to extract the meta-information from
13
+ * @param obj - The JSON object to extract the meta-information from
14
14
  */
15
15
  function normalizeNumber(data, obj) {
16
16
  const { location, content } = (0, normalize_meta_1.retrieveMetaStructure)(obj);
@@ -1,11 +1,11 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { XmlBasedJson } from '../../input-format';
3
2
  import type { RString } from '../../../../model/nodes/r-string';
3
+ import type { JsonEntry } from '../../../json/format';
4
4
  /**
5
5
  * Normalize the given object as a R string (see {@link string2ts}).
6
6
  * This requires you to check the corresponding name beforehand.
7
7
  *
8
8
  * @param data - The data used by the parser (see {@link NormalizerData})
9
- * @param obj - The json object to extract the meta-information from
9
+ * @param obj - The JSON object to extract the meta-information from
10
10
  */
11
- export declare function normalizeString(data: NormalizerData, obj: XmlBasedJson): RString;
11
+ export declare function normalizeString(data: NormalizerData, obj: JsonEntry): RString;
@@ -10,7 +10,7 @@ const type_1 = require("../../../../model/type");
10
10
  * This requires you to check the corresponding name beforehand.
11
11
  *
12
12
  * @param data - The data used by the parser (see {@link NormalizerData})
13
- * @param obj - The json object to extract the meta-information from
13
+ * @param obj - The JSON object to extract the meta-information from
14
14
  */
15
15
  function normalizeString(data, obj) {
16
16
  const { location, content } = (0, normalize_meta_1.retrieveMetaStructure)(obj);
@@ -1,14 +1,14 @@
1
1
  import type { NormalizerData } from '../../normalizer-data';
2
- import type { NamedXmlBasedJson } from '../../input-format';
3
2
  import type { RSymbol } from '../../../../model/nodes/r-symbol';
3
+ import type { NamedJsonEntry } from '../../../json/format';
4
4
  /**
5
5
  * Normalize the given object as an R symbol (incorporating namespace information).
6
6
  * <p>
7
7
  * The special symbols `T` and `F` are parsed as logic values.
8
8
  *
9
9
  * @param data - The data used by the parser (see {@link NormalizerData})
10
- * @param objs - The json object to extract the meta-information from
10
+ * @param objs - The JSON object to extract the meta-information from
11
11
  *
12
12
  * @returns The parsed symbol (with populated namespace information) or `undefined` if the given object is not a symbol.
13
13
  */
14
- export declare function tryNormalizeSymbol(data: NormalizerData, objs: readonly NamedXmlBasedJson[]): RSymbol | undefined;
14
+ export declare function tryNormalizeSymbol(data: NormalizerData, objs: readonly NamedJsonEntry[]): RSymbol | undefined;