@eagleoutice/flowr 2.10.4 → 2.10.6

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 (115) hide show
  1. package/README.md +31 -14
  2. package/abstract-interpretation/absint-visitor.d.ts +17 -22
  3. package/abstract-interpretation/absint-visitor.js +47 -48
  4. package/abstract-interpretation/data-frame/dataframe-domain.d.ts +0 -3
  5. package/abstract-interpretation/data-frame/shape-inference.d.ts +2 -1
  6. package/abstract-interpretation/data-frame/shape-inference.js +5 -4
  7. package/abstract-interpretation/domains/abstract-domain.d.ts +17 -16
  8. package/abstract-interpretation/domains/abstract-domain.js +25 -27
  9. package/abstract-interpretation/domains/bounded-set-domain.js +1 -1
  10. package/abstract-interpretation/domains/multi-value-state-domain.d.ts +32 -0
  11. package/abstract-interpretation/domains/multi-value-state-domain.js +60 -0
  12. package/abstract-interpretation/domains/partial-product-domain.d.ts +43 -0
  13. package/abstract-interpretation/domains/partial-product-domain.js +163 -0
  14. package/abstract-interpretation/domains/product-domain.d.ts +2 -29
  15. package/abstract-interpretation/domains/product-domain.js +6 -123
  16. package/abstract-interpretation/domains/set-range-domain.js +3 -3
  17. package/abstract-interpretation/domains/set-upper-bound-domain.js +1 -1
  18. package/abstract-interpretation/domains/singleton-domain.js +1 -1
  19. package/abstract-interpretation/domains/state-abstract-domain.d.ts +13 -28
  20. package/abstract-interpretation/domains/state-abstract-domain.js +16 -38
  21. package/abstract-interpretation/domains/state-domain-like.d.ts +36 -0
  22. package/abstract-interpretation/domains/state-domain-like.js +3 -0
  23. package/cli/flowr.js +11 -1
  24. package/config.d.ts +13 -0
  25. package/config.js +24 -3
  26. package/control-flow/basic-cfg-guided-visitor.d.ts +1 -1
  27. package/control-flow/semantic-cfg-guided-visitor.d.ts +4 -0
  28. package/control-flow/semantic-cfg-guided-visitor.js +23 -32
  29. package/dataflow/environments/built-in-proc-name.d.ts +7 -1
  30. package/dataflow/environments/built-in-proc-name.js +6 -0
  31. package/dataflow/environments/built-in.d.ts +6 -0
  32. package/dataflow/environments/built-in.js +6 -0
  33. package/dataflow/environments/default-builtin-config.d.ts +63 -1
  34. package/dataflow/environments/default-builtin-config.js +15 -4
  35. package/dataflow/environments/identifier.d.ts +14 -0
  36. package/dataflow/graph/vertex.d.ts +6 -0
  37. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +16 -0
  38. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +6 -0
  39. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +99 -2
  40. package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +13 -0
  41. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +48 -0
  42. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +75 -0
  43. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +196 -0
  44. package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +2 -0
  45. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +38 -21
  46. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +5 -0
  47. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +27 -13
  48. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +14 -4
  49. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.d.ts +27 -0
  50. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +97 -0
  51. package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +23 -0
  52. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +90 -0
  53. package/documentation/doc-readme.js +13 -2
  54. package/documentation/doc-util/doc-types.d.ts +11 -2
  55. package/documentation/doc-util/doc-types.js +31 -9
  56. package/documentation/wiki-absint.d.ts +17 -2
  57. package/documentation/wiki-absint.js +83 -24
  58. package/documentation/wiki-analyzer.js +3 -4
  59. package/documentation/wiki-interface.js +22 -16
  60. package/documentation/wiki-mk/doc-context.d.ts +14 -1
  61. package/documentation/wiki-mk/doc-context.js +6 -0
  62. package/documentation/wiki-normalized-ast.d.ts +0 -9
  63. package/documentation/wiki-normalized-ast.js +9 -60
  64. package/linter/linter-rules.d.ts +4 -3
  65. package/linter/rules/problematic-inputs.d.ts +13 -7
  66. package/linter/rules/problematic-inputs.js +109 -60
  67. package/package.json +3 -3
  68. package/project/flowr-analyzer-builder.d.ts +6 -3
  69. package/project/flowr-analyzer-builder.js +12 -5
  70. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +4 -3
  71. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +17 -4
  72. package/project/plugins/flowr-analyzer-plugin.d.ts +1 -1
  73. package/project/plugins/flowr-analyzer-plugin.js +1 -1
  74. package/queries/catalog/dependencies-query/function-info/read-functions.js +2 -0
  75. package/queries/catalog/dependencies-query/function-info/write-functions.js +1 -0
  76. package/queries/catalog/input-sources-query/input-source-functions.d.ts +7 -0
  77. package/queries/catalog/input-sources-query/input-source-functions.js +56 -0
  78. package/queries/catalog/input-sources-query/input-sources-query-executor.d.ts +1 -1
  79. package/queries/catalog/input-sources-query/input-sources-query-executor.js +19 -53
  80. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -1
  81. package/queries/catalog/input-sources-query/input-sources-query-format.js +28 -11
  82. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +21 -42
  83. package/queries/catalog/input-sources-query/simple-input-classifier.js +168 -104
  84. package/r-bridge/data/data.d.ts +28 -2
  85. package/r-bridge/data/data.js +34 -2
  86. package/r-bridge/lang-4.x/ast/model/model.d.ts +5 -6
  87. package/r-bridge/lang-4.x/ast/model/model.js +0 -1
  88. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +6 -6
  89. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +6 -6
  90. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +6 -6
  91. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +6 -6
  92. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +6 -6
  93. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +6 -6
  94. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +6 -6
  95. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +6 -6
  96. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +6 -6
  97. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +6 -6
  98. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +6 -6
  99. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +6 -6
  100. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +6 -6
  101. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +6 -6
  102. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +6 -6
  103. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +6 -6
  104. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +6 -6
  105. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +6 -6
  106. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +6 -6
  107. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +6 -6
  108. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +6 -6
  109. package/util/record.d.ts +18 -3
  110. package/util/record.js +22 -1
  111. package/util/version.js +1 -1
  112. package/abstract-interpretation/normalized-ast-fold.d.ts +0 -119
  113. package/abstract-interpretation/normalized-ast-fold.js +0 -181
  114. package/project/plugins/flowr-analyzer-plugin-defaults.d.ts +0 -5
  115. package/project/plugins/flowr-analyzer-plugin-defaults.js +0 -37
