@eagleoutice/flowr 2.9.14 → 2.10.1

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 (110) hide show
  1. package/README.md +37 -25
  2. package/benchmark/stats/stats.d.ts +2 -2
  3. package/cli/repl/parser/slice-query-parser.d.ts +2 -2
  4. package/config.d.ts +4 -0
  5. package/config.js +5 -3
  6. package/dataflow/environments/identifier.d.ts +4 -0
  7. package/dataflow/environments/identifier.js +17 -0
  8. package/dataflow/graph/call-graph.d.ts +4 -7
  9. package/dataflow/graph/call-graph.js +0 -22
  10. package/dataflow/graph/df-helper.d.ts +9 -8
  11. package/dataflow/graph/df-helper.js +9 -2
  12. package/dataflow/graph/graph-helper.d.ts +9 -4
  13. package/dataflow/graph/graph-helper.js +26 -3
  14. package/dataflow/graph/graph.d.ts +13 -2
  15. package/dataflow/graph/graph.js +26 -4
  16. package/dataflow/graph/vertex.d.ts +2 -0
  17. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -0
  18. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +1 -1
  19. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
  20. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +2 -2
  21. package/dataflow/internal/process/functions/call/common.js +2 -1
  22. package/dataflow/internal/process/functions/process-parameter.js +1 -1
  23. package/documentation/doc-readme.js +2 -1
  24. package/documentation/wiki-linter.js +5 -0
  25. package/linter/linter-rules.d.ts +25 -0
  26. package/linter/linter-rules.js +2 -0
  27. package/linter/rules/problematic-eval.d.ts +44 -0
  28. package/linter/rules/problematic-eval.js +83 -0
  29. package/package.json +7 -7
  30. package/queries/catalog/df-shape-query/df-shape-query-executor.js +1 -1
  31. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +3 -3
  32. package/queries/catalog/does-call-query/does-call-query-executor.js +1 -1
  33. package/queries/catalog/does-call-query/does-call-query-format.d.ts +2 -2
  34. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -2
  35. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +3 -3
  36. package/queries/catalog/input-sources-query/input-sources-query-executor.d.ts +6 -0
  37. package/queries/catalog/input-sources-query/input-sources-query-executor.js +66 -0
  38. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +36 -0
  39. package/queries/catalog/input-sources-query/input-sources-query-format.js +63 -0
  40. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +90 -0
  41. package/queries/catalog/input-sources-query/simple-input-classifier.js +308 -0
  42. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +2 -2
  43. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +1 -1
  44. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
  45. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -1
  46. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -2
  47. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -2
  48. package/queries/catalog/location-map-query/location-map-query-executor.js +1 -1
  49. package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -2
  50. package/queries/catalog/origin-query/origin-query-executor.d.ts +2 -2
  51. package/queries/catalog/origin-query/origin-query-executor.js +1 -1
  52. package/queries/catalog/origin-query/origin-query-format.d.ts +3 -3
  53. package/queries/catalog/provenance-query/provenance-query-executor.d.ts +1 -4
  54. package/queries/catalog/provenance-query/provenance-query-executor.js +3 -6
  55. package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -2
  56. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +1 -1
  57. package/queries/query.d.ts +9 -1
  58. package/queries/query.js +2 -0
  59. package/r-bridge/lang-4.x/ast/model/model.d.ts +3 -0
  60. package/r-bridge/lang-4.x/ast/model/model.js +3 -0
  61. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +16 -1
  62. package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +2 -0
  63. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +16 -1
  64. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +2 -0
  65. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +16 -1
  66. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +2 -0
  67. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +15 -0
  68. package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +2 -0
  69. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +15 -0
  70. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +2 -0
  71. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +16 -1
  72. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +2 -0
  73. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +16 -1
  74. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +2 -0
  75. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +16 -1
  76. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +2 -0
  77. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +21 -0
  78. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +16 -0
  79. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +16 -1
  80. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +2 -0
  81. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +16 -1
  82. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +2 -0
  83. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +16 -1
  84. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +2 -0
  85. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +16 -1
  86. package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +2 -0
  87. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +16 -1
  88. package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +2 -0
  89. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +16 -1
  90. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +2 -0
  91. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +16 -1
  92. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +2 -0
  93. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +16 -1
  94. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +2 -0
  95. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +16 -1
  96. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -0
  97. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +16 -1
  98. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +2 -0
  99. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +16 -1
  100. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +2 -0
  101. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +16 -1
  102. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +2 -0
  103. package/search/search-executor/search-generators.js +1 -1
  104. package/slicing/criterion/parse.d.ts +11 -10
  105. package/slicing/criterion/parse.js +9 -8
  106. package/slicing/static/static-slicer.js +24 -1
  107. package/util/collections/arrays.d.ts +4 -0
  108. package/util/collections/arrays.js +7 -0
  109. package/util/mermaid/dfg.js +2 -1
  110. package/util/version.js +1 -1
