@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
@@ -1,4 +1,5 @@
1
- import type { Leaf, Location, NoInfo, RNode } from '../model';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  /**
4
5
  * Special comment to signal line mappings (e.g., in generated code) to the interpreter.
@@ -17,4 +18,18 @@ export declare const RLineDirective: {
17
18
  * Type guard for {@link RLineDirective} nodes.
18
19
  */
19
20
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RLineDirective<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.RLineDirective = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RLineDirective} AST nodes.
7
8
  */
8
9
  exports.RLineDirective = {
10
+ ...model_1.RNode,
9
11
  name: 'RLineDirective',
10
12
  /**
11
13
  * Type guard for {@link RLineDirective} nodes.
@@ -1,4 +1,5 @@
1
- import type { Leaf, Location, NoInfo, RNode } from '../model';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  export type RLogicalValue = boolean;
4
5
  /**
@@ -25,4 +26,18 @@ export declare const RLogical: {
25
26
  * Checks whether a node is a logical constant with value `FALSE`.
26
27
  */
27
28
  readonly isFalse: <Info = object>(this: void, node: RNode<Info> | undefined) => boolean;
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.RLogical = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RLogical} AST nodes.
7
8
  */
8
9
  exports.RLogical = {
10
+ ...model_1.RNode,
9
11
  name: 'RLogical',
10
12
  /**
11
13
  * Type guard for {@link RLogical} nodes.
@@ -1,4 +1,5 @@
1
- import type { Leaf, Location, NoInfo, RNode } from '../model';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  /**
4
5
  * A `next` statement.
@@ -15,4 +16,18 @@ export declare const RNext: {
15
16
  * Type guard for {@link RNext} nodes.
16
17
  */
17
18
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RNext<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.RNext = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RNext} AST nodes.
7
8
  */
8
9
  exports.RNext = {
10
+ ...model_1.RNode,
9
11
  name: 'RNext',
10
12
  /**
11
13
  * Type guard for {@link RNext} nodes.
@@ -1,4 +1,5 @@
1
- import type { Leaf, Location, NoInfo, RNode } from '../model';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  import type { RNumberValue } from '../../../convert-values';
4
5
  /**
@@ -19,4 +20,18 @@ export declare const RNumber: {
19
20
  * Type guard for {@link RNumber} nodes.
20
21
  */
21
22
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RNumber<Info>;
23
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
24
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
25
+ readonly getType: (this: void, node: RNode) => RType;
26
+ 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;
27
+ 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>;
28
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
29
+ 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;
30
+ 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>>;
31
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
32
+ 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>;
33
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
34
+ lexeme: string;
35
+ } ? string : string | undefined;
36
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
22
37
  };
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RNumber = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RNumber} AST nodes.
7
8
  */
8
9
  exports.RNumber = {
10
+ ...model_1.RNode,
9
11
  name: 'RNumber',
10
12
  /**
11
13
  * Type guard for {@link RNumber} 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 { BrandedIdentifier } from '../../../../../dataflow/environments/identifier';
@@ -27,4 +28,18 @@ export declare const RParameter: {
27
28
  * @see {@link RParameter.is} - to check whether a node is a parameter at all
28
29
  */
29
30
  readonly isDotDotDotDot: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RParameter<Info>;
31
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
32
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
33
+ readonly getType: (this: void, node: RNode) => RType;
34
+ 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;
35
+ 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>;
36
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
37
+ 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;
38
+ 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>>;
39
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
40
+ 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>;
41
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
42
+ lexeme: string;
43
+ } ? string : string | undefined;
44
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
30
45
  };
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RParameter = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RParameter} AST nodes.
7
8
  */
8
9
  exports.RParameter = {
10
+ ...model_1.RNode,
9
11
  name: 'RParameter',
10
12
  /**
11
13
  * Type guard for {@link RParameter} 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 { SemVer } from 'semver';
4
5
  /**
@@ -22,4 +23,18 @@ export declare const RPipe: {
22
23
  * Returns the minimum R version that supports the pipe operator.
23
24
  */
24
25
  readonly availableFromRVersion: (this: void) => SemVer;
26
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
27
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
28
+ readonly getType: (this: void, node: RNode) => RType;
29
+ 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;
30
+ 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>;
31
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
32
+ 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;
33
+ 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>>;
34
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
35
+ 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>;
36
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
37
+ lexeme: string;
38
+ } ? string : string | undefined;
39
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
25
40
  };
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RPipe = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  const semver_1 = require("semver");
6
7
  const versions_1 = require("../versions");
