@eagleoutice/flowr 2.10.8 → 2.10.9

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/README.md CHANGED
@@ -24,7 +24,7 @@ It offers a wide variety of features, for example:
24
24
 
25
25
  ```shell
26
26
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
27
- flowR repl using flowR v2.10.7, R grammar v14 (tree-sitter engine)
27
+ flowR repl using flowR v2.10.8, R grammar v14 (tree-sitter engine)
28
28
  R> :query @linter "read.csv(\"/root/x.txt\")"
29
29
  ```
30
30
 
@@ -35,11 +35,11 @@ It offers a wide variety of features, for example:
35
35
  ```text
36
36
  Query: linter (2 ms)
37
37
  ╰ Deprecated Functions (deprecated-functions):
38
- ╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 1, processTimeMs: 0
38
+ ╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0
39
39
  ╰ File Path Validity (file-path-validity):
40
40
  ╰ certain:
41
41
  ╰ Path `/root/x.txt` at 1.1-23
42
- ╰ Metadata: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 0, processTimeMs: 0
42
+ ╰ Metadata: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 1, processTimeMs: 0
43
43
  ╰ Seeded Randomness (seeded-randomness):
44
44
  ╰ Metadata: consumerCalls: 0, callsWithFunctionProducers: 0, callsWithAssignmentProducers: 0, callsWithNonConstantProducers: 0, callsWithOtherBranchProducers: 0, searchTimeMs: 0, processTimeMs: 0
45
45
  ╰ Absolute Paths (absolute-file-paths):
@@ -51,9 +51,9 @@ It offers a wide variety of features, for example:
51
51
  ╰ Naming Convention (naming-convention):
52
52
  ╰ Metadata: numMatches: 0, numBreak: 0, searchTimeMs: 0, processTimeMs: 0
53
53
  ╰ Network Functions (network-functions):
54
- ╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 1
54
+ ╰ Metadata: totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0
55
55
  ╰ Dataframe Access Validation (dataframe-access-validation):
56
- ╰ Metadata: numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 0
56
+ ╰ Metadata: numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 1
57
57
  ╰ Dead Code (dead-code):
58
58
  ╰ Metadata: consideredNodes: 5, searchTimeMs: 0, processTimeMs: 0
59
59
  ╰ Useless Loops (useless-loop):
@@ -86,13 +86,13 @@ It offers a wide variety of features, for example:
86
86
 
87
87
  _Results (prettified and summarized):_
88
88
 
89
- Query: **linter** (2 ms)\
89
+ Query: **linter** (3 ms)\
90
90
     ╰ **Deprecated Functions** (deprecated-functions):\
91
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0</code>\
91
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 1, processTimeMs: 0</code>\
92
92
  &nbsp;&nbsp;&nbsp;╰ **File Path Validity** (file-path-validity):\
93
93
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ certain:\
94
94
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ Path `/root/x.txt` at 1.1-23\
95
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 1, processTimeMs: 0</code>\
95
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 0, processTimeMs: 0</code>\
96
96
  &nbsp;&nbsp;&nbsp;╰ **Seeded Randomness** (seeded-randomness):\
97
97
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>consumerCalls: 0, callsWithFunctionProducers: 0, callsWithAssignmentProducers: 0, callsWithNonConstantProducers: 0, callsWithOtherBranchProducers: 0, searchTimeMs: 0, processTimeMs: 0</code>\
98
98
  &nbsp;&nbsp;&nbsp;╰ **Absolute Paths** (absolute-file-paths):\
@@ -106,9 +106,9 @@ It offers a wide variety of features, for example:
106
106
  &nbsp;&nbsp;&nbsp;╰ **Network Functions** (network-functions):\
107
107
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>totalCalls: 0, totalFunctionDefinitions: 0, searchTimeMs: 0, processTimeMs: 0</code>\
108
108
  &nbsp;&nbsp;&nbsp;╰ **Dataframe Access Validation** (dataframe-access-validation):\
109
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 1</code>\
109
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>numOperations: 0, numAccesses: 0, totalAccessed: 0, searchTimeMs: 0, processTimeMs: 0</code>\
110
110
  &nbsp;&nbsp;&nbsp;╰ **Dead Code** (dead-code):\
111
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>consideredNodes: 5, searchTimeMs: 0, processTimeMs: 0</code>\
111
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>consideredNodes: 5, searchTimeMs: 1, processTimeMs: 0</code>\
112
112
  &nbsp;&nbsp;&nbsp;╰ **Useless Loops** (useless-loop):\
113
113
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>numOfUselessLoops: 0, searchTimeMs: 0, processTimeMs: 0</code>\
114
114
  &nbsp;&nbsp;&nbsp;╰ **Problematic inputs** (problematic-inputs):\
@@ -117,11 +117,11 @@ It offers a wide variety of features, for example:
117
117
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>consideredNodes: 0, searchTimeMs: 0, processTimeMs: 0</code>\
118
118
  &nbsp;&nbsp;&nbsp;╰ **Roxygen Arguments** (roxygen-arguments):\
119
119
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;╰ _Metadata_: <code>searchTimeMs: 0, processTimeMs: 0</code>\
120
- _All queries together required ≈2 ms (1ms accuracy, total 2 ms)_
120
+ _All queries together required ≈3 ms (1ms accuracy, total 3 ms)_
121
121
 
122
122
  <details> <summary style="color:gray">Show Detailed Results as Json</summary>
123
123
 
124
- The analysis required _2.4 ms_ (including parsing and normalization and the query) within the generation environment.
124
+ The analysis required _2.8 ms_ (including parsing and normalization and the query) within the generation environment.
125
125
 
126
126
  In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR.
127
127
  Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
@@ -138,7 +138,7 @@ It offers a wide variety of features, for example:
138
138
  ".meta": {
139
139
  "totalCalls": 0,
140
140
  "totalFunctionDefinitions": 0,
141
- "searchTimeMs": 0,
141
+ "searchTimeMs": 1,
142
142
  "processTimeMs": 0
143
143
  }
144
144
  },
@@ -161,7 +161,7 @@ It offers a wide variety of features, for example:
161
161
  "totalUnknown": 0,
162
162
  "totalWritesBeforeAlways": 0,
163
163
  "totalValid": 0,
164
- "searchTimeMs": 1,
164
+ "searchTimeMs": 0,
165
165
  "processTimeMs": 0
166
166
  }
167
167
  },
@@ -230,14 +230,14 @@ It offers a wide variety of features, for example:
230
230
  "numAccesses": 0,
231
231
  "totalAccessed": 0,
232
232
  "searchTimeMs": 0,
233
- "processTimeMs": 1
233
+ "processTimeMs": 0
234
234
  }
235
235
  },
236
236
  "dead-code": {
237
237
  "results": [],
238
238
  ".meta": {
239
239
  "consideredNodes": 5,
240
- "searchTimeMs": 0,
240
+ "searchTimeMs": 1,
241
241
  "processTimeMs": 0
242
242
  }
243
243
  },
@@ -273,11 +273,11 @@ It offers a wide variety of features, for example:
273
273
  }
274
274
  },
275
275
  ".meta": {
276
- "timing": 2
276
+ "timing": 3
277
277
  }
278
278
  },
279
279
  ".meta": {
280
- "timing": 2
280
+ "timing": 3
281
281
  }
282
282
  }
283
283
  ```