@@ -7,10 +7,7 @@ const parse_1 = require("../../../slicing/criterion/parse");
7
7
  const df_helper_1 = require("../../../dataflow/graph/df-helper");
8
8
  const model_1 = require("../../../r-bridge/lang-4.x/ast/model/model");
9
9
  /**
10
- * Execute static slice queries, catching duplicates with the same fingerprint
11
- * @param analyzer - The basic query data containing the analyzer
12
- * @param queries - The static slice queries to execute
13
- * @returns The results of the static slice queries
10
+ * Execute a provenance query collection, {@link Dataflow.provenance}
14
11
  */
15
12
  async function executeProvenanceQuery({ analyzer }, queries) {
16
13
  const start = Date.now();
@@ -20,9 +17,9 @@ async function executeProvenanceQuery({ analyzer }, queries) {
20
17
  for (const query of queries) {
21
18
  const key = query.criterion;
22
19
  if (results[key]) {
23
- log_1.log.warn(`Duplicate Key for provenance query: ${key}, skipping...`);
20
+ log_1.log.warn(`Duplicate key for provenance query: ${key}, skipping...`);
24
21
  }
25
- const criterionId = parse_1.SingleSlicingCriterion.tryParse(key, nast.idMap) ?? key;
22
+ const criterionId = parse_1.SlicingCriterion.tryParse(key, nast.idMap) ?? key;
26
23
  const provenanceNode = nast.idMap.get(criterionId);
27
24
  const fdef = r_function_definition_1.RFunctionDefinition.wrappingFunctionDefinition(provenanceNode, nast.idMap);
28
25
  results[key] = Array.from(df_helper_1.Dataflow.provenance(criterionId, df.graph, fdef ? model_1.RNode.collectAllIds(fdef) : undefined));
@@ -1,5 +1,5 @@
1
1
  import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
2
- import type { SingleSlicingCriterion } from '../../../slicing/criterion/parse';
2
+ import type { SlicingCriterion } from '../../../slicing/criterion/parse';
3
3
  import type { ParsedQueryLine } from '../../query';
4
4
  import Joi from 'joi';
5
5
  import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
@@ -10,7 +10,7 @@ import { executeProvenanceQuery } from './provenance-query-executor';
10
10
  export interface ProvenanceQuery extends BaseQueryFormat {
11
11
  readonly type: 'provenance';
12
12
  /** The slicing criterion to use as a start*/
13
- readonly criterion: SingleSlicingCriterion;
13
+ readonly criterion: SlicingCriterion;
14
14
  /** Whether to stop on fdef boundaries */
15
15
  readonly restrictFdef?: boolean;
16
16
  }
@@ -25,7 +25,7 @@ async function executeResolveValueQuery({ analyzer }, queries) {
25
25
  log_1.log.warn(`Duplicate Key for resolve-value-query: ${key}, skipping...`);
26
26
  }
27
27
  const values = query.criteria
28
- .map(criteria => parse_1.SingleSlicingCriterion.parse(criteria, idMap))
28
+ .map(criteria => parse_1.SlicingCriterion.parse(criteria, idMap))
29
29
  .flatMap(ident => (0, alias_tracking_1.resolveIdToValue)(ident, { graph, full: true, idMap, resolve: analyzer.flowrConfig.solver.variables, ctx: analyzer.inspectContext() }));
30
30
  results[key] = {
31
31
  values: values
@@ -33,11 +33,12 @@ import type { CallGraphQuery } from './catalog/call-graph-query/call-graph-query
33
33
  import type { InspectRecursionQuery } from './catalog/inspect-recursion-query/inspect-recursion-query-format';
34
34
  import type { DoesCallQuery } from './catalog/does-call-query/does-call-query-format';
35
35
  import type { InspectExceptionQuery } from './catalog/inspect-exceptions-query/inspect-exception-query-format';
36
+ import type { InputSourcesQuery } from './catalog/input-sources-query/input-sources-query-format';
36
37
  import type { ProvenanceQuery } from './catalog/provenance-query/provenance-query-format';
37
38
  /**
38
39
  * These are all queries that can be executed from within flowR
39
40
  */
40
- export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | DoesCallQuery | CallGraphQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | DfShapeQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectExceptionQuery | InspectHigherOrderQuery | InspectRecursionQuery | ResolveValueQuery | ProjectQuery | OriginQuery | LinterQuery | ProvenanceQuery;
41
+ export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | DoesCallQuery | CallGraphQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | DfShapeQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectExceptionQuery | InspectHigherOrderQuery | InspectRecursionQuery | ResolveValueQuery | ProjectQuery | OriginQuery | LinterQuery | ProvenanceQuery | InputSourcesQuery;
41
42
  export type QueryArgumentsWithType<QueryType extends BaseQueryFormat['type']> = Query & {
42
43
  type: QueryType;
43
44
  };
@@ -164,6 +165,13 @@ export declare const SupportedQueries: {
164
165
  readonly schema: Joi.ObjectSchema<any>;
165
166
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
166
167
  };
168
+ readonly 'input-sources': {
169
+ readonly executor: typeof import("./catalog/input-sources-query/input-sources-query-executor").executeInputSourcesQuery;
170
+ readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
171
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"input-sources">;
172
+ readonly schema: Joi.ObjectSchema<any>;
173
+ readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
174
+ };
167
175
  readonly dependencies: {
168
176
  readonly executor: typeof import("./catalog/dependencies-query/dependencies-query-executor").executeDependenciesQuery;
169
177
  readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[], queries: readonly Query[]) => true;
package/queries/query.js CHANGED
@@ -40,6 +40,7 @@ const call_graph_query_format_1 = require("./catalog/call-graph-query/call-graph
40
40
  const inspect_recursion_query_format_1 = require("./catalog/inspect-recursion-query/inspect-recursion-query-format");
41
41
  const does_call_query_format_1 = require("./catalog/does-call-query/does-call-query-format");
42
42
  const inspect_exception_query_format_1 = require("./catalog/inspect-exceptions-query/inspect-exception-query-format");
43
+ const input_sources_query_format_1 = require("./catalog/input-sources-query/input-sources-query-format");
43
44
  const provenance_query_format_1 = require("./catalog/provenance-query/provenance-query-format");
44
45
  exports.SupportedQueries = {
45
46
  'call-context': call_context_query_format_1.CallContextQueryDefinition,
@@ -56,6 +57,7 @@ exports.SupportedQueries = {
56
57
  'dataflow-cluster': cluster_query_format_1.ClusterQueryDefinition,
57
58
  'static-slice': static_slice_query_format_1.StaticSliceQueryDefinition,
58
59
  'provenance': provenance_query_format_1.ProvenanceQueryDefinition,
60
+ 'input-sources': input_sources_query_format_1.InputSourcesDefinition,
59
61
  'dependencies': dependencies_query_format_1.DependenciesQueryDefinition,
60
62
  'location-map': location_map_query_format_1.LocationMapQueryDefinition,
61
63
  'search': search_query_format_1.SearchQueryDefinition,
@@ -219,6 +219,9 @@ export declare const ROther: {
219
219
  export type RNode<Info = NoInfo> = RExpressionList<Info> | RFunctions<Info> | ROther<Info> | RConstructs<Info> | RNamedAccess<Info> | RIndexAccess<Info> | RUnaryOp<Info> | RBinaryOp<Info> | RSingleNode<Info> | RPipe<Info>;
220
220
  /**
221
221
  * Helper object to provide helper functions for {@link RNode|RNodes}.
222
+ * For the individual type checks, please consult the individual vertices, e.g. {@link RPipe.is}.
223
+ * Some vertices also have a {@link RPipe.availableFromRVersion} property that indicates from which R version they are available,
224
+ * so you can check for that as well if needed.
222
225
  * @see {@link DefaultNormalizedAstFold} - for a more powerful way to traverse the normalized AST
223
226
  */
224
227
  export declare const RNode: {
@@ -120,6 +120,9 @@ exports.ROther = {
120
120
  };
121
121
  /**
122
122
  * Helper object to provide helper functions for {@link RNode|RNodes}.
123
+ * For the individual type checks, please consult the individual vertices, e.g. {@link RPipe.is}.
124
+ * Some vertices also have a {@link RPipe.availableFromRVersion} property that indicates from which R version they are available,
125
+ * so you can check for that as well if needed.
123
126
  * @see {@link DefaultNormalizedAstFold} - for a more powerful way to traverse the normalized AST
124
127
  */
125
128
  exports.RNode = {
@@ -1,4 +1,5 @@
1
- import type { RAstNodeBase, Location, NoInfo, RNode } from '../model';
1
+ import type { RAstNodeBase, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  import type { RArgument, RUnnamedArgument } from './r-argument';
4
5
  import type { EmptyArgument } from './r-function-call';
@@ -42,5 +43,19 @@ export declare const RAccess: {
42
43
  * Type guard for {@link RIndexAccess} nodes.
43
44
  */
44
45
  readonly isIndex: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RIndexAccess<Info>;
46
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
47
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
48
+ readonly getType: (this: void, node: RNode) => RType;
49
+ readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
50
+ readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
51
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof EmptyArgument)[];
52
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
53
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
54
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
55
+ readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
56
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
57
+ lexeme: string;
58
+ } ? string : string | undefined;
59
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
45
60
  };
46
61
  export {};
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RAccess = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RAccess} AST nodes.
7
8
  */
8
9
  exports.RAccess = {
10
+ ...model_1.RNode,
9
11
  name: 'RAccess',
10
12
  /**
11
13
  * Type guard for {@link RAccess} nodes.
@@ -1,4 +1,5 @@
1
- import type { RAstNodeBase, Location, NoInfo, RNode } from '../model';
1
+ import type { RAstNodeBase, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  import type { RSymbol } from './r-symbol';
4
5
  import type { ParentInformation } from '../processing/decorate';
@@ -53,4 +54,18 @@ export declare const RArgument: {
53
54
  * Retrieve the value of the argument with the given id from the list of arguments.
54
55
  */
55
56
  readonly getValue: <OtherInfo>(args: readonly RFunctionArgument<OtherInfo & ParentInformation>[], id: NodeId | undefined) => RNode<OtherInfo> | undefined;
57
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
58
+ readonly getId: (this: void, node: RNode<ParentInformation>) => NodeId;
59
+ readonly getType: (this: void, node: RNode) => RType;
60
+ readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
61
+ readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>) => Set<NodeId>;
62
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof EmptyArgument)[];
63
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap: Map<NodeId, RNode<OtherInfo & ParentInformation>>) => RNode<OtherInfo & ParentInformation> | undefined;
64
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation> | undefined, idMap: Map<NodeId, RNode<OtherInfo & ParentInformation>>) => Generator<RNode<OtherInfo & ParentInformation>>;
65
+ readonly depth: (this: void, node: RNode<ParentInformation>, idMap: Map<NodeId, RNode<ParentInformation>>) => number;
66
+ readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>, stop: (node: RNode<OtherInfo & ParentInformation>) => boolean) => Set<NodeId>;
67
+ readonly lexeme: <R extends RNode<ParentInformation>>(this: void, node: R | undefined) => R extends {
68
+ lexeme: string;
69
+ } ? string : string | undefined;
70
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
56
71
  };
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RArgument = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  const r_function_call_1 = require("./r-function-call");
6
7
  /**
7
8
  * Helper for working with {@link RArgument} AST nodes.
8
9
  */
9
10
  exports.RArgument = {
11
+ ...model_1.RNode,
10
12
  name: 'RArgument',
11
13
  /**
12
14
  * Type guard for {@link RArgument} nodes.
@@ -1,4 +1,5 @@
1
- import type { RAstNodeBase, Location, NoInfo, RNode } from '../model';
1
+ import type { RAstNodeBase, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  import type { OperatorInformationValue } from '../operators';
4
5
  /**
@@ -23,4 +24,18 @@ export declare const RBinaryOp: {
23
24
  * Get the operator information for a binary operator node.
24
25
  */
25
26
  readonly getOperatorInfo: <Info = object>(node: RBinaryOp<Info>) => OperatorInformationValue | undefined;
27
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
28
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
29
+ readonly getType: (this: void, node: RNode) => RType;
30
+ readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
31
+ readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
32
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
33
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
34
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
35
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
36
+ readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
37
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
38
+ lexeme: string;
39
+ } ? string : string | undefined;
40
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
26
41
  };
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RBinaryOp = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  const operators_1 = require("../operators");
6
7
  /**
7
8
  * Helper for working with {@link RBinaryOp} AST nodes.
8
9
  */
9
10
  exports.RBinaryOp = {
11
+ ...model_1.RNode,
10
12
  name: 'RBinaryOp',
11
13
  /**
12
14
  * Type guard for {@link RBinaryOp} nodes.
@@ -1,4 +1,5 @@
1
1
  import type { Leaf, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  /**
4
5
  * A `break` statement.
@@ -15,4 +16,18 @@ export declare const RBreak: {
15
16
  * Type guard for {@link RBreak} nodes.
16
17
  */
17
18
  readonly is: <Info = object>(this: void, node: unknown) => node is RBreak<Info>;
19
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
20
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
21
+ readonly getType: (this: void, node: RNode) => RType;
22
+ readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
23
+ readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
24
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
25
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
26
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
27
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
28
+ readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
29
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
30
+ lexeme: string;
31
+ } ? string : string | undefined;
32
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
18
33
  };
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RBreak = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RBreak} AST nodes.
7
8
  */