@@ -8,6 +9,7 @@ const versions_1 = require("../versions");
8
9
  * Helper for working with {@link RPipe} AST nodes.
9
10
  */
10
11
  exports.RPipe = {
12
+ ...model_1.RNode,
11
13
  name: 'RPipe',
12
14
  /**
13
15
  * Type guard for {@link RPipe} 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 { RExpressionList } from './r-expression-list';
4
5
  /**
@@ -19,4 +20,18 @@ export declare const RRepeatLoop: {
19
20
  * Type guard for RRepeatLoop nodes.
20
21
  */
21
22
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RRepeatLoop<Info>;
23
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
24
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
25
+ readonly getType: (this: void, node: RNode) => RType;
26
+ 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;
27
+ 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>;
28
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
29
+ 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;
30
+ 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>>;
31
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
32
+ 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>;
33
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
34
+ lexeme: string;
35
+ } ? string : string | undefined;
36
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
22
37
  };
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RRepeatLoop = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RRepeatLoop} AST nodes.
7
8
  */
8
9
  exports.RRepeatLoop = {
10
+ ...model_1.RNode,
9
11
  name: 'RRepeatLoop',
10
12
  /**
11
13
  * Type guard for RRepeatLoop nodes.
@@ -1,4 +1,5 @@
1
- import type { Leaf, Location, NoInfo, RNode } from '../model';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import type { RStringValue } from '../../../convert-values';
3
4
  import { RType } from '../type';
4
5
  import { SemVer } from 'semver';
@@ -25,4 +26,18 @@ export declare const RString: {
25
26
  * @see {@link RString}
26
27
  */
27
28
  rawStringAvailableFromRVersion(): SemVer;
29
+ getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
30
+ getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
31
+ getType: (this: void, node: RNode) => RType;
32
+ 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
+ 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
+ directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
35
+ 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
+ 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
+ depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
38
+ 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
+ lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
40
+ lexeme: string;
41
+ } ? string : string | undefined;
42
+ documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
28
43
  };
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RString = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  const semver_1 = require("semver");
6
7
  const versions_1 = require("../versions");
@@ -8,6 +9,7 @@ const versions_1 = require("../versions");
8
9
  * Helper for working with {@link RString} AST nodes.
9
10
  */
10
11
  exports.RString = {
12
+ ...model_1.RNode,
11
13
  name: 'RString',
12
14
  /**
13
15
  * Type guard for RString nodes.
@@ -1,4 +1,5 @@
1
- import type { Leaf, Location, NoInfo, RNode } from '../model';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import { RNode } from '../model';
2
3
  import { RType } from '../type';
3
4
  import { RNa, RNull } from '../../../convert-values';
4
5
  import type { Identifier } from '../../../../../dataflow/environments/identifier';
@@ -29,4 +30,18 @@ export declare const RSymbol: {
29
30
  * @see {@link RSymbol.is} - to check whether a node is a symbol at all
30
31
  */
31
32
  readonly isSpecial: <OtherInfo = object>(this: void, node: RNode<OtherInfo> | undefined) => node is RSymbol<OtherInfo, typeof RNull | typeof RNa>;
33
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
34
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
35
+ readonly getType: (this: void, node: RNode) => RType;
36
+ 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;
37
+ 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>;
38
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
39
+ 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;
40
+ 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>>;
41
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
42
+ 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>;
43
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
44
+ lexeme: string;
45
+ } ? string : string | undefined;
46
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
32
47
  };
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RSymbol = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  const convert_values_1 = require("../../../convert-values");
6
7
  /**
7
8
  * Helper for working with {@link RSymbol} AST nodes.
8
9
  */