@@ -342,7 +342,7 @@ It offers a wide variety of features, for example:
342
342
 
343
343
  ```shell
344
344
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
345
- flowR repl using flowR v2.10.7, R grammar v14 (tree-sitter engine)
345
+ flowR repl using flowR v2.10.8, R grammar v14 (tree-sitter engine)
346
346
  R> :query @static-slice (11@sum) file://test/testfiles/example.R
347
347
  ```
348
348
 
@@ -356,7 +356,7 @@ It offers a wide variety of features, for example:
356
356
  N <- 10
357
357
  for(i in 1:(N-1)) sum <- sum + i + w
358
358
  sum
359
- All queries together required ≈2 ms (1ms accuracy, total 2 ms)
359
+ All queries together required ≈1 ms (1ms accuracy, total 2 ms)
360
360
  ```
361
361
 
362
362
 
@@ -390,7 +390,7 @@ It offers a wide variety of features, for example:
390
390
 
391
391
 
392
392
  * 🚀 **fast call-graph, data-, and control-flow graphs**\
393
- Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">98.6 ms</span></i> (as of Jun 3, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
393
+ Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">99.7 ms</span></i> (as of Jun 13, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
394
394
  _flowR_ can analyze the data- and control-flow of the average real-world R&nbsp;script. See the [benchmarks](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark) for more information,
395
395
  and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/dataflow-graph) for more details on the [dataflow graphs](https://github.com/flowr-analysis/flowr/wiki/dataflow-graph) as well as [call graphs](https://github.com/flowr-analysis/flowr/wiki/dataflow-graph#perspectives-cg).
396
396
 
@@ -426,7 +426,7 @@ It offers a wide variety of features, for example:
426
426
 
427
427
  ```shell