8
9
  exports.RBreak = {
10
+ ...model_1.RNode,
9
11
  name: 'RBreak',
10
12
  /**
11
13
  * Type guard for {@link RBreak} nodes.
@@ -1,4 +1,5 @@
1
1
  import type { Leaf, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  /**
4
5
  * ```r
@@ -17,4 +18,18 @@ export declare const RComment: {
17
18
  * Type guard for {@link RComment} nodes.
18
19
  */
19
20
  readonly is: <Info = object>(this: void, node: unknown) => node is RComment<Info>;
21
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
22
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
23
+ readonly getType: (this: void, node: RNode) => RType;
24
+ readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
25
+ readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
26
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
27
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
28
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
29
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
30
+ readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
31
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
32
+ lexeme: string;
33
+ } ? string : string | undefined;
34
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
20
35
  };
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RComment = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RComment} AST nodes.
7
8
  */
8
9
  exports.RComment = {
10
+ ...model_1.RNode,
9
11
  name: 'RComment',
10
12
  /**
11
13
  * Type guard for {@link RComment} nodes.
@@ -1,4 +1,5 @@
1
- import type { RAstNodeBase, Location, NoInfo, RNode, WithChildren } from '../model';
1
+ import type { RAstNodeBase, Location, NoInfo, WithChildren } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  import type { RSymbol } from './r-symbol';
4
5
  /**
@@ -31,4 +32,18 @@ export declare const RExpressionList: {
31
32
  * Returns the grouping symbol at the end of the expression list, if it exists. For example, for an expression list created by `{ ... }`, this would return the symbol for `}`.
32
33
  */
33
34
  readonly groupEnd: <Info = object>(this: void, node: RExpressionList<Info>) => RSymbol<Info> | undefined;
35
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
36
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
37
+ readonly getType: (this: void, node: RNode) => RType;
38
+ readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
39
+ readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
40
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
41
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
42
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
43
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
44
+ readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
45
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
46
+ lexeme: string;
47
+ } ? string : string | undefined;
48
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
34
49
  };
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RExpressionList = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RExpressionList} AST nodes.
7
8
  */
