@eagleoutice/flowr 2.15.9 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -41
- package/abstract-interpretation/absint-inference.d.ts +2 -2
- package/abstract-interpretation/absint-inference.js +32 -79
- package/abstract-interpretation/data-frame/arguments.js +11 -7
- package/benchmark/slicer.d.ts +0 -1
- package/benchmark/slicer.js +1 -2
- package/cli/repl/commands/repl-signature.js +12 -3
- package/config.d.ts +5 -1
- package/control-flow/cfg-properties.js +0 -22
- package/control-flow/happens-before.d.ts +7 -2
- package/control-flow/happens-before.js +55 -31
- package/control-flow/useless-loop.d.ts +1 -1
- package/control-flow/useless-loop.js +29 -42
- package/dataflow/environments/apply-kill.js +6 -2
- package/dataflow/environments/built-in-config.d.ts +2 -0
- package/dataflow/environments/built-in-props.d.ts +16 -1
- package/dataflow/environments/built-in-props.js +33 -20
- package/dataflow/environments/built-in.d.ts +8 -3
- package/dataflow/environments/built-in.js +52 -82
- package/dataflow/environments/default-builtin-config.d.ts +551 -21
- package/dataflow/environments/default-builtin-config.js +121 -45
- package/dataflow/environments/define.d.ts +3 -2
- package/dataflow/environments/define.js +4 -3
- package/dataflow/environments/deprecation-info.d.ts +45 -0
- package/dataflow/environments/deprecation-info.js +13 -0
- package/dataflow/environments/environment.d.ts +7 -5
- package/dataflow/environments/environment.js +55 -121
- package/dataflow/environments/identifier.d.ts +6 -2
- package/dataflow/environments/identifier.js +23 -69
- package/dataflow/environments/reference-to-maybe.d.ts +9 -0
- package/dataflow/environments/reference-to-maybe.js +23 -51
- package/dataflow/environments/resolve-by-name.js +37 -76
- package/dataflow/eval/resolve/resolve-argument.d.ts +3 -1
- package/dataflow/eval/resolve/resolve-argument.js +61 -64
- package/dataflow/eval/resolve/resolve-working-directory.d.ts +8 -2
- package/dataflow/eval/resolve/resolve-working-directory.js +12 -20
- package/dataflow/eval/resolve/resolve.d.ts +4 -0
- package/dataflow/eval/resolve/resolve.js +23 -14
- package/dataflow/extractor.js +180 -58
- package/dataflow/fn/class-declaration.d.ts +8 -13
- package/dataflow/fn/class-declaration.js +95 -116
- package/dataflow/fn/exceptions-of-function.js +68 -37
- package/dataflow/fn/frame-reflection.d.ts +12 -4
- package/dataflow/fn/frame-reflection.js +51 -41
- package/dataflow/fn/function-props.js +15 -33
- package/dataflow/fn/function-semantics.d.ts +11 -3
- package/dataflow/fn/function-semantics.js +6 -0
- package/dataflow/fn/higher-order-function.d.ts +9 -1
- package/dataflow/fn/higher-order-function.js +27 -24
- package/dataflow/fn/strict-function.d.ts +13 -0
- package/dataflow/fn/strict-function.js +291 -123
- package/dataflow/graph/call-graph.d.ts +7 -6
- package/dataflow/graph/call-graph.js +35 -46
- package/dataflow/graph/graph.d.ts +13 -1
- package/dataflow/graph/graph.js +74 -66
- package/dataflow/graph/vertex.d.ts +1 -1
- package/dataflow/info.d.ts +8 -1
- package/dataflow/info.js +24 -30
- package/dataflow/internal/control-flow.d.ts +31 -4
- package/dataflow/internal/control-flow.js +61 -39
- package/dataflow/internal/linker.d.ts +17 -8
- package/dataflow/internal/linker.js +286 -213
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +179 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +874 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +60 -48
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +4 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +135 -198
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +7 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +5 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +21 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +141 -146
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +56 -24
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +292 -253
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +30 -32
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +68 -67
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +91 -129
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +16 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +9 -35
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +8 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +5 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +13 -31
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +42 -119
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +21 -21
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +93 -102
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +7 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +173 -114
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +23 -26
- package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +34 -9
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +119 -93
- package/dataflow/internal/process/functions/call/common.d.ts +4 -4
- package/dataflow/internal/process/functions/call/common.js +49 -71
- package/dataflow/internal/process/functions/call/deferred.d.ts +12 -2
- package/dataflow/internal/process/functions/call/deferred.js +81 -63
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +4 -2
- package/dataflow/internal/process/functions/call/known-call-handling.js +65 -68
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +3 -5
- package/dataflow/internal/process/functions/call/named-call-handling.js +48 -19
- package/dataflow/internal/process/functions/call/quoted.d.ts +2 -0
- package/dataflow/internal/process/functions/call/quoted.js +257 -154
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +17 -38
- package/dataflow/internal/process/functions/process-parameter.js +25 -32
- package/dataflow/internal/process/process-symbol.js +4 -3
- package/dataflow/internal/program-order.d.ts +26 -0
- package/dataflow/internal/program-order.js +49 -0
- package/documentation/data/faq/faqs.js +3 -3
- package/documentation/data/interface/doc-writing-code.js +1 -2
- package/documentation/data/server/doc-data-server-messages.js +7 -7
- package/documentation/doc-capabilities.js +80 -34
- package/documentation/doc-util/doc-query.d.ts +0 -3
- package/documentation/doc-util/doc-query.js +4 -3
- package/documentation/wiki-analyzer.js +1 -1
- package/documentation/wiki-cfg.js +5 -6
- package/documentation/wiki-core.js +8 -8
- package/documentation/wiki-dataflow-graph.js +10 -11
- package/documentation/wiki-interface.js +2 -2
- package/documentation/wiki-linting-and-testing.js +3 -3
- package/documentation/wiki-overview.js +6 -6
- package/documentation/wiki-query.js +9 -101
- package/documentation/wiki-setup.js +23 -0
- package/documentation/wiki-signature-database.js +1 -1
- package/linter/linter-rules.d.ts +18 -9
- package/linter/rules/absolute-path.js +63 -87
- package/linter/rules/deprecated-functions.d.ts +1 -45
- package/linter/rules/deprecated-functions.js +24 -33
- package/linter/rules/file-path-validity.d.ts +4 -2
- package/linter/rules/file-path-validity.js +114 -80
- package/linter/rules/namespace-access.js +21 -33
- package/linter/rules/naming-convention.d.ts +1 -1
- package/linter/rules/naming-convention.js +60 -48
- package/linter/rules/network-functions.js +11 -7
- package/linter/rules/no-leaked-credentials.js +15 -18
- package/linter/rules/problematic-inputs.d.ts +2 -1
- package/linter/rules/problematic-inputs.js +39 -59
- package/linter/rules/roxygen-arguments.d.ts +9 -4
- package/linter/rules/roxygen-arguments.js +29 -48
- package/linter/rules/seeded-randomness.d.ts +7 -4
- package/linter/rules/seeded-randomness.js +128 -89
- package/linter/rules/stop-with-call-arg.d.ts +4 -2
- package/linter/rules/stop-with-call-arg.js +25 -22
- package/linter/rules/unclosed-connection.js +31 -24
- package/linter/rules/undefined-symbol.d.ts +4 -6
- package/linter/rules/undefined-symbol.js +58 -75
- package/linter/rules/unescaped-arguments.js +18 -44
- package/linter/rules/unused-definition.d.ts +6 -0
- package/linter/rules/unused-definition.js +105 -145
- package/linter/rules/unused-import.d.ts +3 -0
- package/linter/rules/unused-import.js +25 -43
- package/package.json +5 -2
- package/project/flowr-analyzer.d.ts +2 -0
- package/project/flowr-analyzer.js +28 -1
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +2 -2
- package/project/plugins/file-plugins/files/flowr-jupyter-file.js +8 -12
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +0 -2
- package/project/plugins/file-plugins/files/flowr-rda-file.js +10 -55
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +7 -5
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +34 -56
- package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +2 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +22 -45
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -2
- package/project/sigdb/build.js +4 -0
- package/project/sigdb/manifest.d.ts +2 -0
- package/project/sigdb/manifest.js +10 -1
- package/project/sigdb/reader.js +23 -61
- package/project/sigdb/sigdb-download.d.ts +29 -6
- package/project/sigdb/sigdb-download.js +212 -64
- package/queries/base-query-format.js +1 -2
- package/queries/catalog/absint-query/absint-query-format.js +1 -1
- package/queries/catalog/call-context-query/cascade-action.d.ts +3 -1
- package/queries/catalog/call-context-query/cascade-action.js +2 -0
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +3 -0
- package/queries/catalog/dataflow-query/dataflow-query-executor.js +2 -2
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +2 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.js +4 -7
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +50 -114
- package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +5 -9
- package/queries/catalog/dependencies-query/function-info/library-functions.js +6 -0
- package/queries/catalog/dependencies-query/function-info/read-functions.js +1 -1
- package/queries/catalog/dependencies-query/function-info/write-functions.js +7 -3
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +4 -4
- package/queries/catalog/input-sources-query/simple-input-classifier.js +192 -301
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +2 -1
- package/queries/catalog/origin-query/origin-query-executor.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-executor.js +2 -2
- package/queries/catalog/origin-query/origin-query-format.d.ts +2 -2
- package/queries/catalog/origin-query/origin-query-format.js +1 -1
- package/queries/query.d.ts +1 -1
- package/r-bridge/data/data.d.ts +21 -14
- package/r-bridge/data/data.js +28 -20
- package/r-bridge/lang-4.x/ast/model/model.d.ts +3 -1
- package/r-bridge/lang-4.x/ast/model/model.js +19 -43
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -12
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +11 -2
- package/r-bridge/roxygen2/roxygen-parse.js +28 -42
- package/r-bridge/shell.js +6 -0
- package/search/search-executor/search-enrichers.js +25 -37
- package/slicing/static/slice-call.d.ts +4 -3
- package/slicing/static/slice-call.js +56 -88
- package/slicing/static/static-slicer.js +115 -79
- package/slicing/static/visiting-queue.d.ts +4 -6
- package/slicing/static/visiting-queue.js +9 -13
- package/util/files.d.ts +2 -0
- package/util/files.js +3 -1
- package/util/mermaid/mermaid.js +6 -2
- package/util/proc.js +2 -1
- package/util/r-base-packages.d.ts +2 -0
- package/util/r-base-packages.js +23 -13
- package/util/text/playground-link.d.ts +12 -3
- package/util/text/playground-link.js +18 -27
- package/util/version.js +4 -10
|
@@ -33,6 +33,7 @@ export declare const RForLoop: {
|
|
|
33
33
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
34
34
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
35
35
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
36
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
36
37
|
readonly getType: (this: void, node: RNode) => RType;
|
|
37
38
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
38
39
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -64,6 +64,7 @@ export declare const RFunctionCall: {
|
|
|
64
64
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
65
65
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
66
66
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
67
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
67
68
|
readonly getType: (this: void, node: RNode) => RType;
|
|
68
69
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
69
70
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -46,6 +46,7 @@ export declare const RFunctionDefinition: {
|
|
|
46
46
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
47
47
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & ParentInformation>, idMap: AstIdMap<OtherInfo & ParentInformation>) => RNode<OtherInfo & ParentInformation>;
|
|
48
48
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: AstIdMap<OtherInfo & ParentInformation>, isTarget: (node: RNode<OtherInfo & ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
49
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: AstIdMap<OtherInfo & ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
49
50
|
readonly getType: (this: void, node: RNode) => RType;
|
|
50
51
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
51
52
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -29,6 +29,7 @@ export declare const RIfThenElse: {
|
|
|
29
29
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
30
30
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
31
31
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
32
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
32
33
|
readonly getType: (this: void, node: RNode) => RType;
|
|
33
34
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
34
35
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -25,6 +25,7 @@ export declare const RLineDirective: {
|
|
|
25
25
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
26
26
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
27
27
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
28
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
28
29
|
readonly getType: (this: void, node: RNode) => RType;
|
|
29
30
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
30
31
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -33,6 +33,7 @@ export declare const RLogical: {
|
|
|
33
33
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
34
34
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
35
35
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
36
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
36
37
|
readonly getType: (this: void, node: RNode) => RType;
|
|
37
38
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
38
39
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -23,6 +23,7 @@ export declare const RNext: {
|
|
|
23
23
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
24
24
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
25
25
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
26
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
26
27
|
readonly getType: (this: void, node: RNode) => RType;
|
|
27
28
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
28
29
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -32,6 +32,7 @@ export declare const RNumber: {
|
|
|
32
32
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
33
33
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
34
34
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
35
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
35
36
|
readonly getType: (this: void, node: RNode) => RType;
|
|
36
37
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
37
38
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -42,6 +42,7 @@ export declare const RParameter: {
|
|
|
42
42
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
43
43
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
44
44
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
45
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
45
46
|
readonly getType: (this: void, node: RNode) => RType;
|
|
46
47
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
47
48
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -41,6 +41,7 @@ export declare const RPipe: {
|
|
|
41
41
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
42
42
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
43
43
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
44
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
44
45
|
readonly getType: (this: void, node: RNode) => RType;
|
|
45
46
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
46
47
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -27,6 +27,7 @@ export declare const RRepeatLoop: {
|
|
|
27
27
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
28
28
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
29
29
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
30
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
30
31
|
readonly getType: (this: void, node: RNode) => RType;
|
|
31
32
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
32
33
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -32,6 +32,7 @@ export declare const RString: {
|
|
|
32
32
|
span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
33
33
|
topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
34
34
|
findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
35
|
+
strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
35
36
|
getType: (this: void, node: RNode) => RType;
|
|
36
37
|
visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
37
38
|
collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -37,6 +37,7 @@ export declare const RSymbol: {
|
|
|
37
37
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
38
38
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
39
39
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
40
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
40
41
|
readonly getType: (this: void, node: RNode) => RType;
|
|
41
42
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
42
43
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -30,6 +30,7 @@ export declare const RUnaryOp: {
|
|
|
30
30
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
31
31
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
32
32
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
33
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
33
34
|
readonly getType: (this: void, node: RNode) => RType;
|
|
34
35
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
35
36
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -28,6 +28,7 @@ export declare const RWhileLoop: {
|
|
|
28
28
|
readonly span: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => import("../../../../..").SourceRange | undefined;
|
|
29
29
|
readonly topLevelStatement: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation>;
|
|
30
30
|
readonly findEnclosing: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>, isTarget: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => import("../processing/node-id").NodeId | undefined;
|
|
31
|
+
readonly strictlyEnclosingFunction: <OtherInfo>(this: void, id: import("../processing/node-id").NodeId, idMap: import("../processing/decorate").AstIdMap<OtherInfo & import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId | undefined;
|
|
31
32
|
readonly getType: (this: void, node: RNode) => RType;
|
|
32
33
|
readonly visitAst: <OtherInfo = object>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void;
|
|
33
34
|
readonly collectAllIds: <OtherInfo>(this: void, nodes: import("../model").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>;
|
|
@@ -5,8 +5,8 @@ import type { SyncParser, TreeSitterInformation } from '../../parser';
|
|
|
5
5
|
import type { TreeSitterEngineConfig } from '../../../config';
|
|
6
6
|
import type { ReadonlyFlowrAnalysisProvider } from '../../../project/flowr-analyzer';
|
|
7
7
|
import type { FlowrAnalyzerContext } from '../../../project/context/flowr-analyzer-context';
|
|
8
|
-
export declare const DEFAULT_TREE_SITTER_R_WASM_PATH
|
|
9
|
-
export declare const DEFAULT_TREE_SITTER_WASM_PATH
|
|
8
|
+
export declare const DEFAULT_TREE_SITTER_R_WASM_PATH: string;
|
|
9
|
+
export declare const DEFAULT_TREE_SITTER_WASM_PATH: string;
|
|
10
10
|
/**
|
|
11
11
|
* Synchronous and (way) faster alternative to the {@link RShell} using tree-sitter.
|
|
12
12
|
*/
|
|
@@ -8,8 +8,17 @@ const web_tree_sitter_1 = __importDefault(require("web-tree-sitter"));
|
|
|
8
8
|
const log_1 = require("../../../util/log");
|
|
9
9
|
const fs_1 = __importDefault(require("fs"));
|
|
10
10
|
const incremental_parse_1 = require("../../../project/incremental/incremental-parse/incremental-parse");
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/** Resolves the file through the installed package so it does not depend on the working directory, and keeps the relative path where there is no package to resolve (a bundle). */
|
|
12
|
+
function resolveWasm(request, fallback) {
|
|
13
|
+
try {
|
|
14
|
+
return require.resolve(request);
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return fallback;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.DEFAULT_TREE_SITTER_R_WASM_PATH = resolveWasm('@davisvaughan/tree-sitter-r/tree-sitter-r.wasm', './node_modules/@davisvaughan/tree-sitter-r/tree-sitter-r.wasm');
|
|
21
|
+
exports.DEFAULT_TREE_SITTER_WASM_PATH = resolveWasm('web-tree-sitter/tree-sitter.wasm', './node_modules/web-tree-sitter/tree-sitter.wasm');
|
|
13
22
|
const wasmLog = log_1.log.getSubLogger({ name: 'tree-sitter-wasm' });
|
|
14
23
|
/**
|
|
15
24
|
* Synchronous and (way) faster alternative to the {@link RShell} using tree-sitter.
|
|
@@ -5,9 +5,10 @@ exports.parseRoxygenCommentsOfNode = parseRoxygenCommentsOfNode;
|
|
|
5
5
|
exports.parseRoxygenComment = parseRoxygenComment;
|
|
6
6
|
const roxygen_ast_1 = require("./roxygen-ast");
|
|
7
7
|
const r_comment_1 = require("../lang-4.x/ast/model/nodes/r-comment");
|
|
8
|
-
const assert_1 = require("../../util/assert");
|
|
9
8
|
const args_1 = require("../../util/text/args");
|
|
10
9
|
const range_1 = require("../../util/range");
|
|
10
|
+
/** the prefix roxygen2 reads a documentation comment by: any number of `#` followed by `'` */
|
|
11
|
+
const RoxygenPrefix = /^#+'/;
|
|
11
12
|
function prepareCommentContext(commentText) {
|
|
12
13
|
const contents = [];
|
|
13
14
|
for (const line of commentText) {
|
|
@@ -16,10 +17,9 @@ function prepareCommentContext(commentText) {
|
|
|
16
17
|
continue;
|
|
17
18
|
}
|
|
18
19
|
else if (!trimmed.startsWith('#')) {
|
|
19
|
-
// we are done with the roxygen comment
|
|
20
20
|
break;
|
|
21
21
|
}
|
|
22
|
-
contents.push((
|
|
22
|
+
contents.push((RoxygenPrefix.test(trimmed) ? trimmed.replace(RoxygenPrefix, '') : trimmed.slice(1)).trimEnd());
|
|
23
23
|
}
|
|
24
24
|
return contents;
|
|
25
25
|
}
|
|
@@ -34,18 +34,18 @@ function prepareCommentContext(commentText) {
|
|
|
34
34
|
function parseRoxygenCommentsOfNode(node, idMap) {
|
|
35
35
|
let comments;
|
|
36
36
|
let cur = node;
|
|
37
|
+
/* only roxygen comments document, and the root of a file holds what belongs to no statement in particular */
|
|
37
38
|
do {
|
|
38
|
-
comments = cur?.info.adToks
|
|
39
|
-
?.filter(r_comment_1.RComment.is).filter(r =>
|
|
39
|
+
comments = cur?.info.parent === undefined ? undefined : cur.info.adToks
|
|
40
|
+
?.filter(r_comment_1.RComment.is).filter(r => RoxygenPrefix.test(r.lexeme ?? ''));
|
|
40
41
|
cur = cur?.info.parent ? idMap?.get(cur.info.parent) : undefined;
|
|
41
42
|
} while ((comments === undefined || comments.length === 0) && cur !== undefined);
|
|
42
43
|
if (comments === undefined || comments.length === 0) {
|
|
43
44
|
return undefined;
|
|
44
45
|
}
|
|
45
|
-
const commentContent = comments.map(c => c.lexeme);
|
|
46
46
|
return {
|
|
47
47
|
type: 'roxygen-block',
|
|
48
|
-
tags: parseRoxygenComment(
|
|
48
|
+
tags: parseRoxygenComment(comments.map(c => c.lexeme)),
|
|
49
49
|
attachedTo: cur?.info.id,
|
|
50
50
|
requestNode: node.info.id,
|
|
51
51
|
range: [
|
|
@@ -60,9 +60,8 @@ function parseRoxygenCommentsOfNode(node, idMap) {
|
|
|
60
60
|
* @see {@link parseRoxygenCommentsOfNode} - to parse comments attached to a node
|
|
61
61
|
*/
|
|
62
62
|
function parseRoxygenComment(commentText) {
|
|
63
|
-
const contents = prepareCommentContext(commentText);
|
|
64
63
|
const state = {
|
|
65
|
-
lines:
|
|
64
|
+
lines: prepareCommentContext(commentText),
|
|
66
65
|
tags: [],
|
|
67
66
|
idx: 0
|
|
68
67
|
};
|
|
@@ -101,42 +100,33 @@ function collectUntilNextTag(state) {
|
|
|
101
100
|
}
|
|
102
101
|
return [collected, undefined];
|
|
103
102
|
}
|
|
104
|
-
function
|
|
105
|
-
state.tags.push(tag);
|
|
106
|
-
}
|
|
107
|
-
function val(state, tagName, lineToVal = l => l.join('\n').trim()) {
|
|
103
|
+
function val(state, [name, rest], lineToVal = l => l.join('\n').trim()) {
|
|
108
104
|
const [lines, nextTag] = collectUntilNextTag(state);
|
|
109
|
-
if (
|
|
110
|
-
lines.unshift(
|
|
105
|
+
if (rest) {
|
|
106
|
+
lines.unshift(rest);
|
|
111
107
|
}
|
|
112
|
-
if (
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
addTag(state, {
|
|
123
|
-
type: roxygen_ast_1.KnownRoxygenTags.Unknown,
|
|
124
|
-
value: {
|
|
125
|
-
tag: n,
|
|
126
|
-
content: lines.join(' ')
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}
|
|
108
|
+
if (name === roxygen_ast_1.KnownRoxygenTags.Text && lines.length === 0) {
|
|
109
|
+
return nextTag;
|
|
110
|
+
}
|
|
111
|
+
if ((0, roxygen_ast_1.isKnownRoxygenText)(name)) {
|
|
112
|
+
const value = lineToVal(lines);
|
|
113
|
+
state.tags.push((value === undefined ? { type: name } : { type: name, value }));
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
state.tags.push({ type: roxygen_ast_1.KnownRoxygenTags.Unknown, value: { tag: name, content: lines.join(' ') } });
|
|
130
117
|
}
|
|
131
118
|
return nextTag;
|
|
132
119
|
}
|
|
133
120
|
const spaceVals = (s, t) => val(s, t, l => (0, args_1.splitAtEscapeSensitive)(l.join(' ')));
|
|
134
121
|
const flagVal = (s, t) => val(s, t, () => undefined);
|
|
135
|
-
const section = (s, t) => val(s, t, l => {
|
|
136
|
-
return { title: l[0].trim(), content: l.slice(1).join('\n').trim() };
|
|
137
|
-
});
|
|
122
|
+
const section = (s, t) => val(s, t, l => ({ title: l[0].trim(), content: l.slice(1).join('\n').trim() }));
|
|
138
123
|
const firstAndRest = (firstName, secondName) => (s, t) => val(s, t, l => {
|
|
139
|
-
const
|
|
124
|
+
const text = l.join('\n').trim();
|
|
125
|
+
const quoted = /^`([^`]*)`/.exec(text);
|
|
126
|
+
if (quoted) {
|
|
127
|
+
return { [firstName]: quoted[1], [secondName]: text.slice(quoted[0].length).trim() };
|
|
128
|
+
}
|
|
129
|
+
const vals = (0, args_1.splitAtEscapeSensitive)(text);
|
|
140
130
|
return { [firstName]: vals[0], [secondName]: vals.slice(1).join(' ').trim() };
|
|
141
131
|
});
|
|
142
132
|
exports.firstAndRest = firstAndRest;
|
|
@@ -211,10 +201,6 @@ const TagMap = {
|
|
|
211
201
|
};
|
|
212
202
|
/** returns the next tag */
|
|
213
203
|
function parseRoxygenTag(state, tagName) {
|
|
214
|
-
|
|
215
|
-
return undefined;
|
|
216
|
-
}
|
|
217
|
-
const parser = TagMap[tagName[0]] ?? val;
|
|
218
|
-
return parser(state, tagName);
|
|
204
|
+
return tagName === undefined ? undefined : (TagMap[tagName[0]] ?? val)(state, tagName);
|
|
219
205
|
}
|
|
220
206
|
//# sourceMappingURL=roxygen-parse.js.map
|
package/r-bridge/shell.js
CHANGED
|
@@ -380,6 +380,12 @@ class RShellSession {
|
|
|
380
380
|
onDrained();
|
|
381
381
|
};
|
|
382
382
|
return new Promise((resolve, reject) => {
|
|
383
|
+
if (this.bareSession.exitCode !== null || this.bareSession.signalCode !== null) {
|
|
384
|
+
reject(new Error(`the R session has exited (${this.bareSession.exitCode ?? this.bareSession.signalCode}), it cannot answer anymore`));
|
|
385
|
+
drained = true;
|
|
386
|
+
onDrained();
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
383
389
|
const makeTimer = () => setTimeout(() => {
|
|
384
390
|
if (timeout.onTimeout) {
|
|
385
391
|
timeout.onTimeout(resolve, reject, result);
|
|
@@ -40,10 +40,8 @@ const StructuralRoles = new Set([
|
|
|
40
40
|
function collectAliveNodes(ast, reachable) {
|
|
41
41
|
const alive = new Set();
|
|
42
42
|
for (const id of reachable) {
|
|
43
|
-
let node = ast.idMap.get(id);
|
|
44
|
-
while (node !== undefined && !alive.has(node.info.id)) {
|
|
43
|
+
for (let node = ast.idMap.get(id); node !== undefined && !alive.has(node.info.id); node = model_1.RNode.directParent(node, ast.idMap)) {
|
|
45
44
|
alive.add(node.info.id);
|
|
46
|
-
node = node.info.parent === undefined ? undefined : ast.idMap.get(node.info.parent);
|
|
47
45
|
}
|
|
48
46
|
}
|
|
49
47
|
return alive;
|
|
@@ -58,10 +56,7 @@ function isReachedByControlFlow(node, alive) {
|
|
|
58
56
|
if (alive.has(node.info.id)) {
|
|
59
57
|
return true;
|
|
60
58
|
}
|
|
61
|
-
|
|
62
|
-
return node.info.parent !== undefined && alive.has(node.info.parent);
|
|
63
|
-
}
|
|
64
|
-
return false;
|
|
59
|
+
return StructuralRoles.has(node.info.role) && node.info.parent !== undefined && alive.has(node.info.parent);
|
|
65
60
|
}
|
|
66
61
|
/**
|
|
67
62
|
* One entry per distinct call target. A call to a package export is modelled by the built-in flowR states for
|
|
@@ -107,37 +102,15 @@ exports.Enrichments = {
|
|
|
107
102
|
const n = shared?.ast ?? await analyzer.normalize();
|
|
108
103
|
const callVertex = df.graph.getVertex(e.node.info.id);
|
|
109
104
|
if (vertex_1.DfgVertex.isFunctionCall(callVertex)) {
|
|
110
|
-
const origins = df_helper_1.Dataflow.origin(df.graph, callVertex.id);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
content.targets =
|
|
105
|
+
const origins = df_helper_1.Dataflow.origin(df.graph, callVertex.id) ?? [];
|
|
106
|
+
// find call targets in user code (which have ids!)
|
|
107
|
+
const targets = origins.map(targetOf).filter(assert_1.isNotUndefined);
|
|
108
|
+
if (targets.length > 0) {
|
|
109
|
+
content.targets = targets;
|
|
115
110
|
}
|
|
116
111
|
else {
|
|
117
|
-
|
|
118
|
-
content.targets = origins
|
|
119
|
-
switch (o.type) {
|
|
120
|
-
case 2 /* OriginType.FunctionCallOrigin */: {
|
|
121
|
-
if (node_id_1.NodeId.isBuiltIn(o.id)) {
|
|
122
|
-
// a built-in target (e.g. a materialized package export from `library()`) has no
|
|
123
|
-
// user-code node, so surface it as a built-in identifier (see `onlyBuiltin` below)
|
|
124
|
-
const name = node_id_1.NodeId.recoverName(o.id, n.idMap);
|
|
125
|
-
return qualifyIdentifier([o], name) ?? String(o.id);
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
return { node: n.idMap.get(o.id) };
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
case 3 /* OriginType.BuiltInFunctionOrigin */:
|
|
132
|
-
return qualifyIdentifier([o], o.fn.name);
|
|
133
|
-
default:
|
|
134
|
-
return undefined;
|
|
135
|
-
}
|
|
136
|
-
}).filter(assert_1.isNotUndefined);
|
|
137
|
-
if (content.targets.length === 0) {
|
|
138
|
-
const name = node_id_1.NodeId.recoverName(callVertex.id, n.idMap);
|
|
139
|
-
content.targets = [qualifyIdentifier(origins, name)];
|
|
140
|
-
}
|
|
112
|
+
const name = node_id_1.NodeId.recoverName(callVertex.id, n.idMap);
|
|
113
|
+
content.targets = [qualifyIdentifier(origins, name)];
|
|
141
114
|
}
|
|
142
115
|
}
|
|
143
116
|
/* a package export and the built-in flowR models it with are one target seen twice, so keep the
|
|
@@ -152,6 +125,21 @@ exports.Enrichments = {
|
|
|
152
125
|
content.targets.push(...prev.targets);
|
|
153
126
|
}
|
|
154
127
|
return content;
|
|
128
|
+
function targetOf(o) {
|
|
129
|
+
switch (o.type) {
|
|
130
|
+
case 2 /* OriginType.FunctionCallOrigin */:
|
|
131
|
+
if (node_id_1.NodeId.isBuiltIn(o.id)) {
|
|
132
|
+
// a built-in target (e.g. a materialized package export from `library()`) has no
|
|
133
|
+
// user-code node, so surface it as a built-in identifier (see `onlyBuiltin` above)
|
|
134
|
+
return qualifyIdentifier([o], node_id_1.NodeId.recoverName(o.id, n.idMap)) ?? String(o.id);
|
|
135
|
+
}
|
|
136
|
+
return { node: n.idMap.get(o.id) };
|
|
137
|
+
case 3 /* OriginType.BuiltInFunctionOrigin */:
|
|
138
|
+
return qualifyIdentifier([o], o.fn.name);
|
|
139
|
+
default:
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
155
143
|
function qualifyIdentifier(origins, name) {
|
|
156
144
|
if (args?.qualifyNames === undefined || args.qualifyNames) {
|
|
157
145
|
const qualified = identifier_1.Identifier.toQualified(origins, name);
|
|
@@ -159,7 +147,7 @@ exports.Enrichments = {
|
|
|
159
147
|
return identifier_1.Identifier.toString(qualified);
|
|
160
148
|
}
|
|
161
149
|
}
|
|
162
|
-
return name;
|
|
150
|
+
return name === undefined ? undefined : identifier_1.Identifier.toString(name);
|
|
163
151
|
}
|
|
164
152
|
},
|
|
165
153
|
// as built-in call target enrichments are not nodes, we don't return them as part of the mapper!
|
|
@@ -11,8 +11,8 @@ import type { AstIdMap } from '../../r-bridge/lang-4.x/ast/model/processing/deco
|
|
|
11
11
|
/**
|
|
12
12
|
* Returns the function call targets (definitions) by the given caller
|
|
13
13
|
*/
|
|
14
|
-
export declare function getAllFunctionCallTargetsForSlice(dataflowGraph: DataflowGraph, callerInfo: DataflowGraphVertexFunctionCall, baseEnvironment: REnvironmentInformation,
|
|
15
|
-
/**
|
|
14
|
+
export declare function getAllFunctionCallTargetsForSlice(dataflowGraph: DataflowGraph, callerInfo: DataflowGraphVertexFunctionCall, baseEnvironment: REnvironmentInformation, ctx: ReadOnlyFlowrAnalyzerContext): [ReadonlySet<DataflowGraphVertexInfo>, REnvironmentInformation];
|
|
15
|
+
/** Links the call `callerInfo` to the definitions it resolves to, or to the closures of its arguments if it resolves to none. */
|
|
16
16
|
export declare function sliceForCall(current: NodeToSlice, callerInfo: DataflowGraphVertexFunctionCall, { graph }: DataflowInformation, queue: VisitingQueue, ctx: ReadOnlyFlowrAnalyzerContext): void;
|
|
17
17
|
/**
|
|
18
18
|
* Finds the nearest enclosing function-definition node for the given id by walking up the AST parent chain.
|
|
@@ -34,7 +34,8 @@ export declare function sliceReachesFunctionInterface(fnDefId: NodeId, graph: Da
|
|
|
34
34
|
* `calls` edges). Call site arguments are picked up automatically once the call vertex is processed normally,
|
|
35
35
|
* as `argument` edges are always traversed.
|
|
36
36
|
* This is the reverse of what {@link sliceForCall} does for call -\> definition linking.
|
|
37
|
+
* @returns the enqueued ids
|
|
37
38
|
*/
|
|
38
|
-
export declare function includeCalleesOfDefinition(fnDefId: NodeId, graph: DataflowGraph, queue: VisitingQueue, baseEnvironment: REnvironmentInformation, baseEnvFingerprint: Fingerprint):
|
|
39
|
+
export declare function includeCalleesOfDefinition(fnDefId: NodeId, graph: DataflowGraph, queue: VisitingQueue, baseEnvironment: REnvironmentInformation, baseEnvFingerprint: Fingerprint): NodeId[];
|
|
39
40
|
/** Returns true if we found at least one return edge */
|
|
40
41
|
export declare function handleReturns(from: NodeId, queue: VisitingQueue, currentEdges: OutgoingEdges, baseEnvFingerprint: Fingerprint, baseEnvironment: REnvironmentInformation): boolean;
|