428
428
  $ docker run -it --rm eagleoutice/flowr # or npm run flowr
429
- flowR repl using flowR v2.10.7, R grammar v14 (tree-sitter engine)
429
+ flowR repl using flowR v2.10.8, R grammar v14 (tree-sitter engine)
430
430
  R> :dataflow* test/testfiles/example.R
431
431
  ```
432
432
 
@@ -734,7 +734,7 @@ It offers a wide variety of features, for example:
734
734
  ```
735
735
 
736
736
 
737
- (The analysis required _1.9 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
737
+ (The analysis required _2.2 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment.)
738
738
 
739
739
 
740
740
 
package/config.d.ts CHANGED
@@ -83,6 +83,16 @@ export interface FlowrLaxSourcingOptions extends MergeableRecord {
83
83
  * - `faa-bar.R` (replaced spaces and oo)
84
84
  */
85
85
  readonly applyReplacements?: Record<string, string>[];
86
+ /**
87
+ * Whether to check the heap memory usage before analyzing a sourced file,
88
+ * skipping the analysis when memory pressure exceeds {@link memoryThreshold}.
89
+ */
90
+ readonly checkMemoryOnSource?: boolean;
91
+ /**
92
+ * Fraction of the V8 heap limit at which source analysis is skipped (0-1).
93
+ * Only effective when {@link checkMemoryOnSource} is true.
94
+ */
95
+ readonly memoryThreshold?: number;
86
96
  }
87
97
  export type ConfigPlugin<T extends BuiltInFlowrPluginName | string> = T | string | (T extends BuiltInFlowrPluginName ? [T, BuiltInFlowrPluginArgs<T>] : [string, unknown[]]);
88
98
  /**
package/config.js CHANGED
@@ -105,7 +105,9 @@ exports.FlowrConfig = {
105
105
  ignoreCapitalization: true,
106
106
  inferWorkingDirectory: InferWorkingDirectory.ActiveScript,
107
107
  searchPath: [],
108
- repeatedSourceLimit: 2
108
+ repeatedSourceLimit: 2,
109
+ checkMemoryOnSource: true,
110
+ memoryThreshold: 0.9
109
111
  },
110
112
  instrument: {
111
113
  dataflowExtractors: undefined
@@ -172,7 +174,9 @@ exports.FlowrConfig = {
172
174
  inferWorkingDirectory: joi_1.default.string().valid(...Object.values(InferWorkingDirectory)).description('Try to infer the working directory from the main or any script to analyze.'),
173
175
  searchPath: joi_1.default.array().items(joi_1.default.string()).description('Additionally search in these paths.'),
174
176
  repeatedSourceLimit: joi_1.default.number().optional().description('How often the same file can be sourced within a single run? Please be aware: in case of cyclic sources this may not reach a fixpoint so give this a sensible limit.'),
175
- applyReplacements: joi_1.default.array().items(joi_1.default.object()).description('Provide name replacements for loaded files')
177
+ applyReplacements: joi_1.default.array().items(joi_1.default.object()).description('Provide name replacements for loaded files'),
178
+ checkMemoryOnSource: joi_1.default.boolean().optional().description('Check heap memory usage before analyzing a sourced file, skipping when memory pressure exceeds the configured threshold.'),
179
+ memoryThreshold: joi_1.default.number().min(0).max(1).optional().description('Fraction of the V8 heap limit (0-1) at which source analysis is skipped. Only effective when checkMemoryOnSource is true.')
176
180
  }).optional().description('If lax source calls are active, flowR searches for sourced files much more freely, based on the configurations you give it. This option is only in effect if `ignoreSourceCalls` is set to false.'),
177
181
  slicer: joi_1.default.object({
178
182
  threshold: joi_1.default.number().optional().description('The maximum number of iterations to perform on a single function call during slicing.'),
@@ -549,9 +549,15 @@ function cfgExprList(node, _grouping, expressions) {
549
549
  }
550
550
  }
551
551
  result.graph.mergeWith(expression.graph);
552
- result.breaks.push(...expression.breaks);
553
- result.nexts.push(...expression.nexts);
554
- result.returns.push(...expression.returns);
552
+ for (const b of expression.breaks) {
553
+ result.breaks.push(b);
554
+ }
555
+ for (const n of expression.nexts) {
556
+ result.nexts.push(n);
557
+ }
558
+ for (const r of expression.returns) {
559
+ result.returns.push(r);
560
+ }
555
561
  result.exitPoints = expression.exitPoints;
556
562
  }
557
563
  const exitId = control_flow_graph_1.CfgVertex.toExitId(nodeId);
@@ -121,7 +121,16 @@ function produceDataFlowGraph(parser, completeAst, ctx) {
121
121
  referenceChain: [files[0].filePath],
122
122
  ctx
123
123
  };
124
- let df = (0, processor_1.processDataflowFor)(files[0].root, dfData);
124
+ let df;
125
+ try {
126
+ df = (0, processor_1.processDataflowFor)(files[0].root, dfData);
127
+ }
128
+ catch (e) {
129
+ if (e instanceof RangeError) {
130
+ throw new Error(`Dataflow analysis exceeded the call stack for '${files[0].filePath ?? '<inline>'}' (code is too deeply nested). Consider --stack-size=65536 when invoking Node.js.`, { cause: e });
131
+ }
132
+ throw e;
133
+ }
125
134
  for (let i = 1; i < files.length; i++) {
126
135
  /* source requests register automatically */
127
136
  df = (0, built_in_source_1.standaloneSourceFile)(i, files[i], dfData, df);
@@ -349,14 +349,18 @@ class DataflowGraph {
349
349
  * in the context of function definitions
350
350
  */
351
351
  mergeWith(otherGraph, mergeRootVertices = true) {
352
- if (otherGraph === undefined) {
352
+ if (otherGraph === undefined || otherGraph === this) {
353
353
  return this;
354
354
  }
355
355
  this.mergeVertices(otherGraph, mergeRootVertices);
356
356
  for (const [type, ids] of otherGraph.types) {
357
357
  const existing = this.types.get(type);
358
358
  if (existing) {
359
- existing.push(...ids);
359
+ if (existing !== ids) {
360
+ for (const id of ids) {
361
+ existing.push(id);
362
+ }
363
+ }
360
364
  }
361
365
  else {
362
366
  this.types.set(type, ids.slice());
package/dataflow/info.js CHANGED
@@ -38,7 +38,9 @@ function addNonDefaultExitPoints(existing, invertExitCds, activeCds, add) {
38
38
  return;
39
39
  }
40
40
  const invertedCds = toAdd.flatMap(e => e.cds?.filter(icd => !activeCds?.some(e => e.id === icd.id && e.when === icd.when)).map(negateControlDependency)).filter(assert_1.isNotUndefined);
41
- existing.push(...toAdd);
41
+ for (const ep of toAdd) {
42
+ existing.push(ep);
43
+ }
42
44
  for (const icd of invertedCds) {
43
45
  if (!invertExitCds.some(e => e.id === icd.id && e.when === icd.when)) {
44
46
  invertExitCds.push(icd);
@@ -180,7 +180,9 @@ function processExpressionList(name, args, rootId, data) {
180
180
  }
181
181
  const ingoing = [];
182
182
  for (const refs of remainingRead.values()) {
183
- ingoing.push(...refs);
183
+ for (const ref of refs) {
184
+ ingoing.push(ref);
185
+ }
184
186
  }
185
187
  const rootNode = data.completeAst.idMap.get(rootId);
186
188
  const withGroup = rootNode?.grouping;
@@ -25,6 +25,7 @@ const parser_1 = require("../../../../../../r-bridge/lang-4.x/ast/parser/json/pa
25
25
  const shell_executor_1 = require("../../../../../../r-bridge/shell-executor");
26
26
  const assert_1 = require("../../../../../../util/assert");
27
27
  const path_1 = __importDefault(require("path"));
28
+ const v8_1 = require("v8");
28
29
  const general_1 = require("../../../../../eval/values/general");
29
30
  const r_value_1 = require("../../../../../eval/values/r-value");
30
31
  const unknown_side_effect_1 = require("../../../../../graph/unknown-side-effect");
@@ -210,6 +211,25 @@ function sourceRequest(rootId, request, data, information, makeMaybe, getId) {
210
211
  else {
211
212
  (0, assert_1.guard)(textRequest !== undefined, `Expected text request to be defined for sourced file ${JSON.stringify(request)}`);
212
213
  }
214
+ if (textRequest.path) {
215
+ const dotIdx = textRequest.path.lastIndexOf('.');
216
+ const ext = dotIdx >= 0 ? textRequest.path.slice(dotIdx).toLowerCase() : '';
217
+ if (ext !== '' && ext !== '.r') {
218
+ (0, log_1.expensiveTrace)(logger_1.dataflowLogger, () => `Skipping source of non-R file ${JSON.stringify(textRequest.path)}`);
219
+ (0, unknown_side_effect_1.handleUnknownSideEffect)(information.graph, information.environment, rootId);
220
+ return information;
221
+ }
222
+ }
223
+ const resolveSource = data.ctx.config.solver.resolveSource;
224
+ if (resolveSource?.checkMemoryOnSource) {
225
+ // eslint-disable-next-line @typescript-eslint/naming-convention
226
+ const { used_heap_size, heap_size_limit } = (0, v8_1.getHeapStatistics)();
227
+ if (heap_size_limit > 0 && used_heap_size / heap_size_limit > (resolveSource.memoryThreshold ?? .9)) {
228
+ logger_1.dataflowLogger.warn(`Skipping source of ${JSON.stringify(request)} due to memory pressure (${Math.round(used_heap_size / 1048576)}/${Math.round(heap_size_limit / 1048576)} MB used)`);
229
+ (0, unknown_side_effect_1.handleUnknownSideEffect)(information.graph, information.environment, rootId);
230
+ return information;
231
+ }
232
+ }
213
233
  const parsed = (!data.parser.async ? data.parser : new shell_executor_1.RShellExecutor()).parse(textRequest.r);
214
234
  const normalized = (typeof parsed !== 'string' ?
215
235
  (0, parser_1.normalizeTreeSitter)({ files: [{ parsed, filePath: textRequest.path }] }, getId, data.ctx.config)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagleoutice/flowr",
3
- "version": "2.10.8",
3
+ "version": "2.10.9",
4
4
  "description": "Static Dataflow Analyzer and Program Slicer for the R Programming Language",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "repository": {
@@ -127,7 +127,16 @@ function decorateAst(project, { getId = deterministicCountingIdGenerator(0) }) {
127
127
  ...project,
128
128
  files: project.files.map(file => {
129
129
  info.file = file.filePath;
130
- const decoratedAst = (0, stateful_fold_1.foldAstStateful)(file.root, 0, folds);
130
+ let decoratedAst;
131
+ try {
132
+ decoratedAst = (0, stateful_fold_1.foldAstStateful)(file.root, 0, folds);
133
+ }
134
+ catch (e) {
135
+ if (e instanceof RangeError) {
136
+ throw new Error(`AST decoration exceeded the call stack for '${file.filePath ?? '<inline>'}' (code is too deeply nested). Consider --stack-size=65536 when invoking Node.js.`, { cause: e });
137
+ }
138
+ throw e;
139
+ }
131
140
  decoratedAst.info.role = "root" /* RoleInParent.Root */;
132
141
  decoratedAst.info.index = 0;
133
142
  return {
@@ -239,13 +239,21 @@ function convertTreeNode(node) {
239
239
  };
240
240
  }
241
241
  case tree_sitter_types_1.TreeSitterType.NamespaceOperator: {
242
- const [lhs, int, rhs] = nonErrorChildren(node);
242
+ const [comments, children] = splitComments(nonErrorChildren(node));
243
+ if (children.length < 3) {
244
+ break;
245
+ }
246
+ const [lhs, int, rhs] = children;
243
247
  return {
244
248
  type: type_1.RType.Symbol,
245
249
  location: makeSourceRange(rhs),
246
250
  content: identifier_1.Identifier.make(rhs.text, lhs.text, int.text === ':::'),
247
251
  lexeme: rhs.text,
248
- ...defaultInfo
252
+ ...defaultInfo,
253
+ info: {
254
+ ...defaultInfo.info,
255
+ adToks: comments.map(c => c[1]),
256
+ }
249
257
  };
250
258
  }
251
259
  case '(':
package/util/objects.js CHANGED
@@ -76,7 +76,9 @@ function deepMergeObjectInPlace(base, addon) {
76
76
  deepMergeObjectWithResult(addon, base, base);
77
77
  }
78
78
  else if (baseIsArray && addonIsArray) {
79
- (base).push(...addon);
79
+ for (const item of addon) {
80
+ base.push(item);
81
+ }
80
82
  }
81
83
  else {
82
84
  throw new Error('cannot merge object with array!');
package/util/version.js CHANGED
@@ -6,7 +6,7 @@ exports.printVersionInformation = printVersionInformation;
6
6
  const semver_1 = require("semver");
7
7
  const assert_1 = require("./assert");
8
8
  // this is automatically replaced with the current version by release-it
9
- const version = '2.10.8';
9
+ const version = '2.10.9';
10
10
  /**
11
11
  * Retrieves the current flowR version as a new {@link SemVer} object.
12
12
  */