8
9
  exports.RExpressionList = {
10
+ ...model_1.RNode,
9
11
  name: 'RExpressionList',
10
12
  /**
11
13
  * Type guard for {@link RExpressionList} nodes.
@@ -1,4 +1,5 @@
1
- import type { RAstNodeBase, Location, NoInfo, RNode } from '../model';
1
+ import type { RAstNodeBase, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  import type { RSymbol } from './r-symbol';
4
5
  import type { RExpressionList } from './r-expression-list';
@@ -25,4 +26,18 @@ export declare const RForLoop: {
25
26
  * Type guard for RForLoop nodes.
26
27
  */
27
28
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RForLoop<Info>;
29
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
30
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
31
+ readonly getType: (this: void, node: RNode) => RType;
32
+ readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
33
+ readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
34
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
35
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
36
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
37
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
38
+ readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
39
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
40
+ lexeme: string;
41
+ } ? string : string | undefined;
42
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
28
43
  };
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RForLoop = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RForLoop} AST nodes.
7
8
  */
8
9
  exports.RForLoop = {
10
+ ...model_1.RNode,
9
11
  name: 'RForLoop',
10
12
  /**
11
13
  * Type guard for RForLoop nodes.
@@ -1,4 +1,5 @@
1
- import type { RAstNodeBase, Location, NoInfo, RNode } from '../model';
1
+ import type { RAstNodeBase, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  import type { RSymbol } from './r-symbol';
4
5
  import type { RArgument } from './r-argument';
@@ -46,4 +47,18 @@ export declare const RFunctionCall: {
46
47
  * Type guard for {@link RUnnamedFunctionCall} nodes.
47
48
  */
48
49
  readonly isUnnamed: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RUnnamedFunctionCall<Info>;
50
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
51
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
52
+ readonly getType: (this: void, node: RNode) => RType;
53
+ readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
54
+ readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
55
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof EmptyArgument)[];
56
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
57
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
58
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
59
+ readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
60
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
61
+ lexeme: string;
62
+ } ? string : string | undefined;
63
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
49
64
  };
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RFunctionCall = exports.EmptyArgument = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  exports.EmptyArgument = '<>';
6
7
  /**
7
8
  * Helper for working with {@link RFunctionCall} AST nodes.
8
9
  */
