@eagleoutice/flowr 2.13.10 → 2.13.12
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 +33 -33
- package/dataflow/environments/default-builtin-config.d.ts +11 -4
- package/dataflow/environments/default-builtin-config.js +43 -5
- package/dataflow/environments/environment.js +56 -20
- package/dataflow/environments/resolve-by-name.js +16 -6
- package/dataflow/environments/resolve-helper.d.ts +43 -0
- package/dataflow/environments/resolve-helper.js +47 -0
- package/dataflow/graph/df-helper.d.ts +48 -1
- package/dataflow/graph/df-helper.js +63 -0
- package/dataflow/graph/graph.js +24 -13
- package/documentation/data/faq/faqs.js +1 -1
- package/documentation/data/faq/wiki-faq-store.js +3 -2
- package/documentation/data/server/doc-data-server-messages.js +1 -1
- package/documentation/doc-readme.js +1 -1
- package/documentation/doc-util/doc-files.d.ts +5 -0
- package/documentation/doc-util/doc-files.js +13 -3
- package/documentation/wiki-analyzer.js +10 -10
- package/documentation/wiki-core.js +1 -1
- package/documentation/wiki-dataflow-graph.js +3 -3
- package/documentation/wiki-linting-and-testing.js +13 -13
- package/documentation/wiki-mk/doc-context.d.ts +1 -1
- package/documentation/wiki-mk/doc-context.js +9 -5
- package/documentation/wiki-normalized-ast.js +1 -1
- package/documentation/wiki-overview.js +2 -2
- package/documentation/wiki-query.js +1 -1
- package/documentation/wiki-setup.js +3 -3
- package/linter/linter-rules.d.ts +1 -1
- package/linter/rules/syntactically-valid.d.ts +12 -1
- package/linter/rules/syntactically-valid.js +88 -17
- package/package.json +7 -8
- package/project/context/flowr-analyzer-loading-order-context.d.ts +8 -0
- package/project/context/flowr-analyzer-loading-order-context.js +23 -2
- package/project/sigdb/reader.d.ts +20 -0
- package/project/sigdb/reader.js +93 -10
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +3 -2
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +6 -0
- package/queries/catalog/dependencies-query/link-devices.d.ts +7 -3
- package/queries/catalog/dependencies-query/link-devices.js +56 -10
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -1
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +14 -0
- package/queries/catalog/happens-before-query/happens-before-query-format.js +18 -2
- package/queries/catalog/signature-query/signature-query-executor.js +5 -1
- package/queries/catalog/slice-query-options.d.ts +11 -1
- package/queries/catalog/slice-query-options.js +8 -4
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +4 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +5 -1
- package/r-bridge/lang-4.x/ast/model/model.d.ts +9 -0
- package/r-bridge/lang-4.x/ast/model/model.js +12 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/reconstruct/reconstruct.d.ts +9 -0
- package/reconstruct/reconstruct.js +1 -0
- package/search/flowr-search-filters.d.ts +8 -0
- package/search/flowr-search-filters.js +19 -7
- package/search/search-executor/search-generators.js +7 -2
- package/search/search-executor/search-transformer.js +4 -1
- package/slicing/static/slice-call.js +2 -2
- package/util/collections/bimap.d.ts +21 -1
- package/util/collections/bimap.js +43 -7
- package/util/version.js +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ and [Docker](https://hub.docker.com/r/eagleoutice/flowr).
|
|
|
13
13
|
It offers a wide variety of features, for example:
|
|
14
14
|
|
|
15
15
|
* 📚 **dependency analysis**\
|
|
16
|
-
Given your analysis project, flowR offers a plethora of so-called [queries](https://github.com/flowr-analysis/flowr/wiki/
|
|
16
|
+
Given your analysis project, flowR offers a plethora of so-called [queries](https://github.com/flowr-analysis/flowr/wiki/Query-API) to get more information about your code.
|
|
17
17
|
An important query is the [dependencies query](https://github.com/flowr-analysis/flowr/wiki/%5BQuery%5D-Dependencies), which shows you the library your project needs,
|
|
18
18
|
the data files it reads, the scripts it sources, and the data it outputs.
|
|
19
19
|
Building on it, the [guess dependency versions query](https://github.com/flowr-analysis/flowr/wiki/%5BQuery%5D-Guess-Dependency-Versions) narrows down the version range each
|
|
@@ -32,18 +32,18 @@ It offers a wide variety of features, for example:
|
|
|
32
32
|
</details>
|
|
33
33
|
|
|
34
34
|
* 🐞 **code linting**\
|
|
35
|
-
Analyze your R scripts for common issues and potential bugs (see the [wiki page](https://github.com/flowr-analysis/flowr/wiki/
|
|
35
|
+
Analyze your R scripts for common issues and potential bugs (see the [wiki page](https://github.com/flowr-analysis/flowr/wiki/Linter) for more information on the currently supported linters).
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
<details><summary>Example: Linting code with flowR</summary>
|
|
39
39
|
|
|
40
|
-
To lint your code, you can use the [REPL](https://github.com/flowr-analysis/flowr/wiki/
|
|
40
|
+
To lint your code, you can use the [REPL](https://github.com/flowr-analysis/flowr/wiki/Interface#using-the-repl) or the [Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=code-inspect.vscode-flowr) (see [vscode-flowr#283](https://github.com/flowr-analysis/vscode-flowr/pull/283)).
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
```shell
|
|
45
45
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
46
|
-
flowR repl v2.13.
|
|
46
|
+
flowR repl v2.13.11, R grammar v14 (tree-sitter engine)
|
|
47
47
|
R> :query @linter "read.csv(\"/root/x.txt\")"
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -95,17 +95,17 @@ It offers a wide variety of features, for example:
|
|
|
95
95
|
|
|
96
96
|
_Results (prettified and summarized):_
|
|
97
97
|
|
|
98
|
-
Query: **linter** (
|
|
98
|
+
Query: **linter** (6 ms)\
|
|
99
99
|
╰ **Deprecated Functions** (deprecated-functions): _no findings_\
|
|
100
100
|
╰ **File Path Validity** (file-path-validity):\
|
|
101
101
|
╰ certain:\
|
|
102
102
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
103
|
-
╰ _Metadata_: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 1, processTimeMs:
|
|
103
|
+
╰ _Metadata_: totalReads: 1, totalUnknown: 0, totalWritesBeforeAlways: 0, totalValid: 0, searchTimeMs: 1, processTimeMs: 0\
|
|
104
104
|
╰ **Seeded Randomness** (seeded-randomness): _no findings_\
|
|
105
105
|
╰ **Absolute Paths** (absolute-file-paths):\
|
|
106
106
|
╰ certain:\
|
|
107
107
|
╰ Path `/root/x.txt` at 1.1-23\
|
|
108
|
-
╰ _Metadata_: totalConsidered: 1, totalUnknown: 0, searchTimeMs:
|
|
108
|
+
╰ _Metadata_: totalConsidered: 1, totalUnknown: 0, searchTimeMs: 1, processTimeMs: 0\
|
|
109
109
|
╰ **Unused Definitions** (unused-definitions): _no findings_\
|
|
110
110
|
╰ **Network Functions** (network-functions): _no findings_\
|
|
111
111
|
╰ **Dataframe Access Validation** (dataframe-access-validation): _no findings_\
|
|
@@ -116,11 +116,11 @@ It offers a wide variety of features, for example:
|
|
|
116
116
|
╰ **Roxygen Arguments** (roxygen-arguments): _no findings_\
|
|
117
117
|
╰ **No Leaked Credentials** (no-leaked-credentials): _no findings_\
|
|
118
118
|
╰ **Undefined Symbol** (undefined-symbol): _no findings_\
|
|
119
|
-
_All queries together required ≈
|
|
119
|
+
_All queries together required ≈6 ms (1ms accuracy, total 7 ms)_
|
|
120
120
|
|
|
121
121
|
<details> <summary style="color:gray">Show Detailed Results as Json</summary>
|
|
122
122
|
|
|
123
|
-
The analysis required
|
|
123
|
+
The analysis required _6.6 ms_ (including parsing and normalization and the query) within the generation environment.
|
|
124
124
|
|
|
125
125
|
In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR.
|
|
126
126
|
Please consult the [Interface](https://github.com/flowr-analysis/flowr/wiki/Interface) wiki page for more information on how to get those.
|
|
@@ -161,7 +161,7 @@ It offers a wide variety of features, for example:
|
|
|
161
161
|
"totalWritesBeforeAlways": 0,
|
|
162
162
|
"totalValid": 0,
|
|
163
163
|
"searchTimeMs": 1,
|
|
164
|
-
"processTimeMs":
|
|
164
|
+
"processTimeMs": 0
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
"seeded-randomness": {
|
|
@@ -192,8 +192,8 @@ It offers a wide variety of features, for example:
|
|
|
192
192
|
".meta": {
|
|
193
193
|
"totalConsidered": 1,
|
|
194
194
|
"totalUnknown": 0,
|
|
195
|
-
"searchTimeMs":
|
|
196
|
-
"processTimeMs":
|
|
195
|
+
"searchTimeMs": 1,
|
|
196
|
+
"processTimeMs": 0
|
|
197
197
|
}
|
|
198
198
|
},
|
|
199
199
|
"unused-definitions": {
|
|
@@ -226,7 +226,7 @@ It offers a wide variety of features, for example:
|
|
|
226
226
|
"dead-code": {
|
|
227
227
|
"results": [],
|
|
228
228
|
".meta": {
|
|
229
|
-
"searchTimeMs":
|
|
229
|
+
"searchTimeMs": 1,
|
|
230
230
|
"processTimeMs": 0
|
|
231
231
|
}
|
|
232
232
|
},
|
|
@@ -281,16 +281,16 @@ It offers a wide variety of features, for example:
|
|
|
281
281
|
"subscript": 0
|
|
282
282
|
},
|
|
283
283
|
"searchTimeMs": 0,
|
|
284
|
-
"processTimeMs":
|
|
284
|
+
"processTimeMs": 1
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
},
|
|
288
288
|
".meta": {
|
|
289
|
-
"timing":
|
|
289
|
+
"timing": 6
|
|
290
290
|
}
|
|
291
291
|
},
|
|
292
292
|
".meta": {
|
|
293
|
-
"timing":
|
|
293
|
+
"timing": 6
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
```
|
|
@@ -324,11 +324,11 @@ It offers a wide variety of features, for example:
|
|
|
324
324
|
|
|
325
325
|
|
|
326
326
|
The simplest way to retrieve slices is with flowR's [Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=code-inspect.vscode-flowr).
|
|
327
|
-
However, you can slice using the [REPL](https://github.com/flowr-analysis/flowr/wiki/
|
|
327
|
+
However, you can slice using the [REPL](https://github.com/flowr-analysis/flowr/wiki/Interface#using-the-repl) as well.
|
|
328
328
|
This can help you if you want to reuse specific parts of an existing analysis within another context or if you want to understand
|
|
329
329
|
what is happening in the code.
|
|
330
330
|
|
|
331
|
-
For this, let's have a look at the example file, located at [test/testfiles/example.R](https://github.com/flowr-analysis/flowr/tree/main
|
|
331
|
+
For this, let's have a look at the example file, located at [test/testfiles/example.R](https://github.com/flowr-analysis/flowr/tree/main/test/testfiles/example.R):
|
|
332
332
|
|
|
333
333
|
|
|
334
334
|
```r
|
|
@@ -354,7 +354,7 @@ It offers a wide variety of features, for example:
|
|
|
354
354
|
|
|
355
355
|
```shell
|
|
356
356
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
357
|
-
flowR repl v2.13.
|
|
357
|
+
flowR repl v2.13.11, R grammar v14 (tree-sitter engine)
|
|
358
358
|
R> :query @static-slice (11@sum) file://test/testfiles/example.R
|
|
359
359
|
```
|
|
360
360
|
|
|
@@ -368,7 +368,7 @@ It offers a wide variety of features, for example:
|
|
|
368
368
|
N <- 10
|
|
369
369
|
for(i in 1:(N-1)) sum <- sum + i + w
|
|
370
370
|
sum
|
|
371
|
-
All queries together required ≈
|
|
371
|
+
All queries together required ≈2 ms (1ms accuracy, total 2 ms)
|
|
372
372
|
```
|
|
373
373
|
|
|
374
374
|
|
|
@@ -383,16 +383,16 @@ It offers a wide variety of features, for example:
|
|
|
383
383
|
</details>
|
|
384
384
|
|
|
385
385
|
* 🚀 **fast call-graph, data-, and control-flow graphs**\
|
|
386
|
-
Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">
|
|
386
|
+
Within just [<i><span title="This measurement is automatically fetched from the latest benchmark!">109.6 ms</span></i> (as of Aug 9, 2026)](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark),
|
|
387
387
|
_flowR_ can analyze the data- and control-flow of the average real-world R script. See the [benchmarks](https://flowr-analysis.github.io/flowr/wiki/stats/benchmark) for more information,
|
|
388
|
-
and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/
|
|
388
|
+
and consult the [wiki pages](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) for more details on the [dataflow graphs](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) as well as [call graphs](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph#perspectives-cg).
|
|
389
389
|
|
|
390
390
|
|
|
391
391
|
<details><summary>Example: Generating a dataflow graph with flowR</summary>
|
|
392
392
|
|
|
393
393
|
|
|
394
|
-
You can investigate flowR's analyses using the [REPL](https://github.com/flowr-analysis/flowr/wiki/
|
|
395
|
-
Commands like <span title="Description (Repl Command, starred version): Returns the URL to mermaid.live; Base Command: Get mermaid code for the dataflow graph (aliases: :d*, :df*)">`:dataflow*`</span> allow you to view a [dataflow graph](https://github.com/flowr-analysis/flowr/wiki/
|
|
394
|
+
You can investigate flowR's analyses using the [REPL](https://github.com/flowr-analysis/flowr/wiki/Interface#using-the-repl).
|
|
395
|
+
Commands like <span title="Description (Repl Command, starred version): Returns the URL to mermaid.live; Base Command: Get mermaid code for the dataflow graph (aliases: :d*, :df*)">`:dataflow*`</span> allow you to view a [dataflow graph](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) for a given R script.
|
|
396
396
|
|
|
397
397
|
Let's have a look at the following example:
|
|
398
398
|
|
|
@@ -413,13 +413,13 @@ It offers a wide variety of features, for example:
|
|
|
413
413
|
```
|
|
414
414
|
|
|
415
415
|
|
|
416
|
-
To get the [dataflow graph](https://github.com/flowr-analysis/flowr/wiki/
|
|
416
|
+
To get the [dataflow graph](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph) for this script, you can use the following command:
|
|
417
417
|
|
|
418
418
|
|
|
419
419
|
|
|
420
420
|
```shell
|
|
421
421
|
$ docker run -it --rm eagleoutice/flowr # or npm run flowr
|
|
422
|
-
flowR repl v2.13.
|
|
422
|
+
flowR repl v2.13.11, R grammar v14 (tree-sitter engine)
|
|
423
423
|
R> :dataflow* test/testfiles/example.R
|
|
424
424
|
```
|
|
425
425
|
|
|
@@ -692,7 +692,7 @@ It offers a wide variety of features, for example:
|
|
|
692
692
|
```
|
|
693
693
|
|
|
694
694
|
|
|
695
|
-
(The analysis required
|
|
695
|
+
(The analysis required _1.7 ms_ (including parse and normalize, using the [tree-sitter](https://github.com/flowr-analysis/flowr/wiki/Engines) engine) within the generation environment. No [signature database](https://github.com/flowr-analysis/flowr/wiki/Signature-Database) is mounted for these generated graphs, so `library()` calls attach no package exports; base-R names are still qualified via the generated base-package store (e.g. `acf` as `stats::acf`).)
|
|
696
696
|
|
|
697
697
|
|
|
698
698
|
|
|
@@ -709,7 +709,7 @@ If you want to use flowR and the features it provides, feel free to check out th
|
|
|
709
709
|
- [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=code-inspect.vscode-flowr)/[Positron](https://open-vsx.org/extension/code-inspect/vscode-flowr): provides access to flowR directly in VS Code and Positron (or [vscode.dev](https://vscode.dev/))
|
|
710
710
|
- [RStudio Addin](https://github.com/flowr-analysis/rstudio-addin-flowr): integrates flowR into [RStudio](https://posit.co/downloads/)
|
|
711
711
|
- [R package](https://github.com/flowr-analysis/flowr-r-adapter): use flowR in your R scripts
|
|
712
|
-
- [Docker image](https://hub.docker.com/r/eagleoutice/flowr): run flowR in a container, this also includes [flowR's server](https://github.com/flowr-analysis/flowr/wiki/
|
|
712
|
+
- [Docker image](https://hub.docker.com/r/eagleoutice/flowr): run flowR in a container, this also includes [flowR's server](https://github.com/flowr-analysis/flowr/wiki/Interface#communicating-with-the-server)
|
|
713
713
|
- [NPM package](https://www.npmjs.com/package/@eagleoutice/flowr): include flowR in your TypeScript and JavaScript projects
|
|
714
714
|
|
|
715
715
|
|
|
@@ -718,8 +718,8 @@ If you are already using flowR and want to give feedback, please consider fillin
|
|
|
718
718
|
|
|
719
719
|
## ⭐ Getting Started
|
|
720
720
|
|
|
721
|
-
To get started with _flowR_ and its features, please check out the [Overview](https://github.com/flowr-analysis/flowr/wiki/
|
|
722
|
-
The [Setup](https://github.com/flowr-analysis/flowr/wiki/
|
|
721
|
+
To get started with _flowR_ and its features, please check out the [Overview](https://github.com/flowr-analysis/flowr/wiki/Overview) wiki page.
|
|
722
|
+
The [Setup](https://github.com/flowr-analysis/flowr/wiki/Setup) wiki page explains how you can download and setup _flowR_ on your system.
|
|
723
723
|
With docker 🐳️, the following line should be enough (and drop you directly into the read-eval-print loop):
|
|
724
724
|
|
|
725
725
|
|
|
@@ -747,7 +747,7 @@ If you want to use the same commands:
|
|
|
747
747
|
## 📜 More Information
|
|
748
748
|
|
|
749
749
|
For more details on how to use _flowR_ please refer to the [wiki pages](https://github.com/flowr-analysis/flowr/wiki),
|
|
750
|
-
as well as the deployed [code documentation](https://flowr-analysis.github.io/flowr/
|
|
750
|
+
as well as the deployed [code documentation](https://flowr-analysis.github.io/flowr/doc/).
|
|
751
751
|
To cite flowR, please check out the publications below. To specifically refer to the source code,
|
|
752
752
|
please check out flowR's [Zenodo archive](https://zenodo.org/doi/10.5281/zenodo.13319290).
|
|
753
753
|
|
|
@@ -873,7 +873,7 @@ please check out the following publications (if you find that a paper is missing
|
|
|
873
873
|
|
|
874
874
|
## 🚀 Contributing
|
|
875
875
|
|
|
876
|
-
We welcome every contribution! Please check out the [developer onboarding](https://github.com/flowr-analysis/flowr/wiki/
|
|
876
|
+
We welcome every contribution! Please check out the [developer onboarding](https://github.com/flowr-analysis/flowr/wiki/Onboarding) section in the wiki for all the information you will need.
|
|
877
877
|
|
|
878
878
|
### Contributors
|
|
879
879
|
|
|
@@ -892,6 +892,6 @@ and received an unrestricted gift from [Posit](https://posit.co/), the open-sour
|
|
|
892
892
|
|
|
893
893
|
### Generation Notice
|
|
894
894
|
|
|
895
|
-
Please notice that this file was generated automatically using the file [src/documentation/doc-readme.ts](https://github.com/flowr-analysis/flowr/tree/main
|
|
895
|
+
Please notice that this file was generated automatically using the file [src/documentation/doc-readme.ts](https://github.com/flowr-analysis/flowr/tree/main/src/documentation/doc-readme.ts) as a source.\
|
|
896
896
|
If you want to make changes please edit the source file (the CI will take care of the rest).
|
|
897
897
|
In fact, many files in the [wiki](https://github.com/flowr-analysis/flowr/wiki) are generated, so make sure to check for the source file if you want to make changes.
|
|
@@ -33,6 +33,13 @@ export declare const StackEnvBuiltins: {
|
|
|
33
33
|
readonly '.BaseEnv': StackEnvKind.Base;
|
|
34
34
|
readonly '.BaseNamespaceEnv': StackEnvKind.Base;
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* The package owning each plotting function no base-R package exports; a name listed nowhere stays bare.
|
|
38
|
+
* A built-in without a package answers to any `pkg::name`, which is how `base::ggplot` used to resolve.
|
|
39
|
+
*/
|
|
40
|
+
export declare const PlotFunctionPackages: Readonly<Record<string, readonly string[]>>;
|
|
41
|
+
/** `names` under the package exporting each: base R from the shipped data, the rest from {@link PlotFunctionPackages}. */
|
|
42
|
+
export declare function namespacePlotFunctions(names: readonly string[]): (Identifier | string)[];
|
|
36
43
|
export declare const GgPlotCreate: readonly ["ggplot", "ggplotly", "ggMarginal", "ggcorrplot", "ggseasonplot", "ggdendrogram", "qmap", "qplot", "quickplot", "autoplot", "grid.arrange", "fviz_pca_biplot", "fviz_pca", "fviz_pca_ind", "fviz_pca_var", "fviz_screeplot", "fviz_mca_biplot", "fviz_mca", "fviz_mca_ind", "fviz_mca_var", "fviz_cluster", "fviz_dend", "ggsurvplot"];
|
|
37
44
|
export declare const TinyPlotCrate: readonly ["tinyplot", "plt"];
|
|
38
45
|
export declare const GraphicsPlotCreate: string[];
|
|
@@ -887,7 +894,7 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
887
894
|
readonly assumePrimitive: false;
|
|
888
895
|
}, {
|
|
889
896
|
readonly type: "function";
|
|
890
|
-
readonly names: string[];
|
|
897
|
+
readonly names: (string | Identifier)[];
|
|
891
898
|
readonly processor: BuiltInProcName.Default;
|
|
892
899
|
readonly config: {
|
|
893
900
|
readonly forceArgs: "all";
|
|
@@ -901,7 +908,7 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
901
908
|
readonly assumePrimitive: true;
|
|
902
909
|
}, {
|
|
903
910
|
readonly type: "function";
|
|
904
|
-
readonly names: string[];
|
|
911
|
+
readonly names: (string | Identifier)[];
|
|
905
912
|
readonly processor: BuiltInProcName.Default;
|
|
906
913
|
readonly config: {
|
|
907
914
|
readonly forceArgs: "all";
|
|
@@ -919,7 +926,7 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
919
926
|
readonly assumePrimitive: true;
|
|
920
927
|
}, {
|
|
921
928
|
readonly type: "function";
|
|
922
|
-
readonly names: string[];
|
|
929
|
+
readonly names: (string | Identifier)[];
|
|
923
930
|
readonly processor: BuiltInProcName.Default;
|
|
924
931
|
readonly config: {
|
|
925
932
|
readonly libFn: true;
|
|
@@ -933,7 +940,7 @@ export declare const WrittenBuiltinDefinitions: [{
|
|
|
933
940
|
readonly assumePrimitive: true;
|
|
934
941
|
}, {
|
|
935
942
|
readonly type: "function";
|
|
936
|
-
readonly names: string[];
|
|
943
|
+
readonly names: (string | Identifier)[];
|
|
937
944
|
readonly processor: BuiltInProcName.Default;
|
|
938
945
|
readonly config: {
|
|
939
946
|
readonly libFn: true;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DefaultBuiltinConfig = exports.WrittenBuiltinDefinitions = exports.RGroupGenerics = exports.GgPlotAddons = exports.GraphicsPlotAddons = exports.PlotFunctionsWithAddParam = exports.GgPlotImplicitAddons = exports.TinyPlotAddons = exports.PlotCreate = exports.GraphicsPlotCreate = exports.TinyPlotCrate = exports.GgPlotCreate = exports.StackEnvBuiltins = exports.StackEnvKind = void 0;
|
|
3
|
+
exports.DefaultBuiltinConfig = exports.WrittenBuiltinDefinitions = exports.RGroupGenerics = exports.GgPlotAddons = exports.GraphicsPlotAddons = exports.PlotFunctionsWithAddParam = exports.GgPlotImplicitAddons = exports.TinyPlotAddons = exports.PlotCreate = exports.GraphicsPlotCreate = exports.TinyPlotCrate = exports.GgPlotCreate = exports.PlotFunctionPackages = exports.StackEnvBuiltins = exports.StackEnvKind = void 0;
|
|
4
|
+
exports.namespacePlotFunctions = namespacePlotFunctions;
|
|
4
5
|
exports.getDefaultProcessor = getDefaultProcessor;
|
|
5
6
|
const identify_link_to_last_call_relation_1 = require("../../queries/catalog/call-context-query/identify-link-to-last-call-relation");
|
|
6
7
|
const type_1 = require("../../r-bridge/lang-4.x/ast/model/type");
|
|
@@ -39,6 +40,43 @@ exports.StackEnvBuiltins = {
|
|
|
39
40
|
'.BaseEnv': StackEnvKind.Base,
|
|
40
41
|
'.BaseNamespaceEnv': StackEnvKind.Base
|
|
41
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* The package owning each plotting function no base-R package exports; a name listed nowhere stays bare.
|
|
45
|
+
* A built-in without a package answers to any `pkg::name`, which is how `base::ggplot` used to resolve.
|
|
46
|
+
*/
|
|
47
|
+
exports.PlotFunctionPackages = {
|
|
48
|
+
ggplot2: ['ggplot', 'qplot', 'quickplot', 'autoplot'],
|
|
49
|
+
plotly: ['ggplotly', 'plot_ly'],
|
|
50
|
+
ggExtra: ['ggMarginal'],
|
|
51
|
+
ggcorrplot: ['ggcorrplot'],
|
|
52
|
+
forecast: ['ggseasonplot'],
|
|
53
|
+
ggdendro: ['ggdendrogram'],
|
|
54
|
+
ggmap: ['qmap'],
|
|
55
|
+
gridExtra: ['grid.arrange'],
|
|
56
|
+
factoextra: ['fviz_pca_biplot', 'fviz_pca', 'fviz_pca_ind', 'fviz_pca_var', 'fviz_screeplot',
|
|
57
|
+
'fviz_mca_biplot', 'fviz_mca', 'fviz_mca_ind', 'fviz_mca_var', 'fviz_cluster', 'fviz_dend'],
|
|
58
|
+
survminer: ['ggsurvplot'],
|
|
59
|
+
tinyplot: ['tinyplot', 'plt', 'tinyplot_add', 'plt_add'],
|
|
60
|
+
lattice: ['xyplot', 'bwplot', 'stripplot', 'dotplot', 'histogram', 'splom', 'trellis.device'],
|
|
61
|
+
maps: ['map'],
|
|
62
|
+
leaflet: ['leaflet'],
|
|
63
|
+
tmap: ['tm_shape'],
|
|
64
|
+
pheatmap: ['pheatmap'],
|
|
65
|
+
vioplot: ['vioplot'],
|
|
66
|
+
gplots: ['heatmap.2', 'textplot', 'boxplot2'],
|
|
67
|
+
DHARMa: ['plotSimulatedResiduals'],
|
|
68
|
+
magick: ['image_graph', 'image_draw'],
|
|
69
|
+
ragg: ['agg_png', 'agg_jpeg', 'agg_tiff', 'agg_ppm', 'agg_webp', 'agg_capture'],
|
|
70
|
+
rasterpdf: ['raster_pdf']
|
|
71
|
+
};
|
|
72
|
+
const PlotFunctionOwner = new Map(Object.entries(exports.PlotFunctionPackages).flatMap(([pkg, names]) => names.map(n => [n, pkg])));
|
|
73
|
+
/** `names` under the package exporting each: base R from the shipped data, the rest from {@link PlotFunctionPackages}. */
|
|
74
|
+
function namespacePlotFunctions(names) {
|
|
75
|
+
return names.map(n => {
|
|
76
|
+
const pkg = (0, r_base_packages_1.baseRExportOwner)(n) ?? PlotFunctionOwner.get(n);
|
|
77
|
+
return pkg === undefined ? n : identifier_1.Identifier.make(n, pkg);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
42
80
|
exports.GgPlotCreate = [
|
|
43
81
|
'ggplot', 'ggplotly', 'ggMarginal', 'ggcorrplot', 'ggseasonplot', 'ggdendrogram', 'qmap', 'qplot', 'quickplot', 'autoplot', 'grid.arrange',
|
|
44
82
|
'fviz_pca_biplot', 'fviz_pca', 'fviz_pca_ind', 'fviz_pca_var', 'fviz_screeplot', 'fviz_mca_biplot', 'fviz_mca', 'fviz_mca_ind', 'fviz_mca_var', 'fviz_cluster', 'fviz_dend',
|
|
@@ -491,7 +529,7 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
491
529
|
{ type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['force', 'identity']),
|
|
492
530
|
processor: built_in_proc_name_1.BuiltInProcName.Default, config: { forceArgs: 'all', keepArgumentOut: true, props: built_in_props_1.CallProp.Pure, sig: [['x', built_in_props_1.ArgProp.Alias | built_in_props_1.ArgProp.Forced]] }, assumePrimitive: false },
|
|
493
531
|
// graphics base
|
|
494
|
-
{ type: 'function', names: exports.PlotCreate,
|
|
532
|
+
{ type: 'function', names: namespacePlotFunctions(exports.PlotCreate),
|
|
495
533
|
processor: built_in_proc_name_1.BuiltInProcName.Default,
|
|
496
534
|
config: {
|
|
497
535
|
forceArgs: 'all',
|
|
@@ -509,7 +547,7 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
509
547
|
props: built_in_props_1.CallProp.Graphics
|
|
510
548
|
}, assumePrimitive: true },
|
|
511
549
|
// graphics addons
|
|
512
|
-
{ type: 'function', names: PlotAddons,
|
|
550
|
+
{ type: 'function', names: namespacePlotFunctions(PlotAddons),
|
|
513
551
|
processor: built_in_proc_name_1.BuiltInProcName.Default, config: {
|
|
514
552
|
forceArgs: 'all',
|
|
515
553
|
treatAsFnCall: {
|
|
@@ -539,7 +577,7 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
539
577
|
// plot tags
|
|
540
578
|
{
|
|
541
579
|
type: 'function',
|
|
542
|
-
names: exports.GgPlotAddons,
|
|
580
|
+
names: namespacePlotFunctions(exports.GgPlotAddons),
|
|
543
581
|
processor: built_in_proc_name_1.BuiltInProcName.Default,
|
|
544
582
|
config: {
|
|
545
583
|
libFn: true,
|
|
@@ -553,7 +591,7 @@ exports.WrittenBuiltinDefinitions = [
|
|
|
553
591
|
},
|
|
554
592
|
{
|
|
555
593
|
type: 'function',
|
|
556
|
-
names: exports.TinyPlotAddons,
|
|
594
|
+
names: namespacePlotFunctions(exports.TinyPlotAddons),
|
|
557
595
|
processor: built_in_proc_name_1.BuiltInProcName.Default,
|
|
558
596
|
config: {
|
|
559
597
|
libFn: true,
|
|
@@ -169,9 +169,13 @@ class Environment {
|
|
|
169
169
|
// navigate to parent until either before built-in or matching namespace
|
|
170
170
|
const newEnvironment = this.clone(false);
|
|
171
171
|
let current = newEnvironment;
|
|
172
|
-
|
|
172
|
+
/* the match has to be re-checked after every step: a post-condition on `current.n` would end the loop on
|
|
173
|
+
* the very layer it was looking for, before the body could define anything in it */
|
|
174
|
+
for (;;) {
|
|
173
175
|
if (current.n === ns) {
|
|
174
|
-
|
|
176
|
+
/* every layer walked here is a fresh clone, and `apply` copies the shared memory on write,
|
|
177
|
+
* so this adds to the layer in place -- `define` would clone and the definition would be lost */
|
|
178
|
+
current.apply(identifier_1.Identifier.getName(definition.name), definition);
|
|
175
179
|
return newEnvironment;
|
|
176
180
|
}
|
|
177
181
|
else if (current.parent && !current.parent.builtInEnv) {
|
|
@@ -182,7 +186,7 @@ class Environment {
|
|
|
182
186
|
else {
|
|
183
187
|
break;
|
|
184
188
|
}
|
|
185
|
-
}
|
|
189
|
+
}
|
|
186
190
|
// we did not find the namespace, so we inject a new environment here
|
|
187
191
|
log_1.log.warn(`Defining ${identifier_1.Identifier.getName(definition.name)} in namespace ${ns}, which did not exist yet in the environment chain => create (r should fail or we miss attachment).`);
|
|
188
192
|
const env = new Environment(current.parent);
|
|
@@ -317,24 +321,41 @@ class Environment {
|
|
|
317
321
|
mergePackageBlocks(other) {
|
|
318
322
|
const [thisLayers, thisBase] = splitLibraryLayers(this);
|
|
319
323
|
const [otherLayers, otherBase] = splitLibraryLayers(other);
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
+
/*
|
|
325
|
+
* One block is the other plus the packages attached since (blocks grow at the front), so their union is
|
|
326
|
+
* the longer one and it is already in R's order: the most recently attached package is searched first,
|
|
327
|
+
* `library(a); library(b)` resolves `b` before `a`. This is the overwhelmingly common case, since every
|
|
328
|
+
* statement after a `library` call merges two environments that still hold its layers.
|
|
329
|
+
*/
|
|
330
|
+
const keep = layersEndWith(thisLayers, otherLayers) ? thisLayers
|
|
331
|
+
: layersEndWith(otherLayers, thisLayers) ? otherLayers : undefined;
|
|
332
|
+
if (keep !== undefined) {
|
|
324
333
|
const base = thisBase.append(otherBase);
|
|
325
|
-
if (base === thisBase) {
|
|
334
|
+
if (keep === thisLayers && base === thisBase) {
|
|
326
335
|
return this;
|
|
327
336
|
}
|
|
328
|
-
return relinkLayers(
|
|
337
|
+
return relinkLayers(keep.map(l => l.clone(false)), base);
|
|
329
338
|
}
|
|
330
|
-
|
|
339
|
+
/*
|
|
340
|
+
* Neither block is recognizably an extension of the other, so union them. The longer attach history goes
|
|
341
|
+
* first so its order survives and the other block only contributes what it alone saw: R searches the most
|
|
342
|
+
* recently attached package first, and only the longer block still records that order.
|
|
343
|
+
* Keyed by type and then by name, rather than by a `t:n` string built for every layer of every merge.
|
|
344
|
+
*/
|
|
345
|
+
const order = [];
|
|
331
346
|
const merged = new Map();
|
|
332
|
-
for (const layers of [otherLayers, thisLayers]) {
|
|
347
|
+
for (const layers of thisLayers.length > otherLayers.length ? [thisLayers, otherLayers] : [otherLayers, thisLayers]) {
|
|
333
348
|
for (const layer of layers) {
|
|
334
|
-
|
|
335
|
-
|
|
349
|
+
let byName = merged.get(layer.t);
|
|
350
|
+
if (byName === undefined) {
|
|
351
|
+
byName = new Map();
|
|
352
|
+
merged.set(layer.t, byName);
|
|
353
|
+
}
|
|
354
|
+
const existing = byName.get(layer.n);
|
|
336
355
|
if (existing === undefined) {
|
|
337
|
-
|
|
356
|
+
const cloned = layer.clone(false);
|
|
357
|
+
byName.set(layer.n, cloned);
|
|
358
|
+
order.push(cloned);
|
|
338
359
|
}
|
|
339
360
|
else if (existing.memory !== layer.memory) {
|
|
340
361
|
for (const [name, value] of layer.memory) {
|
|
@@ -346,7 +367,7 @@ class Environment {
|
|
|
346
367
|
}
|
|
347
368
|
}
|
|
348
369
|
}
|
|
349
|
-
return relinkLayers(
|
|
370
|
+
return relinkLayers(order, thisBase.append(otherBase));
|
|
350
371
|
}
|
|
351
372
|
remove(id) {
|
|
352
373
|
if (this.builtInEnv) {
|
|
@@ -496,12 +517,27 @@ exports.REnvironment = {
|
|
|
496
517
|
attachedPackages: attachedPackagesOf,
|
|
497
518
|
};
|
|
498
519
|
/**
|
|
499
|
-
* Whether
|
|
500
|
-
*
|
|
501
|
-
*
|
|
520
|
+
* Whether the package block `layers` ends with `tail`, i.e. `tail` is `layers` without some of the attachments
|
|
521
|
+
* made since. A block grows at the front ({@link attachPackageAt} inserts at `search()` position 2), so this is
|
|
522
|
+
* the shape two branches take when one of them attached more packages than the other. Equal blocks qualify.
|
|
523
|
+
*
|
|
524
|
+
* Frames cloned from one another keep the same {@link Environment#memory} map until one of them is written to
|
|
525
|
+
* (see {@link Environment#clone}), so comparing the maps by identity recognizes untouched blocks without
|
|
526
|
+
* scanning them; blocks that only happen to hold equal definitions are treated as different, which merely costs
|
|
527
|
+
* the general union below.
|
|
502
528
|
*/
|
|
503
|
-
function
|
|
504
|
-
|
|
529
|
+
function layersEndWith(layers, tail) {
|
|
530
|
+
const offset = layers.length - tail.length;
|
|
531
|
+
if (offset < 0) {
|
|
532
|
+
return false;
|
|
533
|
+
}
|
|
534
|
+
for (let i = 0; i < tail.length; i++) {
|
|
535
|
+
const l = layers[offset + i], t = tail[i];
|
|
536
|
+
if (l !== t && (l.t !== t.t || l.n !== t.n || l.memory !== t.memory)) {
|
|
537
|
+
return false;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
return true;
|
|
505
541
|
}
|
|
506
542
|
/** Stacks `layers` (top first) on top of `base`, returning the new top of the chain. The layers must not be shared. */
|
|
507
543
|
function relinkLayers(layers, base) {
|
|
@@ -20,6 +20,8 @@ const VariableTargetTypes = identifier_1.ReferenceType.Variable | identifier_1.R
|
|
|
20
20
|
const ConstantTargetTypes = identifier_1.ReferenceType.Constant | identifier_1.ReferenceType.BuiltInConstant | identifier_1.ReferenceType.Unknown;
|
|
21
21
|
const BuiltInConstantTargetTypes = identifier_1.ReferenceType.BuiltInConstant | identifier_1.ReferenceType.Unknown;
|
|
22
22
|
const BuiltInFunctionTargetTypes = identifier_1.ReferenceType.BuiltInFunction | identifier_1.ReferenceType.Unknown;
|
|
23
|
+
const inEveryBranch = (d) => (0, info_1.happensInEveryBranch)(d.cds);
|
|
24
|
+
const notAParameter = (d) => d.type !== identifier_1.ReferenceType.Parameter;
|
|
23
25
|
const TargetTypePredicate = {
|
|
24
26
|
[identifier_1.ReferenceType.Unknown]: () => true,
|
|
25
27
|
[identifier_1.ReferenceType.Function]: ({ type }) => (0, identifier_1.isReferenceType)(type, FunctionTargetTypes),
|
|
@@ -45,7 +47,10 @@ function resolveByName(id, environment, target) {
|
|
|
45
47
|
if (target === identifier_1.ReferenceType.Unknown) {
|
|
46
48
|
return resolveByNameAnyType(id, environment);
|
|
47
49
|
}
|
|
48
|
-
|
|
50
|
+
/* read piecewise, `Identifier.toArray` would allocate a tuple per resolution */
|
|
51
|
+
const name = identifier_1.Identifier.getName(id);
|
|
52
|
+
const ns = identifier_1.Identifier.getNamespace(id);
|
|
53
|
+
const internal = identifier_1.Identifier.accessesInternal(id);
|
|
49
54
|
let current = environment.current;
|
|
50
55
|
/* `current` can already be the built-in environment itself (e.g. `get(x, envir=baseenv())`);
|
|
51
56
|
* it has no parent to walk to, so resolve directly instead of entering the loop below. */
|
|
@@ -75,11 +80,14 @@ function resolveByName(id, environment, target) {
|
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
if (definition !== undefined && definition.length > 0) {
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
/* ask before filtering: the common case wants all of them and needs no copy */
|
|
84
|
+
const allWanted = definition.every(wantedType);
|
|
85
|
+
if (allWanted && (target !== identifier_1.ReferenceType.Function || definition.every(notAParameter)) && definition.every(inEveryBranch)) {
|
|
80
86
|
return definition;
|
|
81
87
|
}
|
|
82
|
-
|
|
88
|
+
/* never alias the environment's own array, it is appended to below */
|
|
89
|
+
const filtered = allWanted ? definition.slice() : definition.filter(wantedType);
|
|
90
|
+
if (filtered.length > 0) {
|
|
83
91
|
if (definitions) {
|
|
84
92
|
definitions.push(...filtered);
|
|
85
93
|
}
|
|
@@ -111,7 +119,9 @@ function resolveByNameAnyType(id, environment) {
|
|
|
111
119
|
return g;
|
|
112
120
|
}
|
|
113
121
|
}
|
|
114
|
-
const
|
|
122
|
+
const name = identifier_1.Identifier.getName(id);
|
|
123
|
+
const ns = identifier_1.Identifier.getNamespace(id);
|
|
124
|
+
const internal = identifier_1.Identifier.accessesInternal(id);
|
|
115
125
|
/* `current` can already be the built-in environment itself */
|
|
116
126
|
if (current.builtInEnv) {
|
|
117
127
|
const ret = current.memory.get(name);
|
|
@@ -132,7 +142,7 @@ function resolveByNameAnyType(id, environment) {
|
|
|
132
142
|
if (internal === false) {
|
|
133
143
|
definition = definition.filter(({ name }) => name === undefined || !identifier_1.Identifier.accessesInternal(name));
|
|
134
144
|
}
|
|
135
|
-
if (definition.every(
|
|
145
|
+
if (definition.every(inEveryBranch)) {
|
|
136
146
|
if (cacheable) {
|
|
137
147
|
environment.current.cache ??= new Map();
|
|
138
148
|
environment.current.cache.set(id, definition);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { resolveByName, resolveByNameAnyType, resolvesToBuiltInConstant } from './resolve-by-name';
|
|
2
|
+
import { resolveIdToValue, resolveIdToSingleString, resolveToConstants } from '../eval/resolve/alias-tracking';
|
|
3
|
+
import { resolveIdToArgName, resolveIdToArgStringVector, resolveIdToArgValue, resolveIdToArgValueSymbolName, resolveIdToArgVectorLength } from '../../abstract-interpretation/data-frame/resolve-args';
|
|
4
|
+
/**
|
|
5
|
+
* The helper object for resolution: from a name to the definitions it may refer to, and from a node to the
|
|
6
|
+
* value(s) it may hold. Reachable as {@link Dataflow.resolve} as well.
|
|
7
|
+
*
|
|
8
|
+
* Take the narrowest entry point that answers your question, they differ a lot in cost:
|
|
9
|
+
*
|
|
10
|
+
* - {@link Resolve.byName} walks the environment layers once and answers repeat questions from the layer's own
|
|
11
|
+
* lookup cache. Use it whenever the {@link ReferenceType} does not matter.
|
|
12
|
+
* - {@link Resolve.byNameAndType} additionally filters and merges the definitions of every layer it passes.
|
|
13
|
+
* Given the unknown reference type it only forwards to {@link Resolve.byName}, so ask that one directly instead.
|
|
14
|
+
* - {@link Resolve.toValue} and the {@link Resolve.argument} family run the evaluator on top of a resolution.
|
|
15
|
+
*/
|
|
16
|
+
export declare const Resolve: {
|
|
17
|
+
readonly name: "Resolve";
|
|
18
|
+
/** Every definition the identifier may refer to, whatever its type. */
|
|
19
|
+
readonly byName: typeof resolveByNameAnyType;
|
|
20
|
+
/** The definitions the identifier may refer to that fit the wanted {@link ReferenceType}. */
|
|
21
|
+
readonly byNameAndType: typeof resolveByName;
|
|
22
|
+
/** Whether the name always, never, or maybe refers to a built-in constant of the given value. */
|
|
23
|
+
readonly toBuiltIn: typeof resolvesToBuiltInConstant;
|
|
24
|
+
/** The constant values the name resolves to. */
|
|
25
|
+
readonly toConstants: typeof resolveToConstants;
|
|
26
|
+
/** The value(s) the node may hold, tracking aliases as the configuration allows. */
|
|
27
|
+
readonly toValue: typeof resolveIdToValue;
|
|
28
|
+
/** The single string the node resolves to, or `undefined` if it is not exactly one. */
|
|
29
|
+
readonly toSingleString: typeof resolveIdToSingleString;
|
|
30
|
+
/** The same, for the arguments of a call. */
|
|
31
|
+
readonly argument: {
|
|
32
|
+
/** The argument's name. */
|
|
33
|
+
readonly name: typeof resolveIdToArgName;
|
|
34
|
+
/** The argument's value. */
|
|
35
|
+
readonly value: typeof resolveIdToArgValue;
|
|
36
|
+
/** The argument's value as a vector of strings. */
|
|
37
|
+
readonly stringVector: typeof resolveIdToArgStringVector;
|
|
38
|
+
/** The argument's value as the name of the symbol it holds. */
|
|
39
|
+
readonly symbolName: typeof resolveIdToArgValueSymbolName;
|
|
40
|
+
/** The length of the vector the argument holds. */
|
|
41
|
+
readonly vectorLength: typeof resolveIdToArgVectorLength;
|
|
42
|
+
};
|
|
43
|
+
};
|