package/util/record.js CHANGED
@@ -5,13 +5,34 @@ exports.Record = void 0;
5
5
  * Helper for transforming records.
6
6
  */
7
7
  exports.Record = {
8
+ /**
9
+ * Returns an array of the names of the properties of a record.
10
+ * @param object - The record to get the property names from.
11
+ */
12
+ keys(object) {
13
+ return Object.keys(object);
14
+ },
15
+ /**
16
+ * Returns an array of the values of the properties of a record.
17
+ * @param object - The record to get the property values from.
18
+ */
19
+ values(object) {
20
+ return Object.values(object);
21
+ },
22
+ /**
23
+ * Returns an array of the key-value pairs of the properties of a record.
24
+ * @param object - The record to get the properties from.
25
+ */
26
+ entries(object) {
27
+ return Object.entries(object);
28
+ },
8
29
  /**
9
30
  * Transforms a record by applying a callback function to each key-value pair in the record.
10
31
  * @param object - The record that should be transformed.
11
32
  * @param callbackfn - The callback function that transforms each key-value pair of the record.
12
33
  */
13
34
  map(object, callbackfn) {
14
- return Object.fromEntries(Object.entries(object).map(callbackfn));
35
+ return Object.fromEntries(exports.Record.entries(object).map(callbackfn));
15
36
  },
16
37
  /**
17
38
  * Transforms a record by applying a callback function to each key in the record.
package/util/version.js CHANGED
@@ -6,7 +6,7 @@ exports.printVersionInformation = printVersionInformation;
6
6
  const semver_1 = require("semver");
7
7
  const assert_1 = require("./assert");
8
8
  // this is automatically replaced with the current version by release-it
9
- const version = '2.10.4';
9
+ const version = '2.10.6';
10
10
  /**
11
11
  * Retrieves the current flowR version as a new {@link SemVer} object.
12
12
  */
@@ -1,119 +0,0 @@
1
- import type { NoInfo, RNode } from '../r-bridge/lang-4.x/ast/model/model';
2
- import type { RExpressionList } from '../r-bridge/lang-4.x/ast/model/nodes/r-expression-list';
3
- import { type RFunctionCall, EmptyArgument } from '../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
4
- import type { RFunctionDefinition } from '../r-bridge/lang-4.x/ast/model/nodes/r-function-definition';
5
- import { RType } from '../r-bridge/lang-4.x/ast/model/type';
6
- import type { RForLoop } from '../r-bridge/lang-4.x/ast/model/nodes/r-for-loop';
7
- import type { RWhileLoop } from '../r-bridge/lang-4.x/ast/model/nodes/r-while-loop';
8
- import type { RRepeatLoop } from '../r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop';
9
- import type { RIfThenElse } from '../r-bridge/lang-4.x/ast/model/nodes/r-if-then-else';
10
- import type { RBinaryOp } from '../r-bridge/lang-4.x/ast/model/nodes/r-binary-op';
11
- import type { RPipe } from '../r-bridge/lang-4.x/ast/model/nodes/r-pipe';
12
- import type { RUnaryOp } from '../r-bridge/lang-4.x/ast/model/nodes/r-unary-op';
13
- import type { RParameter } from '../r-bridge/lang-4.x/ast/model/nodes/r-parameter';
14
- import type { RArgument } from '../r-bridge/lang-4.x/ast/model/nodes/r-argument';
15
- import { RAccess } from '../r-bridge/lang-4.x/ast/model/nodes/r-access';
16
- import type { RLogical } from '../r-bridge/lang-4.x/ast/model/nodes/r-logical';
17
- import type { RBreak } from '../r-bridge/lang-4.x/ast/model/nodes/r-break';
18
- import type { RComment } from '../r-bridge/lang-4.x/ast/model/nodes/r-comment';
19
- import type { RNext } from '../r-bridge/lang-4.x/ast/model/nodes/r-next';
20
- import type { RNumber } from '../r-bridge/lang-4.x/ast/model/nodes/r-number';
21
- import type { RLineDirective } from '../r-bridge/lang-4.x/ast/model/nodes/r-line-directive';
22
- import type { RString } from '../r-bridge/lang-4.x/ast/model/nodes/r-string';
23
- import type { RSymbol } from '../r-bridge/lang-4.x/ast/model/nodes/r-symbol';
24
- import { RProject } from '../r-bridge/lang-4.x/ast/model/nodes/r-project';
25
- type FoldOfType<T extends RType, Returns = void, Info = NoInfo> = (node: Extract<RNode<Info>, {
26
- type: T;
27
- }>) => Returns;
28
- /** explicitly excludes types that are not visitable */
29
- export type FoldableRType = Exclude<RType, RType.Delimiter | RType.Project>;
30
- /**
31
- * Describes the fold functions for each node type.
32
- */
33
- export type NormalizedAstFold<Returns = void, Info = NoInfo> = {
34
- [K in FoldableRType as `fold${Capitalize<K>}`]: FoldOfType<K, Returns, Info>;
35
- };
36
- /**
37
- * Describes the type of a mapping object,
38
- * which maps the type of the normalized AST node to the corresponding fold function.
39
- */
40
- export type FittingNormalizedAstFold<Returns = void, Info = NoInfo> = Readonly<{
41
- [K in FoldableRType]: FoldOfType<K, Returns, Info>;
42
- }>;
43
- export type SingleOrArrayOrNothing<T> = T | readonly (T | null | undefined)[] | null | undefined;
44
- export type EntryExitVisitor<Info> = ((node: RNode<Info>) => void) | undefined;
45
- /**
46
- * Default implementation of a fold over the normalized AST (using the classic fold traversal).
47
- * To modify the behavior, please extend this class and overwrite the methods of interest.
48
- * You can control the value passing (`Returns` generic)
49
- * by providing sensible Monoid behavior overwriting the {@link DefaultNormalizedAstFold#concat|concat} method
50
- * and supplying the empty value in the constructor.
51
- * @note By providing `entry` and `exit` you can use this as an extension to the simpler {@link visitAst} function but without
52
- * the early termination within the visitors (for this, you can overwrite the respective `fold*` methods).
53
- * @example First you want to create your own fold:
54
- *
55
- * ```ts
56
- * let marker = false;
57
- * class MyNumberFold<Info> extends DefaultNormalizedAstFold<void, Info> {
58
- * override foldRNumber(node: RNumber<Info>) {
59
- * super.foldRNumber(node);
60
- * marker = true;
61
- * }
62
- * }
63
- * ```
64
- * This one does explicitly not use the return functionality (and hence acts more as a conventional visitor).
65
- * Now let us suppose we have a normalized AST as an {@link RNode} in the variable `ast`
66
- * and want to check if the AST contains a number:
67
- *
68
- * ```ts
69
- * const result = new MyNumberFold().fold(ast);
70
- * ```
71
- *
72
- * Please take a look at the corresponding tests or the wiki pages for more information on how to use this fold.
73
- */
74
- export declare class DefaultNormalizedAstFold<Returns = void, Info = NoInfo> implements NormalizedAstFold<Returns, Info> {
75
- protected readonly enter: EntryExitVisitor<Info>;
76
- protected readonly exit: EntryExitVisitor<Info>;
77
- protected readonly empty: Returns;
78
- /**
79
- * Empty must provide a sensible default whenever you want to have `Returns` as non-`void`
80
- * (e.g., whenever you want your visitors to be able to return a value).
81
- */
82
- constructor(empty: Returns, enter?: EntryExitVisitor<Info>, exit?: EntryExitVisitor<Info>);
83
- /**
84
- * Monoid::concat
85
- * @see {@link https://en.wikipedia.org/wiki/Monoid}
86
- * @see {@link DefaultNormalizedAstFold#concatAll|concatAll}
87
- */
88
- protected concat(_a: Returns, _b: Returns): Returns;
89
- /**
90
- * overwrite this method, if you have a faster way to concat multiple nodes
91
- * @see {@link DefaultNormalizedAstFold#concatAll|concatAll}
92
- */
93
- protected concatAll(nodes: readonly Returns[]): Returns;
94
- fold(nodes: SingleOrArrayOrNothing<RNode<Info> | typeof EmptyArgument | RProject<Info>>): Returns;
95
- protected foldSingle(node: RNode<Info>): Returns;
96
- foldRAccess(access: RAccess<Info>): Returns;
97
- foldRArgument(argument: RArgument<Info>): Returns;
98
- foldRBinaryOp(binaryOp: RBinaryOp<Info>): Returns;
99
- foldRExpressionList(exprList: RExpressionList<Info>): Returns;
100
- foldRForLoop(loop: RForLoop<Info>): Returns;
101
- foldRFunctionCall(call: RFunctionCall<Info>): Returns;
102
- foldRFunctionDefinition(definition: RFunctionDefinition<Info>): Returns;
103
- foldRIfThenElse(ite: RIfThenElse<Info>): Returns;
104
- foldRParameter(parameter: RParameter<Info>): Returns;
105
- foldRPipe(pipe: RPipe<Info>): Returns;
106
- foldRRepeatLoop(loop: RRepeatLoop<Info>): Returns;
107
- foldRUnaryOp(unaryOp: RUnaryOp<Info>): Returns;
108
- foldRWhileLoop(loop: RWhileLoop<Info>): Returns;
109
- foldRBreak(_node: RBreak<Info>): Returns;
110
- foldRComment(_node: RComment<Info>): Returns;
111
- foldRLineDirective(_node: RLineDirective<Info>): Returns;
112
- foldRLogical(_node: RLogical<Info>): Returns;
113
- foldRNext(_node: RNext<Info>): Returns;
114
- foldRNumber(_node: RNumber<Info>): Returns;
115
- foldRString(_node: RString<Info>): Returns;
116
- foldRSymbol(_node: RSymbol<Info>): Returns;
117
- protected readonly folds: FittingNormalizedAstFold<Returns, Info>;
118
- }
119
- export {};
@@ -1,181 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultNormalizedAstFold = void 0;
4
- const r_function_call_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
5
- const type_1 = require("../r-bridge/lang-4.x/ast/model/type");
6
- const r_access_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-access");
7
- const r_project_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-project");
8
- /**
9
- * Default implementation of a fold over the normalized AST (using the classic fold traversal).
10
- * To modify the behavior, please extend this class and overwrite the methods of interest.
11
- * You can control the value passing (`Returns` generic)
12
- * by providing sensible Monoid behavior overwriting the {@link DefaultNormalizedAstFold#concat|concat} method
13
- * and supplying the empty value in the constructor.
14
- * @note By providing `entry` and `exit` you can use this as an extension to the simpler {@link visitAst} function but without
15
- * the early termination within the visitors (for this, you can overwrite the respective `fold*` methods).
16
- * @example First you want to create your own fold:
17
- *
18
- * ```ts
19
- * let marker = false;
20
- * class MyNumberFold<Info> extends DefaultNormalizedAstFold<void, Info> {
21
- * override foldRNumber(node: RNumber<Info>) {
22
- * super.foldRNumber(node);
23
- * marker = true;
24
- * }
25
- * }
26
- * ```
27
- * This one does explicitly not use the return functionality (and hence acts more as a conventional visitor).
28
- * Now let us suppose we have a normalized AST as an {@link RNode} in the variable `ast`
29
- * and want to check if the AST contains a number:
30
- *
31
- * ```ts
32
- * const result = new MyNumberFold().fold(ast);
33
- * ```
34
- *
35
- * Please take a look at the corresponding tests or the wiki pages for more information on how to use this fold.
36
- */
37
- class DefaultNormalizedAstFold {
38
- enter;
39
- exit;
40
- empty;
41
- /**
42
- * Empty must provide a sensible default whenever you want to have `Returns` as non-`void`
43
- * (e.g., whenever you want your visitors to be able to return a value).
44
- */
45
- constructor(empty, enter, exit) {
46
- this.empty = empty;
47
- this.enter = enter;
48
- this.exit = exit;
49
- }
50
- /**
51
- * Monoid::concat
52
- * @see {@link https://en.wikipedia.org/wiki/Monoid}
53
- * @see {@link DefaultNormalizedAstFold#concatAll|concatAll}
54
- */
55
- concat(_a, _b) {
56
- return this.empty;
57
- }
58
- /**
59
- * overwrite this method, if you have a faster way to concat multiple nodes
60
- * @see {@link DefaultNormalizedAstFold#concatAll|concatAll}
61
- */
62
- concatAll(nodes) {
63
- return nodes.reduce((acc, n) => this.concat(acc, n), this.empty);
64
- }
65
- fold(nodes) {
66
- if (Array.isArray(nodes)) {
67
- const n = nodes;
68
- return this.concatAll(n.filter(n => n && n !== r_function_call_1.EmptyArgument)
69
- .map(node => r_project_1.RProject.is(node) ?
70
- this.concatAll(node.files.map(f => this.foldSingle(f.root))) :
71
- this.foldSingle(node)));
72
- }
73
- else if (nodes) {
74
- if (r_project_1.RProject.is(nodes)) {
75
- return this.concatAll(nodes.files.map(f => this.foldSingle(f.root)));
76
- }
77
- return this.foldSingle(nodes);
78
- }
79
- return this.empty;
80
- }
81
- foldSingle(node) {
82
- this.enter?.(node);
83
- const type = node.type;
84
- // @ts-expect-error -- ts may be unable to infer that the type is correct
85
- const result = this.folds[type]?.(node);
86
- this.exit?.(node);
87
- return result;
88
- }
89
- foldRAccess(access) {
90
- let accessed = this.foldSingle(access.accessed);
91
- if (r_access_1.RAccess.isIndex(access)) {
92
- accessed = this.concat(accessed, this.fold(access.access));
93
- }
94
- return accessed;
95
- }
96
- foldRArgument(argument) {
97
- return this.concat(this.fold(argument.name), this.fold(argument.value));
98
- }
99
- foldRBinaryOp(binaryOp) {
100
- return this.concat(this.foldSingle(binaryOp.lhs), this.foldSingle(binaryOp.rhs));
101
- }
102
- foldRExpressionList(exprList) {
103
- return this.concat(this.fold(exprList.grouping), this.fold(exprList.children));
104
- }
105
- foldRForLoop(loop) {
106
- return this.concatAll([this.foldSingle(loop.variable), this.foldSingle(loop.vector), this.foldSingle(loop.body)]);
107
- }
108
- foldRFunctionCall(call) {
109
- return this.concat(this.foldSingle(call.named ? call.functionName : call.calledFunction), this.fold(call.arguments));
110
- }
111
- foldRFunctionDefinition(definition) {
112
- return this.concat(this.fold(definition.parameters), this.foldSingle(definition.body));
113
- }
114
- foldRIfThenElse(ite) {
115
- return this.concatAll([this.foldSingle(ite.condition), this.foldSingle(ite.then), this.fold(ite.otherwise)]);
116
- }
117
- foldRParameter(parameter) {
118
- return this.concat(this.foldSingle(parameter.name), this.fold(parameter.defaultValue));
119
- }
120
- foldRPipe(pipe) {
121
- return this.concat(this.foldSingle(pipe.lhs), this.foldSingle(pipe.rhs));
122
- }
123
- foldRRepeatLoop(loop) {
124
- return this.foldSingle(loop.body);
125
- }
126
- foldRUnaryOp(unaryOp) {
127
- return this.foldSingle(unaryOp.operand);
128
- }
129
- foldRWhileLoop(loop) {
130
- return this.concat(this.foldSingle(loop.condition), this.foldSingle(loop.body));
131
- }
132
- foldRBreak(_node) {
133
- return this.empty;
134
- }
135
- foldRComment(_node) {
136
- return this.empty;
137
- }
138
- foldRLineDirective(_node) {
139
- return this.empty;
140
- }
141
- foldRLogical(_node) {
142
- return this.empty;
143
- }
144
- foldRNext(_node) {
145
- return this.empty;
146
- }
147
- foldRNumber(_node) {
148
- return this.empty;
149
- }
150
- foldRString(_node) {
151
- return this.empty;
152
- }
153
- foldRSymbol(_node) {
154
- return this.empty;
155
- }
156
- folds = {
157
- [type_1.RType.Access]: n => this.foldRAccess(n),
158
- [type_1.RType.Argument]: n => this.foldRArgument(n),
159
- [type_1.RType.BinaryOp]: n => this.foldRBinaryOp(n),
160
- [type_1.RType.Break]: n => this.foldRBreak(n),
161
- [type_1.RType.Comment]: n => this.foldRComment(n),
162
- [type_1.RType.ExpressionList]: n => this.foldRExpressionList(n),
163
- [type_1.RType.ForLoop]: n => this.foldRForLoop(n),
164
- [type_1.RType.FunctionCall]: n => this.foldRFunctionCall(n),
165
- [type_1.RType.FunctionDefinition]: n => this.foldRFunctionDefinition(n),
166
- [type_1.RType.IfThenElse]: n => this.foldRIfThenElse(n),
167
- [type_1.RType.LineDirective]: n => this.foldRLineDirective(n),
168
- [type_1.RType.Logical]: n => this.foldRLogical(n),
169
- [type_1.RType.Next]: n => this.foldRNext(n),
170
- [type_1.RType.Number]: n => this.foldRNumber(n),
171
- [type_1.RType.Parameter]: n => this.foldRParameter(n),
172
- [type_1.RType.Pipe]: n => this.foldRPipe(n),
173
- [type_1.RType.RepeatLoop]: n => this.foldRRepeatLoop(n),
174
- [type_1.RType.String]: n => this.foldRString(n),
175
- [type_1.RType.Symbol]: n => this.foldRSymbol(n),
176
- [type_1.RType.UnaryOp]: n => this.foldRUnaryOp(n),
177
- [type_1.RType.WhileLoop]: n => this.foldRWhileLoop(n),
178
- };
179
- }
180
- exports.DefaultNormalizedAstFold = DefaultNormalizedAstFold;
181
- //# sourceMappingURL=normalized-ast-fold.js.map
@@ -1,5 +0,0 @@
1
- import type { FlowrAnalyzerPlugin } from './flowr-analyzer-plugin';
2
- /**
3
- * Provides the default set of Flowr Analyzer plugins.
4
- */
5
- export declare function FlowrAnalyzerPluginDefaults(): FlowrAnalyzerPlugin[];
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FlowrAnalyzerPluginDefaults = FlowrAnalyzerPluginDefaults;
4
- const flowr_analyzer_description_file_plugin_1 = require("./file-plugins/flowr-analyzer-description-file-plugin");
5
- const flowr_analyzer_package_versions_description_file_plugin_1 = require("./package-version-plugins/flowr-analyzer-package-versions-description-file-plugin");
6
- const flowr_analyzer_loading_order_description_file_plugin_1 = require("./loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin");
7
- const flowr_analyzer_rmd_file_plugin_1 = require("./file-plugins/notebooks/flowr-analyzer-rmd-file-plugin");
8
- const flowr_analyzer_qmd_file_plugin_1 = require("./file-plugins/notebooks/flowr-analyzer-qmd-file-plugin");
9
- const flowr_analyzer_jupyter_file_plugin_1 = require("./file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin");
10
- const flowr_analyzer_namespace_files_plugin_1 = require("./file-plugins/flowr-analyzer-namespace-files-plugin");
11
- const flowr_analyzer_news_file_plugin_1 = require("./file-plugins/flowr-analyzer-news-file-plugin");
12
- const flowr_analyzer_vignette_file_plugin_1 = require("./file-plugins/flowr-analyzer-vignette-file-plugin");
13
- const flowr_analyzer_test_file_plugin_1 = require("./file-plugins/flowr-analyzer-test-file-plugin");
14
- const flowr_analyzer_license_file_plugin_1 = require("./file-plugins/flowr-analyzer-license-file-plugin");
15
- const flowr_analyzer_meta_description_file_plugin_1 = require("./package-version-plugins/flowr-analyzer-meta-description-file-plugin");
16
- const flowr_analyzer_sweave_file_plugin_1 = require("./file-plugins/notebooks/flowr-analyzer-sweave-file-plugin");
17
- /**
18
- * Provides the default set of Flowr Analyzer plugins.
19
- */
20
- function FlowrAnalyzerPluginDefaults() {
21
- return [
22
- new flowr_analyzer_vignette_file_plugin_1.FlowrAnalyzerMetaVignetteFilesPlugin(),
23
- new flowr_analyzer_test_file_plugin_1.FlowrAnalyzerMetaTestFilesPlugin(),
24
- new flowr_analyzer_description_file_plugin_1.FlowrAnalyzerDescriptionFilePlugin(),
25
- new flowr_analyzer_package_versions_description_file_plugin_1.FlowrAnalyzerPackageVersionsDescriptionFilePlugin(),
26
- new flowr_analyzer_loading_order_description_file_plugin_1.FlowrAnalyzerLoadingOrderDescriptionFilePlugin(),
27
- new flowr_analyzer_meta_description_file_plugin_1.FlowrAnalyzerMetaDescriptionFilePlugin(),
28
- new flowr_analyzer_rmd_file_plugin_1.FlowrAnalyzerRmdFilePlugin(),
29
- new flowr_analyzer_qmd_file_plugin_1.FlowrAnalyzerQmdFilePlugin(),
30
- new flowr_analyzer_sweave_file_plugin_1.FlowrAnalyzerSweaveFilePlugin(),
31
- new flowr_analyzer_license_file_plugin_1.FlowrAnalyzerLicenseFilePlugin(),
32
- new flowr_analyzer_jupyter_file_plugin_1.FlowrAnalyzerJupyterFilePlugin(),
33
- new flowr_analyzer_namespace_files_plugin_1.FlowrAnalyzerNamespaceFilesPlugin(),
34
- new flowr_analyzer_news_file_plugin_1.FlowrAnalyzerNewsFilePlugin()
35
- ];
36
- }
37
- //# sourceMappingURL=flowr-analyzer-plugin-defaults.js.map