9
10
  exports.RFunctionCall = {
11
+ ...model_1.RNode,
10
12
  name: 'RFunctionCall',
11
13
  /**
12
14
  * Type guard for {@link RFunctionCall} nodes.
@@ -30,6 +30,27 @@ export declare const RFunctionDefinition: {
30
30
  /**
31
31
  * Checks whether the given id is part of a function definition, and if so, this returns the id of the
32
32
  * inner-most function definition.
33
+ * @see {@link RFunctionDefinition.rootFunctionDefinition} - for the outer-most function definition
33
34
  */
34
35
  readonly wrappingFunctionDefinition: <Info = object>(this: void, n: RNode<ParentInformation & Info> | undefined, idMap: AstIdMap<ParentInformation & Info>) => RFunctionDefinition<ParentInformation & Info> | undefined;
36
+ /**
37
+ * Checks whether the given id is part of a function definition, and if so, this returns the id of the
38
+ * outer-most function definition.
39
+ * @see {@link RFunctionDefinition.wrappingFunctionDefinition} - for the inner-most function definition
40
+ */
41
+ readonly rootFunctionDefinition: <Info = object>(this: void, n: RNode<ParentInformation & Info> | undefined, idMap: AstIdMap<ParentInformation & Info>) => RFunctionDefinition<ParentInformation & Info> | undefined;
42
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
43
+ readonly getId: (this: void, node: RNode<ParentInformation>) => import("../processing/node-id").NodeId;
44
+ readonly getType: (this: void, node: RNode) => RType;
45
+ readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
46
+ readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
47
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
48
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & ParentInformation>>) => RNode<OtherInfo & ParentInformation> | undefined;
49
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation> | undefined, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & ParentInformation>>) => Generator<RNode<OtherInfo & ParentInformation>>;
50
+ readonly depth: (this: void, node: RNode<ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<ParentInformation>>) => number;
51
+ readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>, stop: (node: RNode<OtherInfo & ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
52
+ readonly lexeme: <R extends RNode<ParentInformation>>(this: void, node: R | undefined) => R extends {
53
+ lexeme: string;
54
+ } ? string : string | undefined;
55
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
35
56
  };