9
10
  exports.RSymbol = {
11
+ ...model_1.RNode,
10
12
  name: 'RSymbol',
11
13
  /**
12
14
  * Type guard for {@link RSymbol} 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
  /**
@@ -22,4 +23,18 @@ export declare const RUnaryOp: {
22
23
  * Get the operator information for a binary operator node.
23
24
  */
24
25
  readonly getOperatorInfo: <Info = object>(node: RUnaryOp<Info>) => OperatorInformationValue | undefined;
26
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
27
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
28
+ readonly getType: (this: void, node: RNode) => RType;
29
+ 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;
30
+ 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>;
31
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
32
+ 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;
33
+ 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>>;
34
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
35
+ 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>;
36
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
37
+ lexeme: string;
38
+ } ? string : string | undefined;
39
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
25
40
  };
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RUnaryOp = 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 RUnaryOp} AST nodes.
8
9
  */
9
10
  exports.RUnaryOp = {
11
+ ...model_1.RNode,
10
12
  name: 'RUnaryOp',
11
13
  /**
12
14
  * Type guard for {@link RUnaryOp} 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 { RExpressionList } from './r-expression-list';
4
5
  /**
@@ -20,4 +21,18 @@ export declare const RWhileLoop: {
20
21
  * Type guard for {@link RWhileLoop} nodes.
21
22
  */
22
23
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RWhileLoop<Info>;
24
+ readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
25
+ readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
26
+ readonly getType: (this: void, node: RNode) => RType;
27
+ 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;
28
+ 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>;
29
+ readonly directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[];
30
+ 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;
31
+ 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>>;
32
+ readonly depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number;
33
+ 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>;
34
+ readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
35
+ lexeme: string;
36
+ } ? string : string | undefined;
37
+ readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
23
38
  };
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RWhileLoop = void 0;
4
+ const model_1 = require("../model");
4
5
  const type_1 = require("../type");
5
6
  /**
6
7
  * Helper for working with {@link RWhileLoop} AST nodes.
7
8
  */
