@eagleoutice/flowr 2.16.2 → 2.16.4
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 +15 -15
- package/abstract-interpretation/data-frame/arguments.js +4 -3
- package/abstract-interpretation/data-frame/dataframe-semantics.js +1 -2
- package/abstract-interpretation/data-frame/semantics.d.ts +2 -2
- package/abstract-interpretation/data-frame/semantics.js +2 -6
- package/benchmark/slicer.js +1 -3
- package/benchmark/summarizer/first-phase/input.js +1 -12
- package/benchmark/summarizer/second-phase/process.d.ts +7 -0
- package/benchmark/summarizer/second-phase/process.js +15 -12
- package/cli/repl/commands/repl-cfg.js +18 -49
- package/cli/repl/commands/repl-clipboard.d.ts +2 -0
- package/cli/repl/commands/repl-clipboard.js +5 -0
- package/cli/repl/commands/repl-commands.js +2 -2
- package/cli/repl/commands/repl-dataflow.js +21 -55
- package/cli/repl/commands/repl-normalize.js +15 -28
- package/cli/repl/commands/repl-parse.js +2 -2
- package/cli/repl/commands/repl-query.js +10 -10
- package/cli/repl/commands/repl-signature.js +4 -4
- package/cli/repl/server/connection.d.ts +1 -0
- package/cli/repl/server/connection.js +8 -30
- package/cli/repl/server/messages/message-analysis.js +1 -1
- package/config.d.ts +6 -0
- package/config.js +7 -4
- package/control-flow/cfg-dead-code.js +5 -14
- package/control-flow/cfg-to-basic-blocks.js +1 -6
- package/control-flow/control-flow-graph.d.ts +2 -16
- package/control-flow/control-flow-graph.js +8 -66
- package/control-flow/diff-cfg.js +10 -23
- package/control-flow/semantic-cfg-guided-visitor.js +5 -11
- package/control-flow/simple-visitor.js +2 -2
- package/core/steps/pipeline/default-pipelines.d.ts +138 -138
- package/data/r-base-packages.generated.js +0 -1
- package/data/r-base-primitives.generated.js +0 -1
- package/data/r-s3-generics.generated.d.ts +5 -0
- package/data/r-s3-generics.generated.js +103 -0
- package/dataflow/cluster.js +2 -1
- package/dataflow/environments/append.d.ts +1 -0
- package/dataflow/environments/built-in-props.d.ts +10 -0
- package/dataflow/environments/built-in-props.js +25 -1
- package/dataflow/environments/built-in.js +15 -9
- package/dataflow/environments/clone.d.ts +1 -0
- package/dataflow/environments/clone.js +1 -0
- package/dataflow/environments/default-builtin-config.d.ts +188 -14
- package/dataflow/environments/default-builtin-config.js +125 -65
- package/dataflow/environments/define.d.ts +1 -0
- package/dataflow/environments/define.js +1 -0
- package/dataflow/environments/environment.d.ts +27 -0
- package/dataflow/environments/environment.js +37 -16
- package/dataflow/environments/frame-memory.d.ts +9 -1
- package/dataflow/environments/frame-memory.js +12 -1
- package/dataflow/environments/identifier.d.ts +0 -2
- package/dataflow/environments/identifier.js +5 -7
- package/dataflow/environments/overwrite.js +1 -0
- package/dataflow/environments/query-fn-props.js +4 -4
- package/dataflow/environments/scoping.d.ts +3 -0
- package/dataflow/environments/scoping.js +3 -0
- package/dataflow/eval/resolve/alias-tracking.js +3 -3
- package/dataflow/eval/resolve/resolve-argument.d.ts +7 -3
- package/dataflow/eval/resolve/resolve-argument.js +16 -11
- package/dataflow/eval/resolve/resolve-numbers.js +5 -2
- package/dataflow/eval/resolve/resolve-strings.d.ts +1 -1
- package/dataflow/eval/resolve/resolve-working-directory.js +2 -2
- package/dataflow/eval/resolve/resolve.js +3 -8
- package/dataflow/eval/values/intervals/interval-constants.js +1 -6
- package/dataflow/eval/values/r-value.js +1 -6
- package/dataflow/extractor.js +17 -17
- package/dataflow/fn/argument-roles.js +15 -15
- package/dataflow/fn/class-declaration.js +7 -7
- package/dataflow/fn/frame-reflection.d.ts +1 -23
- package/dataflow/fn/frame-reflection.js +8 -95
- package/dataflow/fn/function-props.d.ts +0 -3
- package/dataflow/fn/function-props.js +9 -11
- package/dataflow/fn/function-semantics.d.ts +1 -0
- package/dataflow/fn/strict-function.js +15 -14
- package/dataflow/graph/call-graph.d.ts +8 -0
- package/dataflow/graph/call-graph.js +40 -25
- package/dataflow/graph/dataflowgraph-builder.d.ts +0 -60
- package/dataflow/graph/dataflowgraph-builder.js +15 -135
- package/dataflow/graph/df-helper.d.ts +56 -4
- package/dataflow/graph/df-helper.js +116 -1
- package/dataflow/graph/diff-dataflow-graph.js +13 -15
- package/dataflow/graph/graph-helper.d.ts +20 -0
- package/dataflow/graph/graph-helper.js +18 -0
- package/dataflow/graph/graph.js +3 -8
- package/dataflow/graph/match-args.d.ts +1 -1
- package/dataflow/graph/match-args.js +3 -3
- package/dataflow/internal/linker.d.ts +4 -10
- package/dataflow/internal/linker.js +21 -29
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +39 -22
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +19 -21
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +3 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.js +6 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +27 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +6 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +33 -35
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +6 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +12 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-list.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +7 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +5 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +5 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +6 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +5 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +7 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +5 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +4 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +8 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +4 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +36 -38
- package/dataflow/internal/process/functions/call/common.d.ts +3 -1
- package/dataflow/internal/process/functions/call/common.js +6 -7
- package/dataflow/internal/process/functions/call/deferred.js +8 -8
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +11 -4
- package/dataflow/internal/process/functions/call/known-call-handling.js +11 -7
- package/dataflow/internal/process/functions/call/named-call-handling.js +4 -3
- package/dataflow/internal/process/functions/call/nse.js +4 -4
- package/dataflow/internal/process/functions/call/quoted.js +16 -14
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +2 -2
- package/dataflow/internal/process/functions/process-parameter.js +2 -2
- package/dataflow/internal/process/process-named-call.js +1 -1
- package/dataflow/origin/dfg-get-origin.js +2 -2
- package/dataflow/origin/dfg-get-symbol-refs.d.ts +1 -0
- package/dataflow/origin/dfg-get-symbol-refs.js +3 -8
- package/documentation/data/faq/wiki-faq-store.js +2 -2
- package/documentation/doc-capabilities.js +2 -1
- package/documentation/doc-util/doc-functions.js +2 -2
- package/documentation/doc-util/doc-query.d.ts +1 -1
- package/documentation/doc-util/doc-query.js +3 -1
- package/documentation/doc-util/doc-repl.js +4 -4
- package/documentation/doc-util/doc-timings.js +3 -2
- package/documentation/doc-util/doc-types.js +2 -2
- package/documentation/wiki-absint.js +2 -1
- package/documentation/wiki-cfg.js +2 -1
- package/documentation/wiki-create-linting-rules.js +2 -2
- package/documentation/wiki-dataflow-graph.js +6 -6
- package/documentation/wiki-interface.js +3 -2
- package/documentation/wiki-linter.d.ts +14 -0
- package/documentation/wiki-linter.js +353 -88
- package/documentation/wiki-mk/doc-maker.js +1 -2
- package/documentation/wiki-query.js +25 -0
- package/documentation/wiki-search.js +2 -1
- package/documentation/wiki-signature-database.js +0 -2
- package/linter/linter-executor.js +4 -0
- package/linter/linter-rules.d.ts +552 -35
- package/linter/linter-rules.js +39 -1
- package/linter/linter-tags.d.ts +6 -0
- package/linter/linter-tags.js +6 -0
- package/linter/rules/absolute-path.d.ts +1 -1
- package/linter/rules/absolute-path.js +9 -6
- package/linter/rules/cmd-check/bogus-return.d.ts +29 -0
- package/linter/rules/cmd-check/bogus-return.js +63 -0
- package/linter/rules/cmd-check/call-arguments.d.ts +63 -0
- package/linter/rules/cmd-check/call-arguments.js +216 -0
- package/linter/rules/cmd-check/class-string-comparison.d.ts +48 -0
- package/linter/rules/cmd-check/class-string-comparison.js +135 -0
- package/linter/rules/cmd-check/cmd-check-util.d.ts +67 -0
- package/linter/rules/cmd-check/cmd-check-util.js +169 -0
- package/linter/rules/cmd-check/compiled-code.d.ts +86 -0
- package/linter/rules/cmd-check/compiled-code.js +350 -0
- package/linter/rules/cmd-check/conformance.d.ts +51 -0
- package/linter/rules/cmd-check/conformance.js +166 -0
- package/linter/rules/cmd-check/dependency-declaration.d.ts +95 -0
- package/linter/rules/cmd-check/dependency-declaration.js +299 -0
- package/linter/rules/cmd-check/description-metadata.d.ts +63 -0
- package/linter/rules/cmd-check/description-metadata.js +393 -0
- package/linter/rules/cmd-check/documentation-mismatch.d.ts +60 -0
- package/linter/rules/cmd-check/documentation-mismatch.js +407 -0
- package/linter/rules/cmd-check/file-checks.d.ts +29 -0
- package/linter/rules/cmd-check/file-checks.js +34 -0
- package/linter/rules/cmd-check/foreign-function-calls.d.ts +54 -0
- package/linter/rules/cmd-check/foreign-function-calls.js +115 -0
- package/linter/rules/cmd-check/global-environment-modification.d.ts +61 -0
- package/linter/rules/cmd-check/global-environment-modification.js +237 -0
- package/linter/rules/cmd-check/namespace-tampering.d.ts +52 -0
- package/linter/rules/cmd-check/namespace-tampering.js +162 -0
- package/linter/rules/cmd-check/non-ascii-code.d.ts +51 -0
- package/linter/rules/cmd-check/non-ascii-code.js +112 -0
- package/linter/rules/cmd-check/package-code.d.ts +30 -0
- package/linter/rules/cmd-check/package-code.js +141 -0
- package/linter/rules/cmd-check/package-data.d.ts +51 -0
- package/linter/rules/cmd-check/package-data.js +181 -0
- package/linter/rules/cmd-check/package-files.d.ts +41 -0
- package/linter/rules/cmd-check/package-files.js +157 -0
- package/linter/rules/cmd-check/package-hooks.d.ts +57 -0
- package/linter/rules/cmd-check/package-hooks.js +173 -0
- package/linter/rules/cmd-check/package-metafiles.d.ts +49 -0
- package/linter/rules/cmd-check/package-metafiles.js +292 -0
- package/linter/rules/cmd-check/package-runtime.d.ts +67 -0
- package/linter/rules/cmd-check/package-runtime.js +284 -0
- package/linter/rules/cmd-check/package-structure.d.ts +85 -0
- package/linter/rules/cmd-check/package-structure.js +320 -0
- package/linter/rules/cmd-check/rd-files.d.ts +83 -0
- package/linter/rules/cmd-check/rd-files.js +621 -0
- package/linter/rules/cmd-check/s-three-method-consistency.d.ts +72 -0
- package/linter/rules/cmd-check/s-three-method-consistency.js +206 -0
- package/linter/rules/cmd-check/true-false-abbreviation.d.ts +45 -0
- package/linter/rules/cmd-check/true-false-abbreviation.js +121 -0
- package/linter/rules/dataframe-access-validation.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.js +1 -1
- package/linter/rules/dead-code.d.ts +4 -4
- package/linter/rules/dead-code.js +19 -4
- package/linter/rules/deprecated-functions.d.ts +1 -1
- package/linter/rules/deprecated-functions.js +5 -5
- package/linter/rules/file-path-validity.d.ts +6 -2
- package/linter/rules/file-path-validity.js +7 -3
- package/linter/rules/namespace-access.d.ts +3 -3
- package/linter/rules/namespace-access.js +12 -3
- package/linter/rules/naming-convention.d.ts +2 -2
- package/linter/rules/naming-convention.js +14 -15
- package/linter/rules/network-functions.d.ts +1 -1
- package/linter/rules/network-functions.js +1 -1
- package/linter/rules/no-leaked-credentials.d.ts +1 -1
- package/linter/rules/no-leaked-credentials.js +5 -5
- package/linter/rules/problematic-inputs.d.ts +2 -2
- package/linter/rules/problematic-inputs.js +4 -3
- package/linter/rules/roxygen-arguments.d.ts +2 -2
- package/linter/rules/roxygen-arguments.js +2 -2
- package/linter/rules/seeded-randomness.d.ts +2 -2
- package/linter/rules/seeded-randomness.js +7 -7
- package/linter/rules/software-has-license.d.ts +3 -3
- package/linter/rules/software-has-license.js +3 -3
- package/linter/rules/software-has-tests.d.ts +2 -2
- package/linter/rules/software-has-tests.js +2 -2
- package/linter/rules/stop-with-call-arg.d.ts +3 -3
- package/linter/rules/stop-with-call-arg.js +21 -4
- package/linter/rules/syntactically-valid.d.ts +1 -1
- package/linter/rules/syntactically-valid.js +1 -1
- package/linter/rules/unclosed-connection.d.ts +2 -2
- package/linter/rules/unclosed-connection.js +5 -5
- package/linter/rules/undefined-symbol-util.js +16 -32
- package/linter/rules/undefined-symbol.d.ts +3 -1
- package/linter/rules/undefined-symbol.js +34 -4
- package/linter/rules/unescaped-arguments.d.ts +1 -1
- package/linter/rules/unescaped-arguments.js +11 -10
- package/linter/rules/unused-definition.d.ts +1 -1
- package/linter/rules/unused-definition.js +14 -20
- package/linter/rules/unused-import.d.ts +1 -1
- package/linter/rules/unused-import.js +1 -1
- package/linter/rules/useless-loop.d.ts +1 -1
- package/linter/rules/useless-loop.js +1 -1
- package/package.json +1 -1
- package/project/cache/flowr-analyzer-cache.js +1 -1
- package/project/context/flowr-analyzer-context.js +1 -1
- package/project/context/flowr-analyzer-environment-context.d.ts +2 -2
- package/project/context/flowr-analyzer-environment-context.js +2 -1
- package/project/context/flowr-analyzer-files-context.d.ts +6 -0
- package/project/context/flowr-analyzer-files-context.js +15 -11
- package/project/context/flowr-analyzer-incremental-analysis-context.d.ts +0 -2
- package/project/context/flowr-analyzer-incremental-analysis-context.js +0 -4
- package/project/context/flowr-file.d.ts +4 -0
- package/project/context/flowr-file.js +4 -0
- package/project/flowr-analyzer-builder.js +1 -1
- package/project/plugins/file-plugins/files/flowr-description-file.js +2 -2
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-jupyter-file.js +4 -0
- package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-manifest-files.js +11 -14
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +3 -0
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +25 -15
- package/project/plugins/file-plugins/files/flowr-rd-file.d.ts +44 -0
- package/project/plugins/file-plugins/files/flowr-rd-file.js +130 -61
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +0 -1
- package/project/plugins/file-plugins/files/flowr-rda-file.js +4 -16
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +4 -0
- package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-sweave-file.js +4 -0
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +0 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -5
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +2 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +2 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +3 -7
- package/project/sigdb/build.js +16 -30
- package/project/sigdb/dict.d.ts +4 -6
- package/project/sigdb/dict.js +125 -31
- package/project/sigdb/reader.js +2 -18
- package/project/sigdb/sigdb-download.js +14 -23
- package/queries/base-query-format.d.ts +2 -0
- package/queries/base-query-format.js +10 -2
- package/queries/catalog/absint-query/absint-query-format.d.ts +1 -1
- package/queries/catalog/absint-query/absint-query-format.js +5 -7
- package/queries/catalog/call-context-query/call-context-query-executor.js +24 -32
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -1
- package/queries/catalog/call-context-query/call-context-query-format.js +1 -3
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +2 -4
- package/queries/catalog/call-context-query/identify-link-to-nested-call-relation.js +1 -4
- package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -3
- package/queries/catalog/config-query/config-query-format.js +3 -3
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +2 -3
- package/queries/catalog/dataflow-query/dataflow-query-format.js +2 -3
- package/queries/catalog/dependencies-query/data-flow.d.ts +45 -0
- package/queries/catalog/dependencies-query/data-flow.js +179 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +18 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +108 -12
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +17 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +14 -11
- package/queries/catalog/dependencies-query/function-info/derived-functions.js +2 -1
- package/queries/catalog/dependencies-query/function-info/function-info.d.ts +2 -0
- package/queries/catalog/dependencies-query/function-info/library-functions.js +13 -13
- package/queries/catalog/dependencies-query/function-info/read-functions.js +1 -1
- package/queries/catalog/dependencies-query/function-info/remote-functions.js +3 -3
- package/queries/catalog/dependencies-query/function-info/source-functions.js +2 -2
- package/queries/catalog/dependencies-query/function-info/test-functions.js +8 -8
- package/queries/catalog/dependencies-query/function-info/transform-functions.d.ts +8 -0
- package/queries/catalog/dependencies-query/function-info/transform-functions.js +17 -0
- package/queries/catalog/dependencies-query/function-info/write-functions.js +4 -0
- package/queries/catalog/dependencies-query/implicit-echo.d.ts +5 -3
- package/queries/catalog/dependencies-query/implicit-echo.js +36 -35
- package/queries/catalog/dependencies-query/link-devices.d.ts +3 -2
- package/queries/catalog/dependencies-query/link-devices.js +9 -6
- package/queries/catalog/dependencies-query/plot-description.d.ts +10 -0
- package/queries/catalog/dependencies-query/plot-description.js +119 -0
- package/queries/catalog/dependencies-query/plot-objects.d.ts +13 -0
- package/queries/catalog/dependencies-query/plot-objects.js +61 -0
- package/queries/catalog/dice-query/dice-query-format.d.ts +2 -2
- package/queries/catalog/dice-query/dice-query-format.js +3 -40
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +1 -1
- package/queries/catalog/does-call-query/does-call-query-format.js +2 -2
- package/queries/catalog/function-info-query/function-info-query-format.js +2 -2
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +2 -1
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +2 -2
- package/queries/catalog/happens-before-query/happens-before-query-format.js +2 -2
- package/queries/catalog/id-map-query/id-map-query-format.js +1 -3
- package/queries/catalog/input-sources-query/input-sources-query-executor.js +2 -2
- package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -3
- package/queries/catalog/input-sources-query/simple-input-classifier.js +28 -29
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +4 -7
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +1 -1
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +3 -2
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +2 -2
- package/queries/catalog/linter-query/linter-query-executor.js +10 -3
- package/queries/catalog/linter-query/linter-query-format.d.ts +4 -1
- package/queries/catalog/linter-query/linter-query-format.js +32 -21
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +1 -1
- package/queries/catalog/location-map-query/location-map-query-format.js +1 -3
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +2 -3
- package/queries/catalog/origin-query/origin-query-executor.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-executor.js +3 -3
- package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-format.js +4 -5
- package/queries/catalog/project-query/project-query-format.js +2 -2
- package/queries/catalog/provenance-query/provenance-query-format.js +2 -3
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +4 -4
- package/queries/catalog/search-query/search-query-format.js +1 -3
- package/queries/catalog/signature-query/signature-query-executor.js +3 -3
- package/queries/catalog/signature-query/signature-query-format.js +2 -2
- package/queries/catalog/slice-query-options.d.ts +16 -0
- package/queries/catalog/slice-query-options.js +28 -0
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +2 -2
- package/queries/catalog/static-slice-query/static-slice-query-format.js +3 -42
- package/queries/query-print.d.ts +4 -0
- package/queries/query-print.js +17 -1
- package/queries/query.d.ts +3 -3
- package/queries/query.js +3 -4
- package/r-bridge/lang-4.x/ast/model/model.d.ts +27 -3
- package/r-bridge/lang-4.x/ast/model/model.js +28 -1
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +20 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +25 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +18 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +15 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +17 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +20 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/operators.js +0 -2
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +1 -6
- package/r-bridge/lang-4.x/ast/model/processing/fold.js +1 -6
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +4 -3
- package/r-bridge/lang-4.x/ast/parser/json/format.js +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +4 -20
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-next.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +2 -9
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +2 -10
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -11
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +3 -11
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-symbol.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +6 -1
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +7 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +0 -10
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +30 -82
- package/r-bridge/retriever.d.ts +0 -4
- package/r-bridge/retriever.js +0 -13
- package/r-bridge/roxygen2/documentation-provider.js +3 -7
- package/r-bridge/shell.js +3 -8
- package/reconstruct/auto-select/magic-comments.js +8 -7
- package/reconstruct/inline/source-inline-map.d.ts +3 -0
- package/reconstruct/inline/source-inline-map.js +8 -7
- package/reconstruct/reconstruct.d.ts +1 -1
- package/reconstruct/reconstruct.js +33 -109
- package/search/flowr-search-printer.js +4 -15
- package/search/search-executor/search-generators.js +1 -1
- package/slicing/criterion/filters/all-variables.js +1 -2
- package/slicing/static/fingerprint.js +11 -2
- package/slicing/static/slice-call.d.ts +2 -8
- package/slicing/static/slice-call.js +8 -18
- package/slicing/static/static-slicer.js +81 -6
- package/util/collections/arrays.js +1 -1
- package/util/collections/set.js +1 -1
- package/util/diff-graph.d.ts +4 -0
- package/util/diff-graph.js +12 -0
- package/util/files.js +2 -6
- package/util/json.js +1 -15
- package/util/mermaid/cfg.js +10 -17
- package/util/mermaid/dfg.js +6 -8
- package/util/objects.d.ts +1 -1
- package/util/quads.js +4 -13
- package/util/r-author.js +5 -5
- package/util/range.d.ts +9 -0
- package/util/range.js +11 -0
- package/util/schema.js +3 -3
- package/util/simple-df/dfg-view.js +2 -1
- package/util/text/ansi.js +1 -2
- package/util/text/playground-link.js +2 -1
- package/util/text/r-highlight.js +2 -1
- package/util/text/strings.d.ts +2 -0
- package/util/text/strings.js +5 -0
- package/util/text/time.js +1 -2
- package/util/version.js +4 -3
- package/dataflow/fn/recursive-function.d.ts +0 -6
- package/dataflow/fn/recursive-function.js +0 -32
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +0 -16
- package/dataflow/internal/process/functions/call/argument/unpack-argument.js +0 -27
|
@@ -11,6 +11,7 @@ export interface RLogical<Info = NoInfo> extends Leaf<Info>, Location {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Helper for working with {@link RLogical} AST nodes.
|
|
14
|
+
* @helper ast
|
|
14
15
|
*/
|
|
15
16
|
export declare const RLogical: {
|
|
16
17
|
readonly name: "RLogical";
|
|
@@ -45,5 +46,6 @@ export declare const RLogical: {
|
|
|
45
46
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
46
47
|
lexeme: string;
|
|
47
48
|
} ? string : string | undefined;
|
|
49
|
+
readonly ownLexeme: (this: void, node: RNode<import("../processing/decorate").ParentInformation> | undefined) => string | undefined;
|
|
48
50
|
readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
|
|
49
51
|
};
|
|
@@ -9,6 +9,7 @@ export interface RNext<Info = NoInfo> extends Location, Leaf<Info> {
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Helper for working with {@link RNext} AST nodes.
|
|
12
|
+
* @helper ast
|
|
12
13
|
*/
|
|
13
14
|
export declare const RNext: {
|
|
14
15
|
readonly name: "RNext";
|
|
@@ -35,5 +36,6 @@ export declare const RNext: {
|
|
|
35
36
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
36
37
|
lexeme: string;
|
|
37
38
|
} ? string : string | undefined;
|
|
39
|
+
readonly ownLexeme: (this: void, node: RNode<import("../processing/decorate").ParentInformation> | undefined) => string | undefined;
|
|
38
40
|
readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
|
|
39
41
|
};
|
|
@@ -13,6 +13,7 @@ export interface RNumber<Info = NoInfo> extends Leaf<Info>, Location {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Helper for working with {@link RNumber} AST nodes.
|
|
16
|
+
* @helper ast
|
|
16
17
|
*/
|
|
17
18
|
export declare const RNumber: {
|
|
18
19
|
readonly name: "RNumber";
|
|
@@ -44,5 +45,6 @@ export declare const RNumber: {
|
|
|
44
45
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
45
46
|
lexeme: string;
|
|
46
47
|
} ? string : string | undefined;
|
|
48
|
+
readonly ownLexeme: (this: void, node: RNode<import("../processing/decorate").ParentInformation> | undefined) => string | undefined;
|
|
47
49
|
readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
|
|
48
50
|
};
|
|
@@ -15,6 +15,7 @@ export interface RParameter<Info = NoInfo> extends RAstNodeBase<Info>, Location
|
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Helper for working with {@link RParameter} AST nodes.
|
|
18
|
+
* @helper ast
|
|
18
19
|
*/
|
|
19
20
|
export declare const RParameter: {
|
|
20
21
|
readonly name: "RParameter";
|
|
@@ -54,5 +55,6 @@ export declare const RParameter: {
|
|
|
54
55
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
55
56
|
lexeme: string;
|
|
56
57
|
} ? string : string | undefined;
|
|
58
|
+
readonly ownLexeme: (this: void, node: RNode<import("../processing/decorate").ParentInformation> | undefined) => string | undefined;
|
|
57
59
|
readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
|
|
58
60
|
};
|
|
@@ -12,6 +12,7 @@ export interface RPipe<Info = NoInfo> extends RAstNodeBase<Info>, Location {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Helper for working with {@link RPipe} AST nodes.
|
|
15
|
+
* @helper ast
|
|
15
16
|
*/
|
|
16
17
|
export declare const RPipe: {
|
|
17
18
|
readonly name: "RPipe";
|
|
@@ -53,5 +54,6 @@ export declare const RPipe: {
|
|
|
53
54
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
54
55
|
lexeme: string;
|
|
55
56
|
} ? string : string | undefined;
|
|
57
|
+
readonly ownLexeme: (this: void, node: RNode<import("../processing/decorate").ParentInformation> | undefined) => string | undefined;
|
|
56
58
|
readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
|
|
57
59
|
};
|
|
@@ -13,6 +13,7 @@ export interface RRepeatLoop<Info = NoInfo> extends RAstNodeBase<Info>, Location
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Helper for working with {@link RRepeatLoop} AST nodes.
|
|
16
|
+
* @helper ast
|
|
16
17
|
*/
|
|
17
18
|
export declare const RRepeatLoop: {
|
|
18
19
|
readonly name: "RRepeatLoop";
|
|
@@ -39,5 +40,6 @@ export declare const RRepeatLoop: {
|
|
|
39
40
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
40
41
|
lexeme: string;
|
|
41
42
|
} ? string : string | undefined;
|
|
43
|
+
readonly ownLexeme: (this: void, node: RNode<import("../processing/decorate").ParentInformation> | undefined) => string | undefined;
|
|
42
44
|
readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
|
|
43
45
|
};
|
|
@@ -3,6 +3,7 @@ import { RNode } from '../model';
|
|
|
3
3
|
import type { RStringValue } from '../../../convert-values';
|
|
4
4
|
import { RType } from '../type';
|
|
5
5
|
import { SemVer } from 'semver';
|
|
6
|
+
export type RQuote = '"' | '\'' | '`';
|
|
6
7
|
/**
|
|
7
8
|
* Represents a string like `"hello"`, including raw strings like `r"(hello)"`.
|
|
8
9
|
*/
|
|
@@ -12,6 +13,7 @@ export interface RString<Info = NoInfo> extends Leaf<Info>, Location {
|
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Helper for working with {@link RString} AST nodes.
|
|
16
|
+
* @helper ast
|
|
15
17
|
*/
|
|
16
18
|
export declare const RString: {
|
|
17
19
|
name: string;
|
|
@@ -21,6 +23,20 @@ export declare const RString: {
|
|
|
21
23
|
* @see {@link RString}
|
|
22
24
|
*/
|
|
23
25
|
is<Info = object>(this: void, node: RNode<Info> | undefined): node is RString<Info>;
|
|
26
|
+
/**
|
|
27
|
+
* Splits off the matching R quotes (double, single, or backtick) wrapping `str`; the `quote` is undefined and the
|
|
28
|
+
* `content` is `str` itself if there are none. Escapes are not interpreted.
|
|
29
|
+
* @see {@link RString.unquote} - if only the content matters
|
|
30
|
+
*/
|
|
31
|
+
splitQuotes(this: void, str: string): {
|
|
32
|
+
readonly quote: RQuote | undefined;
|
|
33
|
+
readonly content: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The text without the R quotes (double, single, or backtick) around it; unchanged if it has none.
|
|
37
|
+
* @see {@link RString.splitQuotes} - to learn which quote was used
|
|
38
|
+
*/
|
|
39
|
+
unquote(this: void, str: string): string;
|
|
24
40
|
/**
|
|
25
41
|
* Returns the minimum R version that supports raw strings (in a stable format).
|
|
26
42
|
* @see {@link RString}
|
|
@@ -44,5 +60,6 @@ export declare const RString: {
|
|
|
44
60
|
lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
45
61
|
lexeme: string;
|
|
46
62
|
} ? string : string | undefined;
|
|
63
|
+
ownLexeme: (this: void, node: RNode<import("../processing/decorate").ParentInformation> | undefined) => string | undefined;
|
|
47
64
|
documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
|
|
48
65
|
};
|
|
@@ -7,6 +7,7 @@ const semver_1 = require("semver");
|
|
|
7
7
|
const versions_1 = require("../versions");
|
|
8
8
|
/**
|
|
9
9
|
* Helper for working with {@link RString} AST nodes.
|
|
10
|
+
* @helper ast
|
|
10
11
|
*/
|
|
11
12
|
exports.RString = {
|
|
12
13
|
...model_1.RNode,
|
|
@@ -19,6 +20,25 @@ exports.RString = {
|
|
|
19
20
|
is(node) {
|
|
20
21
|
return node?.type === type_1.RType.String;
|
|
21
22
|
},
|
|
23
|
+
/**
|
|
24
|
+
* Splits off the matching R quotes (double, single, or backtick) wrapping `str`; the `quote` is undefined and the
|
|
25
|
+
* `content` is `str` itself if there are none. Escapes are not interpreted.
|
|
26
|
+
* @see {@link RString.unquote} - if only the content matters
|
|
27
|
+
*/
|
|
28
|
+
splitQuotes(str) {
|
|
29
|
+
const quote = str[0];
|
|
30
|
+
if (str.length > 1 && (quote === '"' || quote === '\'' || quote === '`') && str[str.length - 1] === quote) {
|
|
31
|
+
return { quote, content: str.slice(1, -1) };
|
|
32
|
+
}
|
|
33
|
+
return { quote: undefined, content: str };
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* The text without the R quotes (double, single, or backtick) around it; unchanged if it has none.
|
|
37
|
+
* @see {@link RString.splitQuotes} - to learn which quote was used
|
|
38
|
+
*/
|
|
39
|
+
unquote(str) {
|
|
40
|
+
return exports.RString.splitQuotes(str).content;
|
|
41
|
+
},
|
|
22
42
|
/**
|
|
23
43
|
* Returns the minimum R version that supports raw strings (in a stable format).
|
|
24
44
|
* @see {@link RString}
|
|
@@ -15,6 +15,7 @@ export interface RSymbol<Info = NoInfo, T extends Identifier = Identifier> exten
|
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Helper for working with {@link RSymbol} AST nodes.
|
|
18
|
+
* @helper ast
|
|
18
19
|
*/
|
|
19
20
|
export declare const RSymbol: {
|
|
20
21
|
readonly name: "RSymbol";
|
|
@@ -49,5 +50,6 @@ export declare const RSymbol: {
|
|
|
49
50
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
50
51
|
lexeme: string;
|
|
51
52
|
} ? string : string | undefined;
|
|
53
|
+
readonly ownLexeme: (this: void, node: RNode<import("../processing/decorate").ParentInformation> | undefined) => string | undefined;
|
|
52
54
|
readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
|
|
53
55
|
};
|
|
@@ -12,6 +12,7 @@ export interface RUnaryOp<Info = NoInfo> extends RAstNodeBase<Info>, Location {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Helper for working with {@link RUnaryOp} AST nodes.
|
|
15
|
+
* @helper ast
|
|
15
16
|
*/
|
|
16
17
|
export declare const RUnaryOp: {
|
|
17
18
|
readonly name: "RUnaryOp";
|
|
@@ -42,5 +43,6 @@ export declare const RUnaryOp: {
|
|
|
42
43
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
43
44
|
lexeme: string;
|
|
44
45
|
} ? string : string | undefined;
|
|
46
|
+
readonly ownLexeme: (this: void, node: RNode<import("../processing/decorate").ParentInformation> | undefined) => string | undefined;
|
|
45
47
|
readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
|
|
46
48
|
};
|
|
@@ -14,6 +14,7 @@ export interface RWhileLoop<Info = NoInfo> extends RAstNodeBase<Info>, Location
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Helper for working with {@link RWhileLoop} AST nodes.
|
|
17
|
+
* @helper ast
|
|
17
18
|
*/
|
|
18
19
|
export declare const RWhileLoop: {
|
|
19
20
|
readonly name: "RWhileLoop";
|
|
@@ -40,5 +41,6 @@ export declare const RWhileLoop: {
|
|
|
40
41
|
readonly lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends {
|
|
41
42
|
lexeme: string;
|
|
42
43
|
} ? string : string | undefined;
|
|
44
|
+
readonly ownLexeme: (this: void, node: RNode<import("../processing/decorate").ParentInformation> | undefined) => string | undefined;
|
|
43
45
|
readonly documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf;
|
|
44
46
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UnaryOperatorsInRAst = exports.OperatorsInRAst = exports.Operators = exports.OperatorDatabase = void 0;
|
|
4
4
|
const type_1 = require("./type");
|
|
5
|
-
/* eslint-disable */
|
|
6
5
|
exports.OperatorDatabase = {
|
|
7
6
|
/* model formulae */
|
|
8
7
|
'~': { name: 'model formulae', stringUsedInRAst: type_1.RawRType.Tilde, stringUsedInternally: '~', writtenAs: 'infix', arity: 3 /* OperatorArity.Both */, usedAs: 'operation', capabilities: ['binary-operator', 'infix-calls', 'model-formula', 'function-calls'] },
|
|
@@ -45,7 +44,6 @@ exports.OperatorDatabase = {
|
|
|
45
44
|
':': { name: 'sequence operator', stringUsedInRAst: type_1.RawRType.Colon, stringUsedInternally: ':', writtenAs: 'infix', arity: 2 /* OperatorArity.Binary */, usedAs: 'operation', capabilities: ['binary-operator', 'infix-calls', 'function-calls'] },
|
|
46
45
|
'?': { name: 'question', stringUsedInRAst: type_1.RawRType.Question, stringUsedInternally: '?', writtenAs: 'prefix', arity: 1 /* OperatorArity.Unary */, usedAs: 'operation', capabilities: ['unary-operator', 'built-in-help'] }
|
|
47
46
|
};
|
|
48
|
-
/* eslint-enable */
|
|
49
47
|
function buildOperatorRAstCollection(operators) {
|
|
50
48
|
return new Set(operators.map(op => exports.OperatorDatabase[op].stringUsedInRAst));
|
|
51
49
|
}
|
|
@@ -59,12 +59,7 @@ function decorateAst(project, { getId = deterministicCountingIdGenerator(0) }) {
|
|
|
59
59
|
const unaryOp = createFoldForUnaryOp(info);
|
|
60
60
|
const folds = {
|
|
61
61
|
down: (n, nesting) => {
|
|
62
|
-
|
|
63
|
-
return nesting + 1;
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
return nesting;
|
|
67
|
-
}
|
|
62
|
+
return exports.nestForElement.has(n.type) ? nesting + 1 : nesting;
|
|
68
63
|
},
|
|
69
64
|
foldNumber: foldLeaf,
|
|
70
65
|
foldString: foldLeaf,
|
|
@@ -11,11 +11,6 @@ function down() {
|
|
|
11
11
|
* Internally implemented as a special case of a two-way fold (with the down part as an essential no-op)
|
|
12
12
|
*/
|
|
13
13
|
function foldAst(ast, folds) {
|
|
14
|
-
|
|
15
|
-
const statefulFolds = folds;
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
17
|
-
statefulFolds.down = down;
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
19
|
-
return (0, stateful_fold_1.foldAstStateful)(ast, undefined, statefulFolds);
|
|
14
|
+
return (0, stateful_fold_1.foldAstStateful)(ast, undefined, Object.assign(folds, { down }));
|
|
20
15
|
}
|
|
21
16
|
//# sourceMappingURL=fold.js.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NodeId = void 0;
|
|
4
|
+
const r_string_1 = require("../nodes/r-string");
|
|
4
5
|
const vertex_1 = require("../../../../../dataflow/graph/vertex");
|
|
5
|
-
const
|
|
6
|
+
const model_1 = require("../model");
|
|
6
7
|
const identifier_1 = require("../../../../../dataflow/environments/identifier");
|
|
7
8
|
const strings_1 = require("../../../../../util/text/strings");
|
|
8
9
|
/** whether the id starts as a number does, which `+id` alone does not tell: it turns a blank string into `0` */
|
|
@@ -131,9 +132,9 @@ exports.NodeId = {
|
|
|
131
132
|
if (node === undefined) {
|
|
132
133
|
return undefined;
|
|
133
134
|
}
|
|
134
|
-
const lexeme =
|
|
135
|
+
const lexeme = model_1.RNode.ownLexeme(node) ?? '';
|
|
135
136
|
if (vertex_1.DfgVertex.isUse(vertex)) {
|
|
136
|
-
return
|
|
137
|
+
return r_string_1.RString.unquote(lexeme);
|
|
137
138
|
}
|
|
138
139
|
return lexeme;
|
|
139
140
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RootId = void 0;
|
|
4
4
|
exports.prepareParsedData = prepareParsedData;
|
|
5
5
|
exports.convertPreparedParsedData = convertPreparedParsedData;
|
|
6
|
-
const
|
|
6
|
+
const r_string_1 = require("../../model/nodes/r-string");
|
|
7
7
|
const assert_1 = require("../../../../../util/assert");
|
|
8
8
|
const type_1 = require("../../model/type");
|
|
9
9
|
exports.RootId = 0;
|
|
@@ -107,7 +107,7 @@ function prepareParsedData(data) {
|
|
|
107
107
|
}
|
|
108
108
|
(0, assert_1.guard)(Array.isArray(json), () => `Expected ${data} to be an array but was not`);
|
|
109
109
|
const ret = new Map(json.map(([line1, col1, line2, col2, id, parent, token, terminal, text]) => {
|
|
110
|
-
return [id, { line1, col1, line2, col2, id, parent, token:
|
|
110
|
+
return [id, { line1, col1, line2, col2, id, parent, token: r_string_1.RString.unquote(token), terminal, text }];
|
|
111
111
|
}));
|
|
112
112
|
const roots = [];
|
|
113
113
|
// iterate a second time to set parent-child relations (since they may be out of order in the csv)
|
|
@@ -33,11 +33,7 @@ function tryNormalizeIfThen(data, [ifT, lpT, cT, rpT, tT]) {
|
|
|
33
33
|
then: (0, normalize_meta_1.ensureExpressionList)(parsedThen),
|
|
34
34
|
location,
|
|
35
35
|
lexeme: content,
|
|
36
|
-
info:
|
|
37
|
-
fullRange: data.currentRange,
|
|
38
|
-
adToks: [],
|
|
39
|
-
fullLexeme: data.currentLexeme
|
|
40
|
-
}
|
|
36
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
41
37
|
};
|
|
42
38
|
}
|
|
43
39
|
//# sourceMappingURL=normalize-if-then.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.tryToNormalizeArgument = tryToNormalizeArgument;
|
|
4
|
+
const r_string_1 = require("../../../../model/nodes/r-string");
|
|
4
5
|
const parser_1 = require("../../../json/parser");
|
|
5
6
|
const normalize_meta_1 = require("../../normalize-meta");
|
|
6
7
|
const assert_1 = require("../../../../../../../util/assert");
|
|
7
8
|
const r_delimiter_1 = require("../../../../model/nodes/info/r-delimiter");
|
|
8
9
|
const type_1 = require("../../../../model/type");
|
|
9
10
|
const normalize_single_node_1 = require("../structure/normalize-single-node");
|
|
10
|
-
const strings_1 = require("../../../../../../../util/text/strings");
|
|
11
11
|
/**
|
|
12
12
|
* Either parses `[expr]` or `[SYMBOL_SUB, EQ_SUB, expr]` as an argument of a function call in R.
|
|
13
13
|
* Probably directly called by the function call parser as otherwise, we do not expect to find arguments.
|
|
@@ -32,7 +32,7 @@ function tryToNormalizeArgument(data, objs) {
|
|
|
32
32
|
name = {
|
|
33
33
|
type: type_1.RType.Symbol,
|
|
34
34
|
location,
|
|
35
|
-
content:
|
|
35
|
+
content: r_string_1.RString.unquote(content),
|
|
36
36
|
lexeme: content,
|
|
37
37
|
info: {
|
|
38
38
|
fullRange: location,
|
|
@@ -80,11 +80,7 @@ function tryParseUnnamedFunctionCall(data, mappedWithName, location, content) {
|
|
|
80
80
|
type: type_1.RType.Next,
|
|
81
81
|
lexeme: content,
|
|
82
82
|
location,
|
|
83
|
-
info:
|
|
84
|
-
fullRange: data.currentRange,
|
|
85
|
-
adToks: [],
|
|
86
|
-
fullLexeme: data.currentLexeme
|
|
87
|
-
}
|
|
83
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
88
84
|
};
|
|
89
85
|
}
|
|
90
86
|
else if (r_break_1.RBreak.is(calledFunction)) {
|
|
@@ -92,11 +88,7 @@ function tryParseUnnamedFunctionCall(data, mappedWithName, location, content) {
|
|
|
92
88
|
type: type_1.RType.Break,
|
|
93
89
|
lexeme: content,
|
|
94
90
|
location,
|
|
95
|
-
info:
|
|
96
|
-
fullRange: data.currentRange,
|
|
97
|
-
adToks: [],
|
|
98
|
-
fullLexeme: data.currentLexeme
|
|
99
|
-
}
|
|
91
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
100
92
|
};
|
|
101
93
|
}
|
|
102
94
|
}
|
|
@@ -107,11 +99,7 @@ function tryParseUnnamedFunctionCall(data, mappedWithName, location, content) {
|
|
|
107
99
|
lexeme: content,
|
|
108
100
|
calledFunction: calledFunction,
|
|
109
101
|
arguments: parsedArguments.map(x => x ?? r_function_call_1.EmptyArgument),
|
|
110
|
-
info:
|
|
111
|
-
fullRange: data.currentRange,
|
|
112
|
-
adToks: [],
|
|
113
|
-
fullLexeme: data.currentLexeme
|
|
114
|
-
}
|
|
102
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
115
103
|
};
|
|
116
104
|
}
|
|
117
105
|
function parseNamedFunctionCall(data, symbolContent, mappedWithName, location, content) {
|
|
@@ -139,11 +127,7 @@ function parseNamedFunctionCall(data, symbolContent, mappedWithName, location, c
|
|
|
139
127
|
lexeme: content,
|
|
140
128
|
functionName,
|
|
141
129
|
arguments: parsedArguments.map(x => x ?? r_function_call_1.EmptyArgument),
|
|
142
|
-
info:
|
|
143
|
-
fullRange: data.currentRange,
|
|
144
|
-
adToks: [],
|
|
145
|
-
fullLexeme: data.currentLexeme
|
|
146
|
-
}
|
|
130
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
147
131
|
};
|
|
148
132
|
}
|
|
149
133
|
//# sourceMappingURL=normalize-call.js.map
|
|
@@ -42,11 +42,7 @@ function tryNormalizeFunctionDefinition(data, mappedWithName) {
|
|
|
42
42
|
lexeme: content,
|
|
43
43
|
parameters: parameters,
|
|
44
44
|
body: (0, normalize_meta_1.ensureExpressionList)(body[0]),
|
|
45
|
-
info:
|
|
46
|
-
fullRange: data.currentRange,
|
|
47
|
-
adToks: [],
|
|
48
|
-
fullLexeme: data.currentLexeme
|
|
49
|
-
}
|
|
45
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
50
46
|
};
|
|
51
47
|
}
|
|
52
48
|
//# sourceMappingURL=normalize-definition.js.map
|
|
@@ -17,11 +17,7 @@ function normalizeNext(data, obj) {
|
|
|
17
17
|
type: type_1.RType.Next,
|
|
18
18
|
location,
|
|
19
19
|
lexeme: content,
|
|
20
|
-
info:
|
|
21
|
-
fullRange: data.currentRange,
|
|
22
|
-
adToks: [],
|
|
23
|
-
fullLexeme: data.currentLexeme
|
|
24
|
-
}
|
|
20
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
25
21
|
};
|
|
26
22
|
}
|
|
27
23
|
//# sourceMappingURL=normalize-next.js.map
|
|
@@ -28,11 +28,7 @@ function tryNormalizeRepeat(data, [repeatToken, bodyToken]) {
|
|
|
28
28
|
location,
|
|
29
29
|
lexeme: content,
|
|
30
30
|
body: (0, normalize_meta_1.ensureExpressionList)(parseBody),
|
|
31
|
-
info:
|
|
32
|
-
fullRange: data.currentRange,
|
|
33
|
-
adToks: [],
|
|
34
|
-
fullLexeme: data.currentLexeme
|
|
35
|
-
}
|
|
31
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
36
32
|
};
|
|
37
33
|
}
|
|
38
34
|
//# sourceMappingURL=normalize-repeat.js.map
|
|
@@ -25,10 +25,7 @@ function tryNormalizeWhile(data, [whileToken, leftParen, condition, rightParen,
|
|
|
25
25
|
const parsedCondition = (0, normalize_single_node_1.normalizeSingleNode)(data, condition);
|
|
26
26
|
const parseBody = (0, normalize_single_node_1.normalizeSingleNode)(data, body);
|
|
27
27
|
if (r_delimiter_1.RDelimiter.is(parsedCondition) || r_delimiter_1.RDelimiter.is(parseBody)) {
|
|
28
|
-
throw new normalizer_data_1.ParseError(`unexpected under-sided while-loop, received ${JSON.stringify([
|
|
29
|
-
parsedCondition,
|
|
30
|
-
parseBody,
|
|
31
|
-
])} for ${JSON.stringify([whileToken, condition, body])}`);
|
|
28
|
+
throw new normalizer_data_1.ParseError(`unexpected under-sided while-loop, received ${JSON.stringify([parsedCondition, parseBody])} for ${JSON.stringify([whileToken, condition, body])}`);
|
|
32
29
|
}
|
|
33
30
|
const { location, content } = (0, normalize_meta_1.retrieveMetaStructure)(whileToken.content);
|
|
34
31
|
return {
|
|
@@ -37,11 +34,7 @@ function tryNormalizeWhile(data, [whileToken, leftParen, condition, rightParen,
|
|
|
37
34
|
body: (0, normalize_meta_1.ensureExpressionList)(parseBody),
|
|
38
35
|
lexeme: content,
|
|
39
36
|
location,
|
|
40
|
-
info:
|
|
41
|
-
fullRange: data.currentRange,
|
|
42
|
-
adToks: [],
|
|
43
|
-
fullLexeme: data.currentLexeme
|
|
44
|
-
}
|
|
37
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
45
38
|
};
|
|
46
39
|
}
|
|
47
40
|
//# sourceMappingURL=normalize-while.js.map
|
|
@@ -95,11 +95,7 @@ function tryNormalizeAccess(data, mappedWithName) {
|
|
|
95
95
|
accessed: parsedAccessed[0],
|
|
96
96
|
operator,
|
|
97
97
|
access: parsedAccess,
|
|
98
|
-
info:
|
|
99
|
-
fullRange: data.currentRange,
|
|
100
|
-
adToks: [],
|
|
101
|
-
fullLexeme: data.currentLexeme
|
|
102
|
-
}
|
|
98
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
103
99
|
};
|
|
104
100
|
}
|
|
105
101
|
//# sourceMappingURL=normalize-access.js.map
|
|
@@ -91,11 +91,7 @@ function parseBinaryOp(data, lhs, operator, rhs) {
|
|
|
91
91
|
},
|
|
92
92
|
rhs: desugarPipeBindRhs(parsedRhs),
|
|
93
93
|
lexeme: content,
|
|
94
|
-
info:
|
|
95
|
-
fullRange: data.currentRange,
|
|
96
|
-
adToks: [],
|
|
97
|
-
fullLexeme: data.currentLexeme
|
|
98
|
-
}
|
|
94
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
99
95
|
};
|
|
100
96
|
}
|
|
101
97
|
else {
|
|
@@ -106,11 +102,7 @@ function parseBinaryOp(data, lhs, operator, rhs) {
|
|
|
106
102
|
rhs: parsedRhs,
|
|
107
103
|
operator: operationName,
|
|
108
104
|
lexeme: content,
|
|
109
|
-
info:
|
|
110
|
-
fullRange: data.currentRange,
|
|
111
|
-
adToks: [],
|
|
112
|
-
fullLexeme: data.currentLexeme
|
|
113
|
-
}
|
|
105
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
114
106
|
};
|
|
115
107
|
}
|
|
116
108
|
}
|
|
@@ -18,12 +18,7 @@ const r_delimiter_1 = require("../../../../model/nodes/info/r-delimiter");
|
|
|
18
18
|
*/
|
|
19
19
|
function tryNormalizeUnary(data, [operator, operand]) {
|
|
20
20
|
(0, log_1.expensiveTrace)(parser_1.parseLog, () => `unary op for ${operator.name} ${operand.name}`);
|
|
21
|
-
|
|
22
|
-
return parseUnaryOp(data, operator, operand);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return undefined;
|
|
26
|
-
}
|
|
21
|
+
return operators_1.UnaryOperatorsInRAst.has(operator.name) ? parseUnaryOp(data, operator, operand) : undefined;
|
|
27
22
|
}
|
|
28
23
|
function parseUnaryOp(data, operator, operand) {
|
|
29
24
|
const parsedOperand = (0, normalize_single_node_1.normalizeSingleNode)(data, operand);
|
|
@@ -36,11 +31,7 @@ function parseUnaryOp(data, operator, operand) {
|
|
|
36
31
|
operator: operationName,
|
|
37
32
|
lexeme: content,
|
|
38
33
|
operand: parsedOperand,
|
|
39
|
-
info:
|
|
40
|
-
fullRange: data.currentRange,
|
|
41
|
-
adToks: [],
|
|
42
|
-
fullLexeme: data.currentLexeme
|
|
43
|
-
}
|
|
34
|
+
info: (0, normalize_meta_1.currentSourceInfo)(data)
|
|
44
35
|
};
|
|
45
36
|
}
|
|
46
37
|
//# sourceMappingURL=normalize-unary.js.map
|
|
@@ -100,18 +100,10 @@ function handleExpressionList(raw) {
|
|
|
100
100
|
}
|
|
101
101
|
const { comments, others: tokens } = splitComments(raw);
|
|
102
102
|
const first = tokens[0]?.name;
|
|
103
|
-
|
|
103
|
+
const close = first === type_1.RawRType.BraceLeft ? type_1.RawRType.BraceRight : first === type_1.RawRType.ParenLeft ? type_1.RawRType.ParenRight : undefined;
|
|
104
|
+
if (close !== undefined) {
|
|
104
105
|
const endType = tokens[tokens.length - 1].name;
|
|
105
|
-
(0, assert_1.guard)(endType ===
|
|
106
|
-
return {
|
|
107
|
-
segments: [tokens.slice(1, tokens.length - 1)],
|
|
108
|
-
comments,
|
|
109
|
-
braces: [tokens[0], tokens[tokens.length - 1]]
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
else if (first === type_1.RawRType.ParenLeft) {
|
|
113
|
-
const endType = tokens[tokens.length - 1].name;
|
|
114
|
-
(0, assert_1.guard)(endType === type_1.RawRType.ParenRight, () => `expected a parenthesis at the end of the expression list as well, but ${endType} :: ${JSON.stringify(tokens[tokens.length - 1], json_1.jsonReplacer)}`);
|
|
106
|
+
(0, assert_1.guard)(endType === close, () => `expected a ${first === type_1.RawRType.BraceLeft ? 'brace' : 'parenthesis'} at the end of the expression list as well, but ${endType} :: ${JSON.stringify(tokens[tokens.length - 1], json_1.jsonReplacer)}`);
|
|
115
107
|
return {
|
|
116
108
|
segments: [tokens.slice(1, tokens.length - 1)],
|
|
117
109
|
comments,
|