@eagleoutice/flowr 2.16.2 → 2.16.3
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 +10 -10
- 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 +2 -3
- 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 +1 -2
- 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-repl.js +4 -4
- 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 +1 -1
- package/documentation/wiki-dataflow-graph.js +6 -6
- package/documentation/wiki-interface.js +3 -2
- package/documentation/wiki-linter.js +54 -4
- 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 +518 -1
- 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.js +4 -3
- 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 +211 -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 +47 -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 +54 -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 +49 -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 +165 -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 +67 -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/deprecated-functions.js +4 -4
- package/linter/rules/naming-convention.d.ts +1 -1
- package/linter/rules/naming-convention.js +13 -14
- package/linter/rules/no-leaked-credentials.js +4 -4
- package/linter/rules/problematic-inputs.js +2 -1
- package/linter/rules/seeded-randomness.js +5 -5
- package/linter/rules/software-has-license.d.ts +1 -1
- package/linter/rules/software-has-license.js +1 -1
- package/linter/rules/unclosed-connection.js +3 -3
- package/linter/rules/undefined-symbol-util.js +16 -32
- package/linter/rules/undefined-symbol.d.ts +2 -0
- package/linter/rules/undefined-symbol.js +33 -3
- package/linter/rules/unescaped-arguments.js +10 -9
- package/linter/rules/unused-definition.js +13 -19
- 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 +1 -1
- package/project/context/flowr-analyzer-files-context.d.ts +6 -0
- package/project/context/flowr-analyzer-files-context.js +3 -0
- 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/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 +43 -0
- package/queries/catalog/dependencies-query/data-flow.js +173 -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 +33 -34
- 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
package/util/diff-graph.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ export interface EdgeIndexedGraph<EdgeMap> {
|
|
|
50
50
|
}
|
|
51
51
|
/** The edge-differencing steps shared by the dataflow and the control flow graph diff. */
|
|
52
52
|
export declare const GraphDiff: {
|
|
53
|
+
/** Reports a differing number of vertices unless the smaller side is declared a subgraph. */
|
|
54
|
+
readonly vertexCount: <Graph>(this: void, ctx: GraphDiffContext<Graph>, left: number, right: number) => void;
|
|
55
|
+
/** Reports a vertex of the left graph that the right one lacks, unless the right is declared a subgraph. */
|
|
56
|
+
readonly missingVertex: <Graph>(this: void, ctx: GraphDiffContext<Graph>, id: NodeId) => void;
|
|
53
57
|
/** Compares all edges of both graphs vertex by vertex, handing each pair to `diffEdges`. */
|
|
54
58
|
readonly outgoingEdges: <EdgeMap, Graph extends EdgeIndexedGraph<EdgeMap>>(this: void, ctx: GraphDiffContext<Graph>, diffEdges: (ctx: GraphDiffContext<Graph>, id: NodeId, lEdges: EdgeMap | undefined, rEdges: EdgeMap | undefined) => void, project?: (edges: EdgeMap) => EdgeMap | undefined) => void;
|
|
55
59
|
/** Compares the outgoing edges of a single vertex, handing each pair of edges to `diffEdge`. */
|
package/util/diff-graph.js
CHANGED
|
@@ -74,6 +74,18 @@ function collectEdges(graph, project) {
|
|
|
74
74
|
}
|
|
75
75
|
/** The edge-differencing steps shared by the dataflow and the control flow graph diff. */
|
|
76
76
|
exports.GraphDiff = {
|
|
77
|
+
/** Reports a differing number of vertices unless the smaller side is declared a subgraph. */
|
|
78
|
+
vertexCount(ctx, left, right) {
|
|
79
|
+
if (left < right && !ctx.config.leftIsSubgraph || left > right && !ctx.config.rightIsSubgraph) {
|
|
80
|
+
ctx.report.addComment(`Detected different number of vertices! ${ctx.leftname} has ${left}, ${ctx.rightname} has ${right}`);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
/** Reports a vertex of the left graph that the right one lacks, unless the right is declared a subgraph. */
|
|
84
|
+
missingVertex(ctx, id) {
|
|
85
|
+
if (!ctx.config.rightIsSubgraph) {
|
|
86
|
+
ctx.report.addComment(`Vertex ${id} is not present in ${ctx.rightname}`, { tag: 'vertex', id });
|
|
87
|
+
}
|
|
88
|
+
},
|
|
77
89
|
/** Compares all edges of both graphs vertex by vertex, handing each pair to `diffEdges`. */
|
|
78
90
|
outgoingEdges(ctx, diffEdges, project) {
|
|
79
91
|
const lEdges = collectEdges(ctx.left, project);
|
package/util/files.js
CHANGED
|
@@ -155,10 +155,8 @@ async function readLineByLine(filePath, onLine, maxLines = Infinity) {
|
|
|
155
155
|
return false;
|
|
156
156
|
}
|
|
157
157
|
const reader = new n_readlines_1.default(filePath);
|
|
158
|
-
let line;
|
|
159
158
|
let counter = 0;
|
|
160
|
-
|
|
161
|
-
while (line = reader.next()) {
|
|
159
|
+
for (let line = reader.next(); line; line = reader.next()) {
|
|
162
160
|
if (counter >= maxLines) {
|
|
163
161
|
return false;
|
|
164
162
|
}
|
|
@@ -180,10 +178,8 @@ function readLineByLineSync(filePath, onLine, maxLines = Infinity) {
|
|
|
180
178
|
return false;
|
|
181
179
|
}
|
|
182
180
|
const reader = new n_readlines_1.default(filePath);
|
|
183
|
-
let line;
|
|
184
181
|
let counter = 0;
|
|
185
|
-
|
|
186
|
-
while (line = reader.next()) {
|
|
182
|
+
for (let line = reader.next(); line; line = reader.next()) {
|
|
187
183
|
if (counter >= maxLines) {
|
|
188
184
|
return false;
|
|
189
185
|
}
|
package/util/json.js
CHANGED
|
@@ -47,21 +47,7 @@ function bigStringify(obj, current, send) {
|
|
|
47
47
|
else if ((0, environment_1.isDefaultBuiltInEnvironment)(obj)) {
|
|
48
48
|
return current + '<BuiltInEnvironment>';
|
|
49
49
|
}
|
|
50
|
-
else if (Array.isArray(obj)) {
|
|
51
|
-
let str = current + '[';
|
|
52
|
-
for (let i = 0; i < obj.length; i++) {
|
|
53
|
-
if (i > 0) {
|
|
54
|
-
str += ',';
|
|
55
|
-
}
|
|
56
|
-
str = bigStringify(obj[i], str, send);
|
|
57
|
-
if (str.length > 20_000) {
|
|
58
|
-
send(str);
|
|
59
|
-
str = '';
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return str + ']';
|
|
63
|
-
}
|
|
64
|
-
else if (obj instanceof Map || obj instanceof Set) {
|
|
50
|
+
else if (Array.isArray(obj) || obj instanceof Map || obj instanceof Set) {
|
|
65
51
|
let str = current + '[';
|
|
66
52
|
let i = 0;
|
|
67
53
|
for (const value of obj) {
|
package/util/mermaid/cfg.js
CHANGED
|
@@ -13,11 +13,9 @@ const r_function_definition_1 = require("../../r-bridge/lang-4.x/ast/model/nodes
|
|
|
13
13
|
const convert_values_1 = require("../../r-bridge/lang-4.x/convert-values");
|
|
14
14
|
exports.MermaidEntryPointDefaultMarkStyle = 'stroke:cyan,stroke-width:6.5px;';
|
|
15
15
|
exports.MermaidExitPointDefaultMarkStyle = 'stroke:green,stroke-width:6.5px;';
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function cfgOfNode(vert, normalizedVertex, id, content, output) {
|
|
20
|
-
if (normalizedVertex && content !== undefined) {
|
|
16
|
+
function cfgOfNode(vert, normalizedVertex, id, output) {
|
|
17
|
+
if (normalizedVertex) {
|
|
18
|
+
const content = model_1.RNode.lexeme(normalizedVertex) ?? '';
|
|
21
19
|
const start = control_flow_graph_1.CfgVertex.isExpression(vert) ? '([' : '[';
|
|
22
20
|
const end = control_flow_graph_1.CfgVertex.isExpression(vert) ? '])' : ']';
|
|
23
21
|
/* the code is set in bold so it stands out from the type and id above it */
|
|
@@ -64,15 +62,12 @@ function collectBodies(graph) {
|
|
|
64
62
|
* A definition itself belongs to the region it is written in, not to the one it opens.
|
|
65
63
|
*/
|
|
66
64
|
function regionOf(id, normalizedAst) {
|
|
67
|
-
let current = normalizedAst.idMap.get(id);
|
|
68
|
-
current = current?.info.parent === undefined ? undefined : normalizedAst.idMap.get(current.info.parent);
|
|
69
65
|
let inParameters = false;
|
|
70
|
-
|
|
66
|
+
for (const current of model_1.RNode.iterateParents(normalizedAst.idMap.get(id), normalizedAst.idMap)) {
|
|
71
67
|
inParameters ||= current.info.role === "param" /* RoleInParent.FunctionDefinitionParameter */;
|
|
72
68
|
if (r_function_definition_1.RFunctionDefinition.is(current)) {
|
|
73
69
|
return `${current.info.id}-${inParameters ? 'parameters' : 'body'}`;
|
|
74
70
|
}
|
|
75
|
-
current = current.info.parent === undefined ? undefined : normalizedAst.idMap.get(current.info.parent);
|
|
76
71
|
}
|
|
77
72
|
return 'top-level';
|
|
78
73
|
}
|
|
@@ -108,7 +103,7 @@ function blockCode(elems, normalizedAst) {
|
|
|
108
103
|
function conditionName(cfg, normalizedAst, from) {
|
|
109
104
|
const vertex = cfg.graph.getVertex(from);
|
|
110
105
|
const condition = control_flow_graph_1.CfgVertex.isBlock(vertex) ? control_flow_graph_1.CfgVertex.getId(control_flow_graph_1.CfgVertex.getBasicBlockElements(vertex).at(-1)) ?? from : from;
|
|
111
|
-
const lexeme =
|
|
106
|
+
const lexeme = model_1.RNode.lexeme(normalizedAst.idMap.get(condition));
|
|
112
107
|
return lexeme ? `${lexeme} (${condition})` : String(condition);
|
|
113
108
|
}
|
|
114
109
|
function shouldIncludeNode(simplify, v, include) {
|
|
@@ -156,7 +151,7 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart TD\n', simplify
|
|
|
156
151
|
return;
|
|
157
152
|
}
|
|
158
153
|
const definition = normalizedAst.idMap.get(defId);
|
|
159
|
-
output += ` subgraph n${defId}-body ["body of ${mermaid_1.Mermaid.escape(limitTo(
|
|
154
|
+
output += ` subgraph n${defId}-body ["body of ${mermaid_1.Mermaid.escape(limitTo(model_1.RNode.lexeme(definition) ?? String(defId), 40))}"]\n`;
|
|
160
155
|
output += ` direction ${dirIs}\n`;
|
|
161
156
|
for (const vertexId of body) {
|
|
162
157
|
const vertex = cfg.graph.getVertex(vertexId);
|
|
@@ -164,7 +159,7 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart TD\n', simplify
|
|
|
164
159
|
continue;
|
|
165
160
|
}
|
|
166
161
|
const node = normalizedAst.idMap.get(vertexId);
|
|
167
|
-
output = cfgOfNode(vertex, node, vertexId,
|
|
162
|
+
output = cfgOfNode(vertex, node, vertexId, output);
|
|
168
163
|
diagramIncludedIds.add(vertexId);
|
|
169
164
|
emitBody(vertexId);
|
|
170
165
|
}
|
|
@@ -172,7 +167,6 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart TD\n', simplify
|
|
|
172
167
|
};
|
|
173
168
|
for (const [id, vertex] of cfg.graph.vertices(false)) {
|
|
174
169
|
const normalizedVertex = normalizedAst?.idMap.get(id);
|
|
175
|
-
const content = getLexeme(normalizedVertex);
|
|
176
170
|
if (control_flow_graph_1.CfgVertex.isBlock(vertex)) {
|
|
177
171
|
const elems = control_flow_graph_1.CfgVertex.getBasicBlockElements(vertex);
|
|
178
172
|
if (simplify) {
|
|
@@ -188,7 +182,7 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart TD\n', simplify
|
|
|
188
182
|
if (includeOnlyIds && !elems.some(elem => includeOnlyIds.has(control_flow_graph_1.CfgVertex.getId(elem)))) {
|
|
189
183
|
continue;
|
|
190
184
|
}
|
|
191
|
-
output += ` subgraph n${id} [Block ${normalizedVertex
|
|
185
|
+
output += ` subgraph n${id} [Block ${model_1.RNode.lexeme(normalizedVertex) ?? id}]\n`;
|
|
192
186
|
output += ` direction ${dirIs}\n`;
|
|
193
187
|
diagramIncludedIds.add(id);
|
|
194
188
|
let last = undefined;
|
|
@@ -199,8 +193,7 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart TD\n', simplify
|
|
|
199
193
|
}
|
|
200
194
|
const eid = control_flow_graph_1.CfgVertex.getId(element);
|
|
201
195
|
const childNormalizedVertex = normalizedAst?.idMap.get(eid);
|
|
202
|
-
|
|
203
|
-
output = cfgOfNode(element, childNormalizedVertex, eid, childContent, output);
|
|
196
|
+
output = cfgOfNode(element, childNormalizedVertex, eid, output);
|
|
204
197
|
diagramIncludedIds.add(eid);
|
|
205
198
|
/* everything in a block runs one after the other, which is what these arrows show */
|
|
206
199
|
if (last) {
|
|
@@ -212,7 +205,7 @@ function cfgToMermaid(cfg, normalizedAst, { prefix = 'flowchart TD\n', simplify
|
|
|
212
205
|
}
|
|
213
206
|
}
|
|
214
207
|
else if ((!includeOnlyIds || includeOnlyIds.has(id)) && !partOfBody.has(id)) {
|
|
215
|
-
output = cfgOfNode(vertex, normalizedVertex, id,
|
|
208
|
+
output = cfgOfNode(vertex, normalizedVertex, id, output);
|
|
216
209
|
diagramIncludedIds.add(id);
|
|
217
210
|
emitBody(id);
|
|
218
211
|
}
|
package/util/mermaid/dfg.js
CHANGED
|
@@ -29,7 +29,7 @@ function subflowToMermaid(nodeId, subflow, mermaid, idPrefix = '') {
|
|
|
29
29
|
const idMap = mermaid.rootGraph.idMap;
|
|
30
30
|
const node = idMap?.get(nodeId);
|
|
31
31
|
const nodeLexeme = model_1.RNode.lexeme(node) ?? 'function';
|
|
32
|
-
const location = node?.location
|
|
32
|
+
const location = range_1.SourceRange.getStartLine(node?.location) ? ` (L. ${range_1.SourceRange.getStartLine(node?.location)})` : '';
|
|
33
33
|
mermaid.nodeLines.push(`\nsubgraph "${subflowId}" ["${mermaid_1.Mermaid.escape(nodeLexeme)}${location}"]`);
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
@@ -191,7 +191,7 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
if (mermaid.simplified) {
|
|
194
|
-
const location = node?.location
|
|
194
|
+
const location = range_1.SourceRange.getStartLine(node?.location) ? ` (L. ${range_1.SourceRange.getStartLine(node?.location)})` : '';
|
|
195
195
|
const escapedName = (node ? boldLexeme(lexeme, display) : '**??**') + location + (node ? `\n*${node.type}*` : '');
|
|
196
196
|
mermaid.nodeLines.push(` ${idPrefix}${id}${open}"\`${escapedName}\`"${close}`);
|
|
197
197
|
}
|
|
@@ -201,7 +201,7 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
|
|
|
201
201
|
const lnks = info.link?.origin ? ', links: ' + info.link.origin.map(o => mermaid_1.Mermaid.escapeId(o)).join(', ') : '';
|
|
202
202
|
const source = vertex_1.DfgVertex.isVariableDefinition(info) ? info.source : undefined;
|
|
203
203
|
const sources = source ? ', v: ' + source.map(s => mermaid_1.Mermaid.escapeId(s)).join(', ') : '';
|
|
204
|
-
const n =
|
|
204
|
+
const n = range_1.SourceRange.fromNode(node) ?? (r_expression_list_1.RExpressionList.is(node) ? node?.grouping?.[0].location : undefined);
|
|
205
205
|
mermaid.nodeLines.push(` ${idPrefix}${id}${open}"\`${escapedName}\n *${range_1.SourceRange.format(n)}* (**id: ${id}**${deps}${lnks}${sources})${fCall ? displayFunctionArgMapping(info.args) : '' + (vertex_1.DfgVertex.isFunctionDefinition(info) && info.mode && info.mode.length > 0 ? mermaid_1.Mermaid.escape(JSON.stringify(info.mode)) : '')}\`"${close}`);
|
|
206
206
|
}
|
|
207
207
|
if (mark?.has(id)) {
|
|
@@ -218,13 +218,11 @@ function vertexToMermaid(info, mermaid, id, idPrefix, mark, includeOnlyIds) {
|
|
|
218
218
|
mermaid.nodeLines.push(' %% No edges found for ' + id);
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
if (includeOnlyIds && !includeOnlyIds.has(target)) {
|
|
221
|
+
for (const [originalTarget, edge] of edges) {
|
|
222
|
+
if (includeOnlyIds && !includeOnlyIds.has(originalTarget)) {
|
|
224
223
|
continue;
|
|
225
224
|
}
|
|
226
|
-
const
|
|
227
|
-
target = mermaid_1.Mermaid.escapeId(target);
|
|
225
|
+
const target = mermaid_1.Mermaid.escapeId(originalTarget);
|
|
228
226
|
const edgeTypes = typeof edge.types == 'number' ? new Set(edge_1.DfEdge.splitTypes(edge)) : edge.types;
|
|
229
227
|
const carriesControlFlow = edgeTypes.has(edge_1.EdgeType.FlowEdge) || edgeTypes.has(edge_1.EdgeType.ControlEdge);
|
|
230
228
|
/* an edge that carries dataflow as well stays a dataflow edge, it just says the control flow goes there too */
|
package/util/objects.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ type DefinedRecord<T> = {
|
|
|
38
38
|
export declare function compactRecord<T extends Record<string, unknown>>(record: T): DefinedRecord<T>;
|
|
39
39
|
export declare function compactRecord(record: undefined): undefined;
|
|
40
40
|
export declare function compactRecord<T extends Record<string, unknown>>(record: T | undefined): DefinedRecord<T> | undefined;
|
|
41
|
-
type Primitive = string | number | boolean | bigint | symbol | null | undefined | Date |
|
|
41
|
+
type Primitive = string | number | boolean | bigint | symbol | null | undefined | Date | ((...args: never[]) => unknown);
|
|
42
42
|
/**
|
|
43
43
|
* What sits at the given path of `T`, the counterpart of {@link AutocompletablePaths}.
|
|
44
44
|
* `never` whenever the path names nothing.
|
package/util/quads.js
CHANGED
|
@@ -99,7 +99,7 @@ function processArrayEntries(key, values, obj, quads, config) {
|
|
|
99
99
|
}
|
|
100
100
|
else {
|
|
101
101
|
// for the time being, the index does not seem of interest for the graph summary team.
|
|
102
|
-
processLiteralEntry(element, key, obj, quads, config
|
|
102
|
+
processLiteralEntry(element, key, obj, quads, config);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -129,18 +129,9 @@ function objToType(value) {
|
|
|
129
129
|
}
|
|
130
130
|
return suffix ? namedNode(`http://www.w3.org/2001/XMLSchema#${suffix}`) : undefined;
|
|
131
131
|
}
|
|
132
|
-
function processLiteralEntry(value, key, obj, quads, config
|
|
132
|
+
function processLiteralEntry(value, key, obj, quads, config) {
|
|
133
133
|
const context = retrieveContext(config.context, obj);
|
|
134
|
-
|
|
135
|
-
if (index !== undefined) {
|
|
136
|
-
const newId = `${key}-${index}`;
|
|
137
|
-
quads.push(quad(namedNode(domain + config.getId(obj, context)), namedNode(domain + key), namedNode(domain + config.getId(newId, context)), namedNode(context)));
|
|
138
|
-
quads.push(quad(namedNode(domain + config.getId(newId, context)), namedNode(domain + 'value'), literal(String(value), objToType(value)), namedNode(context)));
|
|
139
|
-
quads.push(quad(namedNode(domain + newId), namedNode(domain + 'order'), literal(String(index), namedNode('http://www.w3.org/2001/XMLSchema#integer')), namedNode(context)));
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
quads.push(quad(namedNode(domain + config.getId(obj, context)), namedNode(domain + key), literal(String(value), objToType(value)), namedNode(context)));
|
|
143
|
-
}
|
|
134
|
+
quads.push(quad(namedNode(domain + config.getId(obj, context)), namedNode(domain + key), literal(String(value), objToType(value)), namedNode(context)));
|
|
144
135
|
}
|
|
145
136
|
function processObjectEntry(key, value, obj, quads, config) {
|
|
146
137
|
if (config.ignore(key, value) || guardCycle(value)) {
|
|
@@ -166,7 +157,7 @@ function processObjectEntry(key, value, obj, quads, config) {
|
|
|
166
157
|
}
|
|
167
158
|
}
|
|
168
159
|
else {
|
|
169
|
-
processLiteralEntry(value, key, obj, quads, config
|
|
160
|
+
processLiteralEntry(value, key, obj, quads, config);
|
|
170
161
|
}
|
|
171
162
|
}
|
|
172
163
|
let store = new Set();
|
package/util/r-author.js
CHANGED
|
@@ -4,10 +4,10 @@ exports.AuthorRole = void 0;
|
|
|
4
4
|
exports.rAuthorInfoToReadable = rAuthorInfoToReadable;
|
|
5
5
|
exports.parseRAuthorString = parseRAuthorString;
|
|
6
6
|
exports.parseTextualAuthorString = parseTextualAuthorString;
|
|
7
|
+
const r_string_1 = require("../r-bridge/lang-4.x/ast/model/nodes/r-string");
|
|
7
8
|
const args_1 = require("./text/args");
|
|
8
9
|
const assert_1 = require("./assert");
|
|
9
10
|
const objects_1 = require("./objects");
|
|
10
|
-
const retriever_1 = require("../r-bridge/retriever");
|
|
11
11
|
/** https://r-pkgs.org/description.html#sec-description-authors-at-r */
|
|
12
12
|
var AuthorRole;
|
|
13
13
|
(function (AuthorRole) {
|
|
@@ -118,7 +118,7 @@ function parseRoles(roleStr) {
|
|
|
118
118
|
const parts = splitVector(roleStr);
|
|
119
119
|
for (const part of parts) {
|
|
120
120
|
const trimmed = part.trim();
|
|
121
|
-
const roleValue =
|
|
121
|
+
const roleValue = r_string_1.RString.unquote(trimmed);
|
|
122
122
|
if (Object.values(AuthorRole).includes(roleValue)) {
|
|
123
123
|
roles.push(roleValue);
|
|
124
124
|
}
|
|
@@ -134,11 +134,11 @@ function parseComments(commentStr) {
|
|
|
134
134
|
let orcid = undefined;
|
|
135
135
|
for (const part of parts) {
|
|
136
136
|
const trimmed = part.trim();
|
|
137
|
-
const commentValue =
|
|
137
|
+
const commentValue = r_string_1.RString.unquote(trimmed);
|
|
138
138
|
if (/ORCID\s*=/ig.test(commentValue)) {
|
|
139
139
|
const orcidIndex = commentValue.indexOf('=');
|
|
140
140
|
if (orcidIndex !== -1) {
|
|
141
|
-
orcid =
|
|
141
|
+
orcid = r_string_1.RString.unquote(commentValue.slice(orcidIndex + 1).trim());
|
|
142
142
|
}
|
|
143
143
|
continue;
|
|
144
144
|
}
|
|
@@ -147,7 +147,7 @@ function parseComments(commentStr) {
|
|
|
147
147
|
return comments.length > 0 || orcid ? { contents: comments, orcid: orcid } : undefined;
|
|
148
148
|
}
|
|
149
149
|
function assignArg(argMap, split) {
|
|
150
|
-
argMap.set(split.name, split.value === undefined || split.value?.length === 0 ? undefined :
|
|
150
|
+
argMap.set(split.name, split.value === undefined || split.value?.length === 0 ? undefined : r_string_1.RString.unquote(split.value));
|
|
151
151
|
}
|
|
152
152
|
function parseRPersonCall(personCall) {
|
|
153
153
|
/* function(given = NULL, family = NULL, middle = NULL,
|
package/util/range.d.ts
CHANGED
|
@@ -150,7 +150,16 @@ export declare const SourceRange: {
|
|
|
150
150
|
* @see {@link SourceRange.merge} for merging multiple ranges into a single range.
|
|
151
151
|
*/
|
|
152
152
|
readonly combineRanges: (this: void, ...ranges: SourceRange[]) => SourceRange[];
|
|
153
|
+
/**
|
|
154
|
+
* The range of the code a node spans, its own token's range if it has no full range.
|
|
155
|
+
* @see {@link SourceRange.ownFromNode} - for the range of the token the node is made of
|
|
156
|
+
*/
|
|
153
157
|
readonly fromNode: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => SourceRange | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* The range of the token a node is made of (the `<-` of an assignment), the range it spans if it has no token of its own.
|
|
160
|
+
* @see {@link SourceRange.fromNode} - for the range of the code the node spans
|
|
161
|
+
*/
|
|
162
|
+
readonly ownFromNode: <OtherInfo>(this: void, node: RNode<OtherInfo> | undefined) => SourceRange | undefined;
|
|
154
163
|
/**
|
|
155
164
|
* Wraps the range in a {@link SourceLocationView|view} offering property access (`range.startLine`) and methods.
|
|
156
165
|
* The view does not copy the tuple; see {@link SourceLocationView} for when to use it.
|
package/util/range.js
CHANGED
|
@@ -182,9 +182,20 @@ exports.SourceRange = {
|
|
|
182
182
|
return ranges.filter((range, i) => !ranges.some((other, j) => i !== j
|
|
183
183
|
&& (exports.SourceRange.isStrictSubsetOf(range, other) || (j < i && exports.SourceRange.equals(range, other)))));
|
|
184
184
|
},
|
|
185
|
+
/**
|
|
186
|
+
* The range of the code a node spans, its own token's range if it has no full range.
|
|
187
|
+
* @see {@link SourceRange.ownFromNode} - for the range of the token the node is made of
|
|
188
|
+
*/
|
|
185
189
|
fromNode(node) {
|
|
186
190
|
return node?.info.fullRange ?? node?.location;
|
|
187
191
|
},
|
|
192
|
+
/**
|
|
193
|
+
* The range of the token a node is made of (the `<-` of an assignment), the range it spans if it has no token of its own.
|
|
194
|
+
* @see {@link SourceRange.fromNode} - for the range of the code the node spans
|
|
195
|
+
*/
|
|
196
|
+
ownFromNode(node) {
|
|
197
|
+
return node?.location ?? node?.info.fullRange;
|
|
198
|
+
},
|
|
188
199
|
/**
|
|
189
200
|
* Wraps the range in a {@link SourceLocationView|view} offering property access (`range.startLine`) and methods.
|
|
190
201
|
* The view does not copy the tuple; see {@link SourceLocationView} for when to use it.
|
package/util/schema.js
CHANGED
|
@@ -196,9 +196,9 @@ function describeObject(level, formatter, desc) {
|
|
|
196
196
|
if (!('keys' in desc)) {
|
|
197
197
|
return lines;
|
|
198
198
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
const keySchema =
|
|
199
|
+
const keys = desc.keys;
|
|
200
|
+
for (const key in keys) {
|
|
201
|
+
const keySchema = keys[key];
|
|
202
202
|
lines = lines.concat(genericDescription(level + 1, formatter, key, keySchema));
|
|
203
203
|
}
|
|
204
204
|
return lines;
|
|
@@ -4,6 +4,7 @@ exports.reduceDfg = reduceDfg;
|
|
|
4
4
|
const graph_1 = require("../../dataflow/graph/graph");
|
|
5
5
|
const vertex_1 = require("../../dataflow/graph/vertex");
|
|
6
6
|
const objects_1 = require("../objects");
|
|
7
|
+
const node_id_1 = require("../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
7
8
|
const assert_1 = require("../assert");
|
|
8
9
|
const defaultReduceOptions = {
|
|
9
10
|
vertices: {
|
|
@@ -21,7 +22,7 @@ function makeFilter(options, idMap) {
|
|
|
21
22
|
if (!options.tags.includes(arg.tag)) {
|
|
22
23
|
return undefined;
|
|
23
24
|
}
|
|
24
|
-
const lexeme =
|
|
25
|
+
const lexeme = node_id_1.NodeId.recoverName(arg.id, idMap);
|
|
25
26
|
if (lexeme && (nameRegex.test(lexeme) === options.blacklistWithName)) {
|
|
26
27
|
return undefined;
|
|
27
28
|
}
|
package/util/text/ansi.js
CHANGED
|
@@ -92,8 +92,7 @@ function ansiInfo(s, f = exports.formatter) {
|
|
|
92
92
|
}
|
|
93
93
|
exports.escape = '\x1b[';
|
|
94
94
|
/** every {@link escape} sequence, so a place that cannot colour (a browser, a log file) can drop them */
|
|
95
|
-
|
|
96
|
-
const AnsiSequence = /\x1b\[[\d;]*m/g;
|
|
95
|
+
const AnsiSequence = new RegExp(`${String.fromCharCode(27)}\\[[\\d;]*m`, 'g');
|
|
97
96
|
/** The text without any colouring, for wherever an escape sequence would only show up as `[0m`. */
|
|
98
97
|
function stripAnsi(text) {
|
|
99
98
|
return text.replaceAll(AnsiSequence, '');
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Playground = exports.PlaygroundBox = void 0;
|
|
4
4
|
const url_encoding_1 = require("./url-encoding");
|
|
5
|
+
const strings_1 = require("./strings");
|
|
5
6
|
const arrays_1 = require("../collections/arrays");
|
|
6
7
|
/** the parts of the page a mark can point at, rather than a place in the script */
|
|
7
8
|
var PlaygroundBox;
|
|
@@ -216,7 +217,7 @@ exports.Playground = {
|
|
|
216
217
|
},
|
|
217
218
|
/** where a name stands in a line, as a name rather than as a substring of a longer one */
|
|
218
219
|
nameIndexIn(text, name) {
|
|
219
|
-
for (const found of text.matchAll(new RegExp(
|
|
220
|
+
for (const found of text.matchAll(new RegExp((0, strings_1.escapeRegex)(name), 'g'))) {
|
|
220
221
|
const before = text[found.index - 1];
|
|
221
222
|
const after = text[found.index + name.length];
|
|
222
223
|
if (!/[\w._]/.test(before ?? ' ') && !/[\w._]/.test(after ?? ' ')) {
|
package/util/text/r-highlight.js
CHANGED
|
@@ -81,7 +81,7 @@ function boundIn(tokens) {
|
|
|
81
81
|
else if (token.kind === 'name' || token.kind === 'quoted' || token.kind === 'string') {
|
|
82
82
|
const op = next(at);
|
|
83
83
|
if (op?.kind === 'op' && (op.text === '<-' || op.text === '<<-' || (op.text === '=' && depth === 0))) {
|
|
84
|
-
bound.add(token.text
|
|
84
|
+
bound.add(r_string_1.RString.unquote(token.text));
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -168,4 +168,5 @@ function highlightR(code, knownNames) {
|
|
|
168
168
|
return link === undefined || bound.has(link) ? renderRToken(a) : renderRToken(a, knownNames, link);
|
|
169
169
|
}).join('');
|
|
170
170
|
}
|
|
171
|
+
const r_string_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-string");
|
|
171
172
|
//# sourceMappingURL=r-highlight.js.map
|
package/util/text/strings.d.ts
CHANGED
package/util/text/strings.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.escapeRegex = escapeRegex;
|
|
6
7
|
exports.startAndEndsWith = startAndEndsWith;
|
|
7
8
|
exports.isSubsequence = isSubsequence;
|
|
8
9
|
exports.matchByPrefixOrSubsequence = matchByPrefixOrSubsequence;
|
|
@@ -17,6 +18,10 @@ exports.dottedSplits = dottedSplits;
|
|
|
17
18
|
exports.compareByCodeUnit = compareByCodeUnit;
|
|
18
19
|
const path_1 = __importDefault(require("path"));
|
|
19
20
|
const url_1 = require("url");
|
|
21
|
+
/** The text as a regex matches it literally */
|
|
22
|
+
function escapeRegex(text) {
|
|
23
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
24
|
+
}
|
|
20
25
|
/**
|
|
21
26
|
* Check if the given string starts and ends with the given letter
|
|
22
27
|
*/
|
package/util/text/time.js
CHANGED
|
@@ -13,7 +13,6 @@ function date2string(date = new Date()) {
|
|
|
13
13
|
* Print a number of milliseconds in a human-readable format including correct spacing.
|
|
14
14
|
*/
|
|
15
15
|
function printAsMs(ms, precision = 1) {
|
|
16
|
-
|
|
17
|
-
return `${ms.toFixed(precision)} ms`;
|
|
16
|
+
return `${ms.toFixed(precision)}\u2009ms`;
|
|
18
17
|
}
|
|
19
18
|
//# sourceMappingURL=time.js.map
|
package/util/version.js
CHANGED
|
@@ -41,10 +41,11 @@ const semver_1 = require("semver");
|
|
|
41
41
|
const assert_1 = require("./assert");
|
|
42
42
|
const sigdb_download_1 = require("../project/sigdb/sigdb-download");
|
|
43
43
|
const doc_files_1 = require("../documentation/doc-util/doc-files");
|
|
44
|
+
const strings_1 = require("./text/strings");
|
|
44
45
|
// this is automatically replaced with the current version by release-it
|
|
45
|
-
const version = '2.16.
|
|
46
|
+
const version = '2.16.3';
|
|
46
47
|
// this is automatically replaced with the release date by release-it (scripts/bump-version.ts)
|
|
47
|
-
const versionDate = '2026-10-
|
|
48
|
+
const versionDate = '2026-10-19T07:04:59Z';
|
|
48
49
|
/**
|
|
49
50
|
* Retrieves the current flowR version as a new {@link SemVer} object.
|
|
50
51
|
*/
|
|
@@ -123,7 +124,7 @@ async function printVersionInformation(output, input, engineOnly = false) {
|
|
|
123
124
|
const hint = trace ? ' (faint = did not activate)' : ' (set +repl.showPlugins=true to track activation)';
|
|
124
125
|
pluginLines.push(`${(0, ansi_1.bold)(output.formatter.hyperlink(header, wiki, true), output.formatter)}:${dim(hint)}`);
|
|
125
126
|
for (const [prefix, suffixes] of [...byPrefix].sort((a, b) => a[0].localeCompare(b[0]))) {
|
|
126
|
-
pluginLines.push(` ${(0, ansi_1.bold)(prefix, output.formatter)}:${' '.repeat(labelWidth - prefix.length)} ${[...suffixes].sort(
|
|
127
|
+
pluginLines.push(` ${(0, ansi_1.bold)(prefix, output.formatter)}:${' '.repeat(labelWidth - prefix.length)} ${[...suffixes].sort(strings_1.compareByCodeUnit).map(s => render(`${prefix}:${s}`, s)).join(', ')}`);
|
|
127
128
|
}
|
|
128
129
|
if (!osc8) {
|
|
129
130
|
pluginLines.push(` ${dim('docs: ' + wiki)}`);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
2
|
-
import type { CallGraph } from '../graph/call-graph';
|
|
3
|
-
/**
|
|
4
|
-
* Determines whether the function with the given ID is recursive.
|
|
5
|
-
*/
|
|
6
|
-
export declare function isFunctionRecursive(id: NodeId, graph: CallGraph): boolean;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFunctionRecursive = isFunctionRecursive;
|
|
4
|
-
const vertex_1 = require("../graph/vertex");
|
|
5
|
-
/**
|
|
6
|
-
* Determines whether the function with the given ID is recursive.
|
|
7
|
-
*/
|
|
8
|
-
function isFunctionRecursive(id, graph) {
|
|
9
|
-
const vert = graph.getVertex(id);
|
|
10
|
-
if (!vertex_1.DfgVertex.isFunctionDefinition(vert)) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
const seen = new Set();
|
|
14
|
-
const toVisit = [id];
|
|
15
|
-
let gotStart = 0;
|
|
16
|
-
while (toVisit.length > 0) {
|
|
17
|
-
const currentId = toVisit.pop();
|
|
18
|
-
if (currentId === id && gotStart++ > 0) {
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
if (seen.has(currentId)) {
|
|
22
|
-
continue;
|
|
23
|
-
}
|
|
24
|
-
seen.add(currentId);
|
|
25
|
-
const out = graph.outgoingEdges(currentId)?.keys() ?? [];
|
|
26
|
-
for (const nextId of out) {
|
|
27
|
-
toVisit.push(nextId);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=recursive-function.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { PotentiallyEmptyRArgument } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call';
|
|
2
|
-
import type { RNode } from '../../../../../../r-bridge/lang-4.x/ast/model/model';
|
|
3
|
-
/**
|
|
4
|
-
* Retrieve the value from an argument, if it is not empty.
|
|
5
|
-
* @see {@link unpackArg} - to specifically retrieve non-named arguments
|
|
6
|
-
*/
|
|
7
|
-
export declare function unpackNonameArg<OtherInfo>(arg: PotentiallyEmptyRArgument<OtherInfo> | undefined): RNode<OtherInfo> | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* Retrieve the value from a non-named argument, if it is not empty.
|
|
10
|
-
* @see {@link unpackNonameArg} - to specifically retrieve non-named arguments
|
|
11
|
-
*/
|
|
12
|
-
export declare function unpackArg<OtherInfo>(arg: PotentiallyEmptyRArgument<OtherInfo> | undefined): RNode<OtherInfo> | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Try to unpack the given argument, if it is not empty.
|
|
15
|
-
*/
|
|
16
|
-
export declare function tryUnpackNoNameArg<OtherInfo>(arg: PotentiallyEmptyRArgument<OtherInfo>): RNode<OtherInfo> | PotentiallyEmptyRArgument<OtherInfo>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.unpackNonameArg = unpackNonameArg;
|
|
4
|
-
exports.unpackArg = unpackArg;
|
|
5
|
-
exports.tryUnpackNoNameArg = tryUnpackNoNameArg;
|
|
6
|
-
const r_argument_1 = require("../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
7
|
-
/**
|
|
8
|
-
* Retrieve the value from an argument, if it is not empty.
|
|
9
|
-
* @see {@link unpackArg} - to specifically retrieve non-named arguments
|
|
10
|
-
*/
|
|
11
|
-
function unpackNonameArg(arg) {
|
|
12
|
-
return r_argument_1.RArgument.isEmpty(arg) || arg?.name !== undefined ? undefined : arg?.value;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Retrieve the value from a non-named argument, if it is not empty.
|
|
16
|
-
* @see {@link unpackNonameArg} - to specifically retrieve non-named arguments
|
|
17
|
-
*/
|
|
18
|
-
function unpackArg(arg) {
|
|
19
|
-
return r_argument_1.RArgument.isEmpty(arg) ? undefined : arg?.value;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Try to unpack the given argument, if it is not empty.
|
|
23
|
-
*/
|
|
24
|
-
function tryUnpackNoNameArg(arg) {
|
|
25
|
-
return unpackNonameArg(arg) ?? arg;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=unpack-argument.js.map
|