@@ -7,6 +7,7 @@ const type_1 = require("../type");
7
7
  * Helper for working with {@link RFunctionDefinition} AST nodes.
8
8
  */
9
9
  exports.RFunctionDefinition = {
10
+ ...model_1.RNode,
10
11
  name: 'RFunctionDefinition',
11
12
  /**
12
13
  * Type guard for {@link RFunctionDefinition} nodes.
@@ -17,6 +18,7 @@ exports.RFunctionDefinition = {
17
18
  /**
18
19
  * Checks whether the given id is part of a function definition, and if so, this returns the id of the
19
20
  * inner-most function definition.
21
+ * @see {@link RFunctionDefinition.rootFunctionDefinition} - for the outer-most function definition
20
22
  */
21
23
  wrappingFunctionDefinition(n, idMap) {
22
24
  for (const p of model_1.RNode.iterateParents(n, idMap)) {
@@ -25,6 +27,20 @@ exports.RFunctionDefinition = {
25
27
  }
26
28
  }
27
29
  return undefined;
30
+ },
31
+ /**
32
+ * Checks whether the given id is part of a function definition, and if so, this returns the id of the
33
+ * outer-most function definition.
34
+ * @see {@link RFunctionDefinition.wrappingFunctionDefinition} - for the inner-most function definition
35
+ */
36
+ rootFunctionDefinition(n, idMap) {
37
+ let root = undefined;
38
+ for (const p of model_1.RNode.iterateParents(n, idMap)) {
39
+ if (exports.RFunctionDefinition.is(p)) {
40
+ root = p;
41
+ }
42
+ }
43
+ return root;
28
44
  }
29
45
  };
30
46
  //# sourceMappingURL=r-function-definition.js.map
@@ -1,4 +1,5 @@
1
- import type { RAstNodeBase, Location, NoInfo, RNode } from '../model';
1
+ import type { RAstNodeBase, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  import type { RExpressionList } from './r-expression-list';
4
5
  /**
@@ -21,4 +22,18 @@ export declare const RIfThenElse: {
21
22
  * Type guard for {@link RIfThenElse} nodes.
22
23
  */
23
24
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RIfThenElse<Info>;
25
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
26
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
27
+ readonly getType: (this: void, node: RNode) => RType;
28
+ readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
29
+ readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
30
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
31
+ readonly directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined;
32
+ readonly iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>;
33
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
34
+ readonly collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>;
35
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
36
+ lexeme: string;
37
+ } ? string : string | undefined;
38
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
24
39
  };
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RIfThenElse = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RIfThenElse} AST nodes.
7
8
  */
8
9
  exports.RIfThenElse = {
10
+ ...model_1.RNode,
9
11
  name: 'RIfThenElse',
10
12
  /**
11
13
  * Type guard for {@link RIfThenElse} nodes.