8
9
  exports.RWhileLoop = {
10
+ ...model_1.RNode,
9
11
  name: 'RWhileLoop',
10
12
  /**
11
13
  * Type guard for {@link RWhileLoop} nodes.
@@ -133,7 +133,7 @@ async function generateSyntax(input, args) {
133
133
  }
134
134
  async function generateCriterion(input, args) {
135
135
  const idMap = (await input.normalize()).idMap;
136
- return new flowr_search_1.FlowrSearchElements(args.criterion.map(c => ({ node: idMap.get(parse_1.SingleSlicingCriterion.parse(c, idMap)) })));
136
+ return new flowr_search_1.FlowrSearchElements(args.criterion.map(c => ({ node: idMap.get(parse_1.SlicingCriterion.parse(c, idMap)) })));
137
137
  }
138
138
  /**
139
139
  * Gets the search generator function for the given name
@@ -1,33 +1,34 @@
1
1
  import { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
2
2
  import type { AstIdMap } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
3
3
  /** Either `line:column`, `line@variable-name`, or `$id` */
4
- export type SingleSlicingCriterion = `${number}:${number}` | `${number}@${string}` | `$${NodeId | number}`;
4
+ export type SlicingCriterion = `${number}:${number}` | `${number}@${string}` | `$${NodeId | number}`;
5
5
  /**
6
- * The helper object associated with {@link SingleSlicingCriterion} which makes it easy
6
+ * The helper object associated with {@link SlicingCriterion} which makes it easy
7
7
  * to parse, validate and resolve slicing criteria.
8
8
  */
9
- export declare const SingleSlicingCriterion: {
9
+ export declare const SlicingCriterion: {
10
+ readonly name: "SlicingCriterion";
10
11
  /**
11
12
  * Takes a criterion in the form of `line:column` or `line@variable-name` and returns the corresponding node id
12
- * @see {@link SingleSlicingCriterion.tryParse} for a version that does not throw an error
13
+ * @see {@link SlicingCriterion.tryParse} for a version that does not throw an error
13
14
  */
14
- readonly parse: (this: void, criterion: SingleSlicingCriterion, idMap: AstIdMap) => NodeId;
15
+ readonly parse: (this: void, criterion: SlicingCriterion, idMap: AstIdMap) => NodeId;
15
16
  /**
16
17
  * Tries to resolve a slicing criterion to an id, but does not throw an error if it fails.
17
- * @see {@link SingleSlicingCriterion.parse} for the version that throws an error
18
+ * @see {@link SlicingCriterion.parse} for the version that throws an error
18
19
  */
19
- readonly tryParse: (this: void, criterion: SingleSlicingCriterion | NodeId, idMap: AstIdMap) => NodeId | undefined;
20
+ readonly tryParse: (this: void, criterion: SlicingCriterion | NodeId, idMap: AstIdMap) => NodeId | undefined;
20
21
  /**
21
22
  * Converts a node id to a slicing criterion in the form of `$id`
22
23
  */
23
- readonly fromId: (this: void, id: NodeId) => SingleSlicingCriterion;
24
+ readonly fromId: (this: void, id: NodeId) => SlicingCriterion;
24
25
  };
25
26
  /**
26
27
  * A slicing criterion is a list of single slicing criteria, which can be in the form of `line:column`, `line@variable-name`, or `$id`.
27
28
  */
28
- export type SlicingCriteria = SingleSlicingCriterion[];
29
+ export type SlicingCriteria = SlicingCriterion[];
29
30
  export interface DecodedCriterion {
30
- criterion: SingleSlicingCriterion;
31
+ criterion: SlicingCriterion;
31
32
  id: NodeId;
32
33
  }
33
34
  export type DecodedCriteria = ReadonlyArray<DecodedCriterion>;
@@ -1,21 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CriteriaParseError = exports.SlicingCriteria = exports.SingleSlicingCriterion = void 0;
3
+ exports.CriteriaParseError = exports.SlicingCriteria = exports.SlicingCriterion = void 0;
4
4
  const log_1 = require("../../util/log");
5
5
  const node_id_1 = require("../../r-bridge/lang-4.x/ast/model/processing/node-id");
6
6
  const static_slicer_1 = require("../static/static-slicer");
7
7
  const type_1 = require("../../r-bridge/lang-4.x/ast/model/type");
8
8
  /**
9
- * The helper object associated with {@link SingleSlicingCriterion} which makes it easy
9
+ * The helper object associated with {@link SlicingCriterion} which makes it easy
10
10
  * to parse, validate and resolve slicing criteria.
11
11
  */
12
- exports.SingleSlicingCriterion = {
12
+ exports.SlicingCriterion = {
13
+ name: 'SlicingCriterion',
13
14
  /**
14
15
  * Takes a criterion in the form of `line:column` or `line@variable-name` and returns the corresponding node id
15
- * @see {@link SingleSlicingCriterion.tryParse} for a version that does not throw an error
16
+ * @see {@link SlicingCriterion.tryParse} for a version that does not throw an error
16
17
  */
17
18
  parse(criterion, idMap) {
18
- const resolved = exports.SingleSlicingCriterion.tryParse(criterion, idMap);
19
+ const resolved = exports.SlicingCriterion.tryParse(criterion, idMap);
19
20
  if (resolved === undefined) {
20
21
  throw new CriteriaParseError(`invalid slicing criterion ${criterion}`);
21
22
  }
@@ -23,7 +24,7 @@ exports.SingleSlicingCriterion = {
23
24
  },
24
25
  /**
25
26
  * Tries to resolve a slicing criterion to an id, but does not throw an error if it fails.
26
- * @see {@link SingleSlicingCriterion.parse} for the version that throws an error
27
+ * @see {@link SlicingCriterion.parse} for the version that throws an error
27
28
  */
28
29
  tryParse(criterion, idMap) {
29
30
  criterion = criterion.toString(); // in case it's a number
@@ -58,14 +59,14 @@ exports.SlicingCriteria = {
58
59
  * @see {@link SlicingCriteria.convertAll}
59
60
  */
60
61
  decodeAll(criteria, decorated) {
61
- return criteria.map(l => ({ criterion: l, id: exports.SingleSlicingCriterion.parse(l, decorated) }));
62
+ return criteria.map(l => ({ criterion: l, id: exports.SlicingCriterion.parse(l, decorated) }));
62
63
  },
63
64
  /**
64
65
  * Converts all criteria to their id in the AST if possible, this keeps the original criterion if it can not be resolved.
65
66
  * @see {@link SlicingCriteria.decodeAll}
66
67
  */
67
68
  convertAll(criteria, decorated) {
68
- return criteria.map(l => exports.SingleSlicingCriterion.tryParse(l, decorated) ?? l);
69
+ return criteria.map(l => exports.SlicingCriterion.tryParse(l, decorated) ?? l);
69
70
  }
70
71
  };
71
72
  /**