@eagleoutice/flowr 2.10.8 → 2.10.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/README.md +106 -36
  2. package/abstract-interpretation/absint-visitor.js +6 -3
  3. package/abstract-interpretation/domains/abstract-domain.d.ts +1 -1
  4. package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -1
  5. package/abstract-interpretation/domains/bounded-set-domain.js +1 -1
  6. package/abstract-interpretation/domains/interval-domain.d.ts +1 -1
  7. package/abstract-interpretation/domains/interval-domain.js +1 -1
  8. package/abstract-interpretation/domains/lattice.d.ts +1 -1
  9. package/abstract-interpretation/domains/partial-product-domain.d.ts +1 -1
  10. package/abstract-interpretation/domains/partial-product-domain.js +2 -2
  11. package/abstract-interpretation/domains/set-range-domain.d.ts +1 -1
  12. package/abstract-interpretation/domains/set-range-domain.js +1 -1
  13. package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +1 -1
  14. package/abstract-interpretation/domains/set-upper-bound-domain.js +1 -1
  15. package/abstract-interpretation/domains/singleton-domain.d.ts +1 -1
  16. package/abstract-interpretation/domains/singleton-domain.js +1 -1
  17. package/abstract-interpretation/domains/state-abstract-domain.d.ts +1 -1
  18. package/abstract-interpretation/domains/state-abstract-domain.js +2 -2
  19. package/abstract-interpretation/unsupported-functions.d.ts +3 -2
  20. package/abstract-interpretation/unsupported-functions.js +38 -28
  21. package/cli/benchmark-app.js +2 -1
  22. package/cli/common/script.js +3 -2
  23. package/cli/flowr.js +47 -10
  24. package/cli/repl/commands/repl-cfg.js +9 -9
  25. package/cli/repl/commands/repl-commands.js +5 -0
  26. package/cli/repl/commands/repl-dataflow.js +31 -24
  27. package/cli/repl/commands/repl-main.d.ts +6 -0
  28. package/cli/repl/commands/repl-normalize.js +15 -12
  29. package/cli/repl/commands/repl-parse.js +1 -1
  30. package/cli/repl/commands/repl-query.js +4 -5
  31. package/cli/repl/commands/repl-quit.js +2 -1
  32. package/cli/repl/core.d.ts +11 -0
  33. package/cli/repl/core.js +101 -3
  34. package/cli/repl/execute.js +3 -2
  35. package/cli/repl/parser/slice-query-parser.d.ts +16 -0
  36. package/cli/repl/parser/slice-query-parser.js +52 -0
  37. package/cli/repl/server/connection.d.ts +1 -0
  38. package/cli/repl/server/connection.js +25 -0
  39. package/cli/repl/server/messages/message-analysis.d.ts +10 -0
  40. package/cli/repl/server/messages/message-analysis.js +6 -2
  41. package/cli/repl/server/messages/message-slice.d.ts +1 -1
  42. package/cli/script-core/statistics-core.js +2 -1
  43. package/cli/script-core/statistics-helper-core.js +2 -1
  44. package/cli/wiki.d.ts +2 -1
  45. package/cli/wiki.js +4 -1
  46. package/config.d.ts +9 -0
  47. package/config.js +23 -1
  48. package/control-flow/diff-cfg.d.ts +1 -1
  49. package/control-flow/diff-cfg.js +1 -1
  50. package/control-flow/extract-cfg.js +9 -3
  51. package/control-flow/semantic-cfg-guided-visitor.js +1 -0
  52. package/control-flow/simple-visitor.js +6 -5
  53. package/control-flow/useless-loop.js +2 -2
  54. package/core/print/dataflow-printer.d.ts +2 -2
  55. package/core/print/dataflow-printer.js +2 -2
  56. package/core/steps/all/static-slicing/00-slice.js +1 -1
  57. package/core/steps/pipeline/default-pipelines.d.ts +146 -146
  58. package/dataflow/environments/append.d.ts +2 -1
  59. package/dataflow/environments/append.js +2 -1
  60. package/dataflow/environments/built-in-proc-name.d.ts +2 -0
  61. package/dataflow/environments/built-in-proc-name.js +2 -0
  62. package/dataflow/environments/built-in.d.ts +2 -0
  63. package/dataflow/environments/built-in.js +2 -0
  64. package/dataflow/environments/default-builtin-config.d.ts +122 -66
  65. package/dataflow/environments/default-builtin-config.js +324 -145
  66. package/dataflow/environments/environment.d.ts +2 -1
  67. package/dataflow/environments/environment.js +13 -9
  68. package/dataflow/environments/identifier.d.ts +55 -2
  69. package/dataflow/environments/identifier.js +14 -2
  70. package/dataflow/environments/reference-to-maybe.d.ts +2 -0
  71. package/dataflow/environments/reference-to-maybe.js +56 -11
  72. package/dataflow/environments/resolve-by-name.js +13 -7
  73. package/dataflow/eval/values/general.js +4 -0
  74. package/dataflow/extractor.js +22 -3
  75. package/dataflow/graph/df-helper.d.ts +6 -0
  76. package/dataflow/graph/df-helper.js +33 -0
  77. package/dataflow/graph/graph.js +7 -3
  78. package/dataflow/info.d.ts +1 -1
  79. package/dataflow/info.js +3 -1
  80. package/dataflow/internal/linker.d.ts +5 -1
  81. package/dataflow/internal/linker.js +34 -9
  82. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +3 -1
  83. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
  84. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +53 -0
  85. package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.d.ts +13 -0
  86. package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.js +58 -0
  87. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +1 -1
  88. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
  89. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +38 -14
  90. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +19 -0
  91. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +1 -1
  92. package/dataflow/internal/process/functions/call/known-call-handling.js +4 -3
  93. package/dataflow/internal/process/functions/call/named-call-handling.js +6 -0
  94. package/dataflow/origin/dfg-get-origin.d.ts +1 -1
  95. package/dataflow/origin/dfg-get-origin.js +1 -1
  96. package/dataflow/processor.d.ts +6 -0
  97. package/documentation/data/faq/faqs.d.ts +2 -1
  98. package/documentation/data/faq/faqs.js +75 -57
  99. package/documentation/data/server/doc-data-server-messages.d.ts +2 -1
  100. package/documentation/data/server/doc-data-server-messages.js +15 -7
  101. package/documentation/doc-readme.js +15 -15
  102. package/documentation/doc-util/doc-cfg.d.ts +3 -1
  103. package/documentation/doc-util/doc-cfg.js +3 -3
  104. package/documentation/doc-util/doc-dfg.d.ts +3 -1
  105. package/documentation/doc-util/doc-dfg.js +3 -3
  106. package/documentation/doc-util/doc-files.d.ts +3 -1
  107. package/documentation/doc-util/doc-files.js +9 -6
  108. package/documentation/doc-util/doc-normalized-ast.d.ts +3 -1
  109. package/documentation/doc-util/doc-normalized-ast.js +2 -2
  110. package/documentation/doc-util/doc-query.d.ts +2 -1
  111. package/documentation/doc-util/doc-query.js +2 -2
  112. package/documentation/doc-util/doc-repl.js +1 -0
  113. package/documentation/doc-util/doc-types.d.ts +6 -6
  114. package/documentation/doc-util/doc-types.js +11 -9
  115. package/documentation/issue-linting-rule.js +1 -2
  116. package/documentation/wiki-analyzer.js +9 -9
  117. package/documentation/wiki-cfg.js +40 -41
  118. package/documentation/wiki-core.js +119 -31
  119. package/documentation/wiki-create-linting-rules.d.ts +6 -0
  120. package/documentation/wiki-create-linting-rules.js +95 -0
  121. package/documentation/wiki-dataflow-graph.js +77 -76
  122. package/documentation/wiki-engine.js +1 -2
  123. package/documentation/wiki-faq.d.ts +2 -1
  124. package/documentation/wiki-faq.js +4 -4
  125. package/documentation/wiki-interface.js +19 -6
  126. package/documentation/wiki-linter.d.ts +1 -1
  127. package/documentation/wiki-linter.js +14 -6
  128. package/documentation/wiki-linting-and-testing.js +2 -2
  129. package/documentation/wiki-mk/doc-context.d.ts +3 -3
  130. package/documentation/wiki-mk/doc-maker.d.ts +2 -0
  131. package/documentation/wiki-mk/doc-maker.js +7 -1
  132. package/documentation/wiki-normalized-ast.js +5 -5
  133. package/documentation/wiki-onboarding.d.ts +2 -1
  134. package/documentation/wiki-onboarding.js +5 -5
  135. package/documentation/wiki-overview.js +3 -3
  136. package/documentation/wiki-query.js +85 -84
  137. package/documentation/wiki-search.js +4 -5
  138. package/documentation/wiki-setup.js +6 -7
  139. package/gas.d.ts +74 -0
  140. package/gas.js +18 -0
  141. package/linter/linter-executor.js +2 -8
  142. package/linter/linter-format.d.ts +4 -11
  143. package/linter/linter-rules.d.ts +88 -86
  144. package/linter/linter-rules.js +7 -1
  145. package/linter/rules/absolute-path.d.ts +2 -7
  146. package/linter/rules/absolute-path.js +6 -4
  147. package/linter/rules/dataframe-access-validation.d.ts +1 -6
  148. package/linter/rules/dataframe-access-validation.js +8 -6
  149. package/linter/rules/dead-code.d.ts +2 -11
  150. package/linter/rules/dead-code.js +16 -11
  151. package/linter/rules/deprecated-functions.d.ts +3 -3
  152. package/linter/rules/file-path-validity.d.ts +1 -6
  153. package/linter/rules/file-path-validity.js +5 -5
  154. package/linter/rules/function-finder-util.d.ts +7 -11
  155. package/linter/rules/function-finder-util.js +9 -6
  156. package/linter/rules/naming-convention.d.ts +2 -7
  157. package/linter/rules/naming-convention.js +3 -2
  158. package/linter/rules/network-functions.d.ts +2 -7
  159. package/linter/rules/network-functions.js +14 -12
  160. package/linter/rules/no-leaked-credentials.d.ts +36 -0
  161. package/linter/rules/no-leaked-credentials.js +75 -0
  162. package/linter/rules/problematic-inputs.d.ts +1 -8
  163. package/linter/rules/problematic-inputs.js +5 -4
  164. package/linter/rules/roxygen-arguments.d.ts +2 -7
  165. package/linter/rules/roxygen-arguments.js +13 -20
  166. package/linter/rules/seeded-randomness.d.ts +2 -7
  167. package/linter/rules/seeded-randomness.js +7 -4
  168. package/linter/rules/software-has-license.d.ts +31 -0
  169. package/linter/rules/software-has-license.js +46 -0
  170. package/linter/rules/software-has-tests.d.ts +38 -0
  171. package/linter/rules/software-has-tests.js +48 -0
  172. package/linter/rules/stop-with-call-arg.d.ts +2 -7
  173. package/linter/rules/stop-with-call-arg.js +3 -2
  174. package/linter/rules/unused-definition.d.ts +3 -8
  175. package/linter/rules/unused-definition.js +7 -5
  176. package/linter/rules/useless-loop.d.ts +2 -7
  177. package/linter/rules/useless-loop.js +5 -2
  178. package/package.json +3 -2
  179. package/project/context/flowr-analyzer-context.d.ts +13 -14
  180. package/project/context/flowr-analyzer-context.js +4 -0
  181. package/project/context/flowr-analyzer-files-context.d.ts +12 -0
  182. package/project/context/flowr-analyzer-files-context.js +12 -2
  183. package/project/context/flowr-analyzer-gas-context.d.ts +28 -0
  184. package/project/context/flowr-analyzer-gas-context.js +101 -0
  185. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +13 -7
  186. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +56 -11
  187. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +1 -1
  188. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +2 -2
  189. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +2 -1
  190. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +5 -5
  191. package/project/plugins/flowr-analyzer-plugin.d.ts +15 -8
  192. package/project/plugins/flowr-analyzer-plugin.js +14 -7
  193. package/project/plugins/gas-plugins/flowr-analyzer-gas-plugin.d.ts +19 -0
  194. package/project/plugins/gas-plugins/flowr-analyzer-gas-plugin.js +35 -0
  195. package/project/plugins/plugin-registry.d.ts +2 -1
  196. package/project/plugins/plugin-registry.js +3 -1
  197. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +22 -0
  198. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +47 -0
  199. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +1 -1
  200. package/queries/catalog/call-context-query/call-context-query-executor.js +54 -8
  201. package/queries/catalog/call-context-query/call-context-query-format.d.ts +2 -2
  202. package/queries/catalog/dependencies-query/function-info/test-functions.d.ts +2 -0
  203. package/queries/catalog/dependencies-query/function-info/test-functions.js +18 -177
  204. package/queries/catalog/df-shape-query/df-shape-query-format.js +1 -1
  205. package/queries/catalog/dice-query/dice-query-executor.d.ts +8 -0
  206. package/queries/catalog/dice-query/dice-query-executor.js +52 -0
  207. package/queries/catalog/dice-query/dice-query-format.d.ts +53 -0
  208. package/queries/catalog/dice-query/dice-query-format.js +102 -0
  209. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -2
  210. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
  211. package/queries/catalog/input-sources-query/input-sources-query-format.js +1 -0
  212. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
  213. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +1 -0
  214. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
  215. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +1 -0
  216. package/queries/catalog/linter-query/linter-query-executor.js +7 -0
  217. package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
  218. package/queries/catalog/location-map-query/location-map-query-format.js +1 -0
  219. package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
  220. package/queries/catalog/origin-query/origin-query-format.js +1 -0
  221. package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
  222. package/queries/catalog/provenance-query/provenance-query-format.js +1 -0
  223. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
  224. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -0
  225. package/queries/catalog/static-slice-query/static-slice-query-executor.js +1 -1
  226. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +2 -0
  227. package/queries/catalog/static-slice-query/static-slice-query-format.js +1 -0
  228. package/queries/query.d.ts +18 -1
  229. package/queries/query.js +3 -1
  230. package/r-bridge/data/data.d.ts +5 -0
  231. package/r-bridge/data/data.js +6 -0
  232. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +0 -1
  233. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +10 -1
  234. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.d.ts +1 -1
  235. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +1 -1
  236. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.d.ts +1 -1
  237. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.js +1 -1
  238. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +63 -44
  239. package/r-bridge/parser.js +2 -9
  240. package/r-bridge/shell.d.ts +8 -1
  241. package/r-bridge/shell.js +26 -7
  242. package/search/flowr-search-builder.d.ts +2 -2
  243. package/search/flowr-search-builder.js +1 -1
  244. package/search/flowr-search-filters.d.ts +30 -9
  245. package/search/flowr-search-filters.js +26 -21
  246. package/search/search-executor/search-enrichers.d.ts +600 -0
  247. package/search/search-executor/search-enrichers.js +23 -2
  248. package/slicing/static/static-slicer.d.ts +39 -11
  249. package/slicing/static/static-slicer.js +44 -14
  250. package/util/collections/queue.d.ts +16 -0
  251. package/util/collections/queue.js +38 -0
  252. package/util/log.d.ts +1 -1
  253. package/util/log.js +1 -1
  254. package/util/mermaid/dfg.d.ts +2 -2
  255. package/util/mermaid/dfg.js +2 -2
  256. package/util/objects.d.ts +9 -0
  257. package/util/objects.js +57 -1
  258. package/util/proc.d.ts +6 -0
  259. package/util/proc.js +20 -0
  260. package/util/version.js +1 -1
@@ -143,14 +143,14 @@ class DocReadme extends doc_maker_1.DocMaker {
143
143
  [![DOI](https://zenodo.org/badge/624819038.svg)](https://zenodo.org/doi/10.5281/zenodo.13319290)
144
144
 
145
145
  _flowR_ is a sophisticated, static [dataflow analyzer](https://en.wikipedia.org/wiki/Data-flow_analysis) for the [R programming language](https://www.r-project.org/),
146
- available for [VSCode](${doc_files_1.FlowrVsCode}), [Positron](${doc_files_1.FlowrPositron}), [RStudio](${doc_files_1.FlowrGithubBaseRef}/rstudio-addin-flowr),
147
- and [Docker](${doc_files_1.FlowrDockerRef}).
146
+ available for ${ctx.linkPage('flowr:vscode', 'VSCode')}, ${ctx.linkPage('flowr:positron', 'Positron')}, ${ctx.linkPage('flowr:rstudio-addin', 'RStudio')},
147
+ and ${ctx.linkPage('flowr:docker', 'Docker')}.
148
148
  It offers a wide variety of features, for example:
149
149
 
150
150
  * 🐞 **code linting**\\
151
- Analyze your R scripts for common issues and potential bugs (see the [wiki page](${doc_files_1.FlowrGithubBaseRef}/flowr/wiki/Linter) for more information on the currently supported linters).
151
+ Analyze your R scripts for common issues and potential bugs (see the ${ctx.linkPage('wiki/Linter', 'wiki page')} for more information on the currently supported linters).
152
152
 
153
- ${(0, doc_general_1.prefixLines)((0, doc_structure_1.details)('Example: Linting code with flowR', `To lint your code, you can use the [REPL](${doc_files_1.FlowrWikiBaseRef}/Interface#using-the-repl) or the [Visual Studio Code extension](${doc_files_1.FlowrVsCode}) (see [vscode-flowr#283](https://github.com/flowr-analysis/vscode-flowr/pull/283)).
153
+ ${(0, doc_general_1.prefixLines)((0, doc_structure_1.details)('Example: Linting code with flowR', `To lint your code, you can use the ${ctx.linkPage('wiki/Interface', 'REPL', 'using-the-repl')} or the ${ctx.linkPage('flowr:vscode', 'Visual Studio Code extension')} (see [vscode-flowr#283](https://github.com/flowr-analysis/vscode-flowr/pull/283)).
154
154
 
155
155
  ${await (async () => {
156
156
  const code = 'read.csv("/root/x.txt")';
@@ -174,8 +174,8 @@ ${res}
174
174
  for the computation of the point of interest.
175
175
 
176
176
  ${(0, doc_general_1.prefixLines)((0, doc_structure_1.details)('Example: Slicing with flowR', `
177
- The simplest way to retrieve slices is with flowR's [Visual Studio Code extension](${doc_files_1.FlowrVsCode}).
178
- However, you can slice using the [REPL](${doc_files_1.FlowrWikiBaseRef}/Interface#using-the-repl) as well.
177
+ The simplest way to retrieve slices is with flowR's ${ctx.linkPage('flowr:vscode', 'Visual Studio Code extension')}.
178
+ However, you can slice using the ${ctx.linkPage('wiki/Interface', 'REPL', 'using-the-repl')} as well.
179
179
  This can help you if you want to reuse specific parts of an existing analysis within another context or if you want to understand
180
180
  what is happening in the code.
181
181
 
@@ -195,11 +195,11 @@ ${await (0, doc_repl_1.documentReplSession)(treeSitter, [{
195
195
 
196
196
  * 📚 **dependency analysis**\\
197
197
  Given your analysis project, flowR offers a plethora of so-called ${ctx.linkPage('wiki/Query API', 'queries')} to get more information about your code.
198
- An important query is the [dependencies query](${doc_files_1.FlowrWikiBaseRef}/Query-API#dependencies-query), which shows you the library your project needs,
198
+ An important query is the ${ctx.linkPage('wiki/Query API', 'dependencies query', 'dependencies-query')}, which shows you the library your project needs,
199
199
  the data files it reads, the scripts it sources, and the data it outputs.
200
200
 
201
201
  ${(0, doc_general_1.prefixLines)((0, doc_structure_1.details)('Example: Dependency Analysis with flowR', `
202
- The following showcases the dependency view of the [Visual Studio Code extension](${doc_files_1.FlowrVsCode}):
202
+ The following showcases the dependency view of the ${ctx.linkPage('flowr:vscode', 'Visual Studio Code extension')}:
203
203
 
204
204
  ![Dependency Analysis](https://raw.githubusercontent.com/flowr-analysis/vscode-flowr/refs/heads/main/media/dependencies.png)
205
205
 
@@ -211,7 +211,7 @@ The following showcases the dependency view of the [Visual Studio Code extension
211
211
  and consult the ${ctx.linkPage('wiki/Dataflow Graph', 'wiki pages')} for more details on the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graphs')} as well as ${ctx.linkPage('wiki/Dataflow Graph', 'call graphs', 'perspectives-cg')}.
212
212
 
213
213
  ${(0, doc_general_1.prefixLines)((0, doc_structure_1.details)('Example: Generating a dataflow graph with flowR', `
214
- You can investigate flowR's analyses using the [REPL](${doc_files_1.FlowrWikiBaseRef}/Interface#using-the-repl).
214
+ You can investigate flowR's analyses using the ${ctx.linkPage('wiki/Interface', 'REPL', 'using-the-repl')}.
215
215
  Commands like ${(0, doc_cli_option_1.getReplCommand)('dataflow*')} allow you to view a ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')} for a given R script.
216
216
 
217
217
  Let's have a look at the following example:
@@ -231,11 +231,11 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(treeSitter, (0, doc_files_1.getFileCo
231
231
 
232
232
  If you want to use flowR and the features it provides, feel free to check out the:
233
233
 
234
- - [Visual Studio Code](${doc_files_1.FlowrVsCode})/[Positron](${doc_files_1.FlowrPositron}): provides access to flowR directly in VS Code and Positron (or [vscode.dev](https://vscode.dev/))
235
- - [RStudio Addin](${doc_files_1.FlowrGithubBaseRef}/rstudio-addin-flowr): integrates flowR into [RStudio](https://posit.co/downloads/)
236
- - [R package](${doc_files_1.FlowrGithubBaseRef}/flowr-r-adapter): use flowR in your R scripts
237
- - [Docker image](${doc_files_1.FlowrDockerRef}): run flowR in a container, this also includes [flowR's server](${doc_files_1.FlowrWikiBaseRef}/Interface#communicating-with-the-server)
238
- - [NPM package](${doc_files_1.FlowrNpmRef}): include flowR in your TypeScript and JavaScript projects
234
+ - ${ctx.linkPage('flowr:vscode', 'Visual Studio Code')}/${ctx.linkPage('flowr:positron', 'Positron')}: provides access to flowR directly in VS Code and Positron (or [vscode.dev](https://vscode.dev/))
235
+ - ${ctx.linkPage('flowr:rstudio-addin', 'RStudio Addin')}: integrates flowR into [RStudio](https://posit.co/downloads/)
236
+ - ${ctx.linkPage('flowr:radapter', 'R package')}: use flowR in your R scripts
237
+ - ${ctx.linkPage('flowr:docker', 'Docker image')}: run flowR in a container, this also includes ${ctx.linkPage('wiki/Interface', "flowR's server", 'communicating-with-the-server')}
238
+ - ${ctx.linkPage('flowr:npm', 'NPM package')}: include flowR in your TypeScript and JavaScript projects
239
239
 
240
240
 
241
241
  If you are already using flowR and want to give feedback, please consider filling out our [feedback form](https://docs.google.com/forms/d/e/1FAIpQLScKFhgnh9LGVU7QzqLvFwZe1oiv_5jNhkIO-G-zND0ppqsMxQ/viewform).
@@ -302,7 +302,7 @@ and received an unrestricted gift from [Posit](https://posit.co/), the open-sour
302
302
 
303
303
  Please notice that this file was generated automatically using the file ${(0, doc_auto_gen_1.fileNameForGenHeader)(module.filename)} as a source.\\
304
304
  If you want to make changes please edit the source file (the CI will take care of the rest).
305
- In fact, many files in the [wiki](${doc_files_1.FlowrWikiBaseRef}) are generated, so make sure to check for the source file if you want to make changes.
305
+ In fact, many files in the ${ctx.linkPage('flowr:wiki', 'wiki')} are generated, so make sure to check for the source file if you want to make changes.
306
306
 
307
307
  `.trim();
308
308
  }
@@ -1,5 +1,6 @@
1
1
  import type { NormalizedAst } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
2
2
  import type { KnownParser } from '../../r-bridge/parser';
3
+ import type { GeneralDocContext } from '../wiki-mk/doc-context';
3
4
  import type { DataflowInformation } from '../../dataflow/info';
4
5
  import type { ControlFlowInformation } from '../../control-flow/control-flow-graph';
5
6
  import { type CfgSimplificationPassName } from '../../control-flow/cfg-simplification';
@@ -21,9 +22,10 @@ export interface PrintCfgOptions {
21
22
  readonly simplifications?: readonly CfgSimplificationPassName[];
22
23
  readonly simplify?: boolean;
23
24
  readonly useDfg?: boolean;
25
+ readonly ctx?: GeneralDocContext;
24
26
  }
25
27
  /**
26
28
  * Generates and prints the control flow graph for the given code, along with optional metadata and the original code.
27
29
  */
28
- export declare function printCfgCode(parser: KnownParser, code: string, { showCode, openCode, prefix, simplifications, simplify, useDfg }?: PrintCfgOptions): Promise<string>;
30
+ export declare function printCfgCode(parser: KnownParser, code: string, { showCode, openCode, prefix, simplifications, simplify, useDfg, ctx }?: PrintCfgOptions): Promise<string>;
29
31
  export {};
@@ -36,12 +36,12 @@ ${(0, doc_code_1.codeBlock)('mermaid', (0, cfg_1.cfgToMermaid)(cfg, ast, { prefi
36
36
  /**
37
37
  * Generates and prints the control flow graph for the given code, along with optional metadata and the original code.
38
38
  */
39
- async function printCfgCode(parser, code, { showCode = true, openCode = false, prefix = 'flowchart BT\n', simplifications = [], simplify = false, useDfg = true } = {}) {
39
+ async function printCfgCode(parser, code, { showCode = true, openCode = false, prefix = 'flowchart BT\n', simplifications = [], simplify = false, useDfg = true, ctx } = {}) {
40
40
  const now = performance.now();
41
41
  const res = await getCfg(parser, code, simplifications, useDfg);
42
42
  const duration = performance.now() - now;
43
- const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including the ${useDfg ? 'dataflow analysis, ' : ''} normalization${useDfg ? ', ' : ''} and parsing with the [${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines) engine) within the generation environment.
44
- We used the following simplification${(simplifications?.length ?? 0) + cfg_simplification_1.DefaultCfgSimplificationOrder.length != 1 ? 's' : ''}: ${[...cfg_simplification_1.DefaultCfgSimplificationOrder, ...simplifications].map(s => '`' + s + '`').join(', ')} ${simplify ? ' and render a simplified/compacted version' : ''}.
43
+ const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including the ${useDfg ? 'dataflow analysis, ' : ''} normalization${useDfg ? ', ' : ''} and parsing with the ${ctx ? ctx.linkPage('wiki/Engines', parser.name) : `[${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines)`} engine) within the generation environment.
44
+ We used the following simplification${(simplifications?.length ?? 0) + cfg_simplification_1.DefaultCfgSimplificationOrder.length !== 1 ? 's' : ''}: ${[...cfg_simplification_1.DefaultCfgSimplificationOrder, ...simplifications].map(s => '`' + s + '`').join(', ')} ${simplify ? ' and render a simplified/compacted version' : ''}.
45
45
  `;
46
46
  return '\n\n' + printCfg(res.info, res.ast, prefix, simplify) + (showCode ? `
47
47
  <details${openCode ? ' open' : ''}>
@@ -2,10 +2,11 @@ import type { DataflowGraph, UnknownSideEffect } from '../../dataflow/graph/grap
2
2
  import type { DEFAULT_DATAFLOW_PIPELINE } from '../../core/steps/pipeline/default-pipelines';
3
3
  import type { PipelineOutput } from '../../core/steps/pipeline/pipeline';
4
4
  import type { KnownParser } from '../../r-bridge/parser';
5
+ import type { GeneralDocContext } from '../wiki-mk/doc-context';
5
6
  import type { MermaidMarkdownMark } from '../../util/mermaid/info';
6
7
  /**
7
8
  * Visualizes the dataflow graph as a mermaid graph inside a markdown code block.
8
- * Please use this only for documentation purposes, for programmatic usage use {@link graphToMermaid} directly.
9
+ * Please use this only for documentation purposes, for programmatic usage use {@link DataflowMermaid.convert} directly.
9
10
  */
10
11
  export declare function printDfGraph(graph: DataflowGraph, mark?: ReadonlySet<MermaidMarkdownMark>, simplified?: boolean): string;
11
12
  /**
@@ -19,6 +20,7 @@ export interface PrintDataflowGraphOptions {
19
20
  readonly switchCodeAndGraph?: boolean;
20
21
  readonly simplified?: boolean;
21
22
  readonly callGraph?: boolean;
23
+ readonly ctx?: GeneralDocContext;
22
24
  }
23
25
  /**
24
26
  * Visualizes a side effect for documentation purposes.
@@ -15,7 +15,7 @@ const df_helper_1 = require("../../dataflow/graph/df-helper");
15
15
  const call_graph_1 = require("../../dataflow/graph/call-graph");
16
16
  /**
17
17
  * Visualizes the dataflow graph as a mermaid graph inside a markdown code block.
18
- * Please use this only for documentation purposes, for programmatic usage use {@link graphToMermaid} directly.
18
+ * Please use this only for documentation purposes, for programmatic usage use {@link DataflowMermaid.convert} directly.
19
19
  */
20
20
  function printDfGraph(graph, mark, simplified = false) {
21
21
  return `
@@ -43,7 +43,7 @@ function formatSideEffect(ef) {
43
43
  * This function returns a markdown string containing the dataflow graph as a mermaid code block,
44
44
  * along with the R code itself in a collapsible section.
45
45
  */
46
- async function printDfGraphForCode(parser, code, { callGraph = false, simplified = false, mark, showCode = true, codeOpen = false, exposeResult, switchCodeAndGraph = false } = {}) {
46
+ async function printDfGraphForCode(parser, code, { callGraph = false, simplified = false, mark, showCode = true, codeOpen = false, exposeResult, switchCodeAndGraph = false, ctx } = {}) {
47
47
  const now = performance.now();
48
48
  const result = await (0, default_pipelines_1.createDataflowPipeline)(parser, {
49
49
  context: (0, flowr_analyzer_context_1.contextFromInput)(code)
@@ -52,7 +52,7 @@ async function printDfGraphForCode(parser, code, { callGraph = false, simplified
52
52
  if (switchCodeAndGraph) {
53
53
  (0, assert_1.guard)(showCode, 'can not switch code and graph if code is not shown');
54
54
  }
55
- const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including parse and normalize, using the [${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines) engine) within the generation environment.`;
55
+ const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including parse and normalize, using the ${ctx ? ctx.linkPage('wiki/Engines', parser.name) : `[${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines)`} engine) within the generation environment.`;
56
56
  const graph = callGraph ? call_graph_1.CallGraph.compute(result.dataflow.graph) : result.dataflow.graph;
57
57
  const dfGraph = printDfGraph(graph, mark, simplified);
58
58
  const simplyText = simplified ? '(simplified) ' : '';
@@ -11,10 +11,12 @@ export declare const FlowrVsCode = "https://marketplace.visualstudio.com/items?i
11
11
  export declare const FlowrPositron = "https://open-vsx.org/extension/code-inspect/vscode-flowr";
12
12
  export declare const FlowrRStudioAddin = "https://github.com/flowr-analysis/rstudio-addin-flowr";
13
13
  export declare const FlowrRAdapter = "https://github.com/flowr-analysis/flowr-r-adapter";
14
+ /** Converts backslashes to forward slashes (Windows paths). */
15
+ export declare function toPosixPath(p: string): string;
14
16
  /**
15
17
  * Returns a markdown link to the given file path relative to the project root.
16
18
  */
17
- export declare function getFilePathMd(path: string): string;
19
+ export declare function getFilePathMd(filePath: string): string;
18
20
  /**
19
21
  * Returns the content of a file located at the given path relative to the project root.
20
22
  * This reads the file synchronously from disk.
@@ -4,10 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.FlowrRAdapter = exports.FlowrRStudioAddin = exports.FlowrPositron = exports.FlowrVsCode = exports.FlowrCodecovRef = exports.FlowrDockerRef = exports.FlowrNpmRef = exports.FlowrGithubRef = exports.FlowrWikiBaseRef = exports.RemoteFlowrFilePathBaseRef = exports.FlowrSiteBaseRef = exports.FlowrGithubBaseRef = exports.FlowrGithubGroupName = void 0;
7
+ exports.toPosixPath = toPosixPath;
7
8
  exports.getFilePathMd = getFilePathMd;
8
9
  exports.getFileContentFromRoot = getFileContentFromRoot;
9
10
  exports.linkFlowRSourceFile = linkFlowRSourceFile;
10
11
  const fs_1 = __importDefault(require("fs"));
12
+ const path_1 = __importDefault(require("path"));
11
13
  exports.FlowrGithubGroupName = 'flowr-analysis';
12
14
  exports.FlowrGithubBaseRef = `https://github.com/${exports.FlowrGithubGroupName}`;
13
15
  exports.FlowrSiteBaseRef = `https://${exports.FlowrGithubGroupName}.github.io/flowr`;
@@ -21,16 +23,17 @@ exports.FlowrVsCode = 'https://marketplace.visualstudio.com/items?itemName=code-
21
23
  exports.FlowrPositron = 'https://open-vsx.org/extension/code-inspect/vscode-flowr';
22
24
  exports.FlowrRStudioAddin = `${exports.FlowrGithubBaseRef}/rstudio-addin-flowr`;
23
25
  exports.FlowrRAdapter = `${exports.FlowrGithubBaseRef}/flowr-r-adapter`;
26
+ /** Converts backslashes to forward slashes (Windows paths). */
27
+ function toPosixPath(p) {
28
+ return p.replaceAll('\\', '/');
29
+ }
24
30
  /**
25
31
  * Returns a markdown link to the given file path relative to the project root.
26
32
  */
27
- function getFilePathMd(path) {
33
+ function getFilePathMd(filePath) {
28
34
  // we go one up as we are in doc-util now :D #convenience
29
- const fullpath = require.resolve('../' + path);
30
- // normalize path separators so that this is consistent when testing on windows
31
- const cwd = process.cwd().replaceAll('\\', '/');
32
- const relative = fullpath.replaceAll('\\', '/').replace(cwd, '.');
33
- /* remove project prefix */
35
+ const fullpath = require.resolve('../' + filePath);
36
+ const relative = './' + toPosixPath(path_1.default.relative(process.cwd(), fullpath));
34
37
  return `[\`${relative}\`](${exports.RemoteFlowrFilePathBaseRef}${relative})`;
35
38
  }
36
39
  /**
@@ -1,5 +1,6 @@
1
1
  import { type ParentInformation, type RNodeWithParent } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
2
2
  import type { KnownParser } from '../../r-bridge/parser';
3
+ import type { GeneralDocContext } from '../wiki-mk/doc-context';
3
4
  import type { RProject } from '../../r-bridge/lang-4.x/ast/model/nodes/r-project';
4
5
  /**
5
6
  * Visualizes the normalized AST using mermaid syntax.
@@ -9,9 +10,10 @@ export declare function printNormalizedAst(ast: RProject<ParentInformation> | RN
9
10
  export interface PrintNormalizedAstOptions {
10
11
  readonly showCode?: boolean;
11
12
  readonly prefix?: string;
13
+ readonly ctx?: GeneralDocContext;
12
14
  }
13
15
  /**
14
16
  * Generates and prints the normalized AST for the given code, along with optional metadata and the original code.
15
17
  * This is intended for documentation purposes.
16
18
  */
17
- export declare function printNormalizedAstForCode(parser: KnownParser, code: string, { showCode, prefix }?: PrintNormalizedAstOptions): Promise<string>;
19
+ export declare function printNormalizedAstForCode(parser: KnownParser, code: string, { showCode, prefix, ctx }?: PrintNormalizedAstOptions): Promise<string>;
@@ -22,13 +22,13 @@ ${(0, ast_1.normalizedAstToMermaid)(ast, { prefix })}
22
22
  * Generates and prints the normalized AST for the given code, along with optional metadata and the original code.
23
23
  * This is intended for documentation purposes.
24
24
  */
25
- async function printNormalizedAstForCode(parser, code, { showCode = true, prefix = 'flowchart TD\n' } = {}) {
25
+ async function printNormalizedAstForCode(parser, code, { showCode = true, prefix = 'flowchart TD\n', ctx } = {}) {
26
26
  const now = performance.now();
27
27
  const result = await (0, default_pipelines_1.createNormalizePipeline)(parser, {
28
28
  context: (0, flowr_analyzer_context_1.contextFromInput)(code)
29
29
  }).allRemainingSteps();
30
30
  const duration = performance.now() - now;
31
- const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including parsing with the [${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines) engine) within the generation environment.`;
31
+ const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including parsing with the ${ctx ? ctx.linkPage('wiki/Engines', parser.name) : `[${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines)`} engine) within the generation environment.`;
32
32
  return '\n\n' + printNormalizedAst(result.normalize.ast, prefix) + (showCode ? `
33
33
  <details>
34
34
 
@@ -10,11 +10,12 @@ export interface ShowQueryOptions {
10
10
  readonly collapseResult?: boolean;
11
11
  readonly collapseQuery?: boolean;
12
12
  readonly shorthand?: string;
13
+ readonly ctx?: GeneralDocContext;
13
14
  }
14
15
  /**
15
16
  * Visualizes a query and its results in markdown format.
16
17
  */
17
- export declare function showQuery<Base extends SupportedQueryTypes, VirtualArguments extends VirtualCompoundConstraint<Base> = VirtualCompoundConstraint<Base>>(parser: KnownParser, code: string, queries: Queries<Base, VirtualArguments>, { showCode, collapseResult, collapseQuery, shorthand }?: ShowQueryOptions): Promise<string>;
18
+ export declare function showQuery<Base extends SupportedQueryTypes, VirtualArguments extends VirtualCompoundConstraint<Base> = VirtualCompoundConstraint<Base>>(parser: KnownParser, code: string, queries: Queries<Base, VirtualArguments>, { showCode, collapseResult, collapseQuery, shorthand, ctx }?: ShowQueryOptions): Promise<string>;
18
19
  export interface QueryDocumentation {
19
20
  readonly name: string;
20
21
  readonly type: 'virtual' | 'active';
@@ -19,7 +19,7 @@ const doc_cli_option_1 = require("./doc-cli-option");
19
19
  /**
20
20
  * Visualizes a query and its results in markdown format.
21
21
  */
22
- async function showQuery(parser, code, queries, { showCode, collapseResult, collapseQuery, shorthand } = {}) {
22
+ async function showQuery(parser, code, queries, { showCode, collapseResult, collapseQuery, shorthand, ctx } = {}) {
23
23
  const now = performance.now();
24
24
  const analyzer = await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder().setParser(parser).build();
25
25
  analyzer.addRequest(code);
@@ -53,7 +53,7 @@ ${await (0, query_print_1.asciiSummaryOfQueryResult)(ansi_1.markdownFormatter, d
53
53
  ${metaInfo}
54
54
 
55
55
  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.
56
- Please consult the [Interface](${doc_files_1.FlowrWikiBaseRef}/Interface) wiki page for more information on how to get those.
56
+ Please consult the ${ctx ? ctx.linkPage('wiki/Interface', 'Interface') : `[Interface](${doc_files_1.FlowrWikiBaseRef}/Interface)`} wiki page for more information on how to get those.
57
57
 
58
58
  ${(0, doc_code_1.jsonWithLimit)(results)}
59
59
 
@@ -59,6 +59,7 @@ async function documentReplSession(parser, commands, options) {
59
59
  const entry = { command, lines: [] };
60
60
  const collectingOutput = {
61
61
  formatter: ansi_1.voidFormatter,
62
+ allowClipboard: false,
62
63
  stdout(msg) {
63
64
  entry.lines.push(dropAnsiEscapeCodesAndCodeTags(msg));
64
65
  },
@@ -57,7 +57,7 @@ export declare function removeCommentSymbolsFromTypeScriptComment(comment: strin
57
57
  export declare function getStartLineOfTypeScriptNode(node: ts.Node, sourceFile: ts.SourceFile): number;
58
58
  /**
59
59
  * Return the link to the type in the source code.
60
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
60
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
61
61
  */
62
62
  export declare function getTypePathLink(elem: Pick<TypeElementInSource, 'filePath' | 'lineNumber'>, relative?: boolean): string;
63
63
  export interface MermaidClassDiagramArguments {
@@ -111,7 +111,7 @@ export interface PrintHierarchyArguments {
111
111
  export declare const mermaidHide: string[];
112
112
  /**
113
113
  * Print the hierarchy of types starting from the given root.
114
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
114
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
115
115
  */
116
116
  export declare function printHierarchy({ program, info, root, ignoredTypes, collapseFromNesting, initialNesting, maxDepth, skipNesting, openTop, showImplSnippet, reverse }: PrintHierarchyArguments): string;
117
117
  /**
@@ -135,14 +135,14 @@ export interface FnElementInfo {
135
135
  }
136
136
  /**
137
137
  * Print an element from the info as code block.
138
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
138
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
139
139
  *
140
140
  * This is great to show examples that are directly taken from the source code.
141
141
  */
142
142
  export declare function printCodeOfElement(info: FnElementInfo, name: string): string;
143
143
  /**
144
144
  * Print a source file as code block.
145
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
145
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
146
146
  *
147
147
  * This is great to show examples that are directly taken from the source code.
148
148
  */
@@ -161,7 +161,7 @@ export declare function printCodeOfFile(info: FnElementInfo, relativePath: strin
161
161
  export declare function shortLink(name: string, hierarchy: readonly TypeElementInSource[], codeStyle?: boolean, realNameWrapper?: string, fuzzy?: boolean, type?: TypeElementKind): string;
162
162
  /**
163
163
  * Create a short link to a type in the documentation.
164
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
164
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
165
165
  * @param name - The name of the type, e.g. `MyType`, may include a container, e.g.,`MyContainer::MyType` (this works with function nestings too)
166
166
  * Use `:::` if you want to access a scoped function, but the name should be displayed without the scope
167
167
  * @param hierarchy - The hierarchy of types to search in
@@ -173,7 +173,7 @@ export interface GetDocumentationForTypeFilters {
173
173
  }
174
174
  /**
175
175
  * Retrieve documentation comments for a type.
176
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
176
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
177
177
  * @param name - The name of the type, e.g. `MyType`, may include a container, e.g.,`MyContainer::MyType` (this works with function nestings too)
178
178
  * Use `:::` if you want to access a scoped function, but the name should be displayed without the scope
179
179
  * @param hierarchy - The hierarchy of types to search in
@@ -89,8 +89,10 @@ const options = {
89
89
  */
90
90
  function getTypeScriptSourceFiles(fileNames) {
91
91
  try {
92
- const program = typescript_1.default.createProgram(fileNames, options);
93
- return { program, files: fileNames.map(fileName => program.getSourceFile(fileName)).filter(file => !!file) };
92
+ // keeps wiki/doc links consistent across OSes (Windows uses backslashes)
93
+ const normalizedFileNames = fileNames.map(doc_files_1.toPosixPath);
94
+ const program = typescript_1.default.createProgram(normalizedFileNames, options);
95
+ return { program, files: normalizedFileNames.map(fileName => program.getSourceFile(fileName)).filter(file => !!file) };
94
96
  }
95
97
  catch (err) {
96
98
  console.error('Failed to get source files', err);
@@ -352,7 +354,7 @@ function getTypePathForTypeScript({ filePath }) {
352
354
  }
353
355
  /**
354
356
  * Return the link to the type in the source code.
355
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
357
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
356
358
  */
357
359
  function getTypePathLink(elem, relative = false) {
358
360
  const fromSource = getTypePathForTypeScript(elem);
@@ -492,7 +494,7 @@ function implSnippet(node, program, showName = true, nesting = 0, open = false,
492
494
  exports.mermaidHide = ['MergeableRecord', 'Leaf', 'Location', 'Namespace', 'Base', 'WithChildren', 'Partial', 'RAccessBase'];
493
495
  /**
494
496
  * Print the hierarchy of types starting from the given root.
495
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
497
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
496
498
  */
497
499
  function printHierarchy({ program, info, root, ignoredTypes, collapseFromNesting = 1, initialNesting = 0, maxDepth = 20, skipNesting = 0, openTop, showImplSnippet = true, reverse = false }) {
498
500
  if (initialNesting > maxDepth) {
@@ -532,7 +534,7 @@ function printHierarchy({ program, info, root, ignoredTypes, collapseFromNesting
532
534
  }
533
535
  /**
534
536
  * Print an element from the info as code block.
535
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
537
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
536
538
  *
537
539
  * This is great to show examples that are directly taken from the source code.
538
540
  */
@@ -547,12 +549,12 @@ function printCodeOfElement(info, name) {
547
549
  }
548
550
  /**
549
551
  * Print a source file as code block.
550
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
552
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
551
553
  *
552
554
  * This is great to show examples that are directly taken from the source code.
553
555
  */
554
556
  function printCodeOfFile(info, relativePath) {
555
- const fullPath = path_1.default.resolve(__dirname, `../../../${relativePath}`);
557
+ const fullPath = (0, doc_files_1.toPosixPath)(path_1.default.resolve(__dirname, `../../../${relativePath}`));
556
558
  const code = info.program.getSourceFile(fullPath)?.getFullText().trim();
557
559
  if (!code) {
558
560
  console.error(`Could not find source file ${relativePath}!`);
@@ -649,7 +651,7 @@ function shortLink(name, hierarchy, codeStyle = true, realNameWrapper = 'b', fuz
649
651
  }
650
652
  /**
651
653
  * Create a short link to a type in the documentation.
652
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
654
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
653
655
  * @param name - The name of the type, e.g. `MyType`, may include a container, e.g.,`MyContainer::MyType` (this works with function nestings too)
654
656
  * Use `:::` if you want to access a scoped function, but the name should be displayed without the scope
655
657
  * @param hierarchy - The hierarchy of types to search in
@@ -665,7 +667,7 @@ function shortLinkFile(name, hierarchy) {
665
667
  }
666
668
  /**
667
669
  * Retrieve documentation comments for a type.
668
- * If you create a wiki, please refer to the functions provided by the {@link GeneralWikiContext}.
670
+ * If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
669
671
  * @param name - The name of the type, e.g. `MyType`, may include a container, e.g.,`MyContainer::MyType` (this works with function nestings too)
670
672
  * Use `:::` if you want to access a scoped function, but the name should be displayed without the scope
671
673
  * @param hierarchy - The hierarchy of types to search in
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IssueLintingRule = void 0;
4
4
  const linter_tags_1 = require("../linter/linter-tags");
5
5
  const doc_general_1 = require("./doc-util/doc-general");
6
- const doc_files_1 = require("./doc-util/doc-files");
7
6
  const linter_rules_1 = require("../linter/linter-rules");
8
7
  const doc_maker_1 = require("./wiki-mk/doc-maker");
9
8
  /* this prints the yaml configuration for the GitHub issue template to request a new linter rule / an update */
@@ -30,7 +29,7 @@ body:
30
29
  - type: markdown
31
30
  attributes:
32
31
  value: |
33
- Thank you for suggesting a new linting rule or an improvement to an existing one. Please provide as much detail as possible to help us understand your request. See the [Linter Wiki Page](${doc_files_1.FlowrWikiBaseRef}/Linter) for more information.
32
+ Thank you for suggesting a new linting rule or an improvement to an existing one. Please provide as much detail as possible to help us understand your request. See the ${ctx.linkPage('wiki/Linter', 'Linter Wiki Page')} for more information.
34
33
  - type: textarea
35
34
  id: description
36
35
  attributes:
@@ -94,14 +94,14 @@ ${(0, doc_structure_1.section)('Overview', 2)}
94
94
  No matter whether you want to analyze a single R script, a couple of R notebooks, a complete project, or an R package,
95
95
  your journey starts with the ${ctx.link(flowr_analyzer_builder_1.FlowrAnalyzerBuilder)} (further described in [Builder Configuration](#builder-configuration) below).
96
96
  This builder allows you to configure the analysis in many different ways, for example, by specifying which [plugins](#Plugins) to use or
97
- what [engine](${doc_files_1.FlowrWikiBaseRef}/Engines) to use for the analysis.
97
+ what ${ctx.linkPage('wiki/Engines', 'engine')} to use for the analysis.
98
98
 
99
99
  When building the ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)} instance, the builder will take care to
100
100
 
101
101
  * load the [requested plugins](#Plugins)
102
102
  * setup an initial [context](#Context_Information)
103
103
  * create a [cache](#Caching) for speeding up future analyses
104
- * initialize the [engine](${doc_files_1.FlowrWikiBaseRef}/Engines) (e.g., TreeSitter) if needed
104
+ * initialize the ${ctx.linkPage('wiki/Engines', 'engine')} (e.g., TreeSitter) if needed
105
105
 
106
106
  The builder provides two methods for building the analyzer:
107
107
 
@@ -141,19 +141,19 @@ Please make sure to add all of the files, folder, and projects you want to analy
141
141
  ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'addRequest')} method (or ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'addFile')} for virtual files).
142
142
  Afterwards, you can request different kinds of analysis results, such as:
143
143
 
144
- * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'parse')} to get the parsed information by the respective [engine](${doc_files_1.FlowrWikiBaseRef}/Engines)\\
144
+ * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'parse')} to get the parsed information by the respective ${ctx.linkPage('wiki/Engines', 'engine')}\\
145
145
  You can also use ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'peekParse', { codeFont: true, realNameWrapper: 'i' })} to inspect the parse information if it was already computed (but without triggering a computation).
146
146
  With ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'parserInformation', { codeFont: true, realNameWrapper: 'i' })}, you get additional information on the parser used for the analysis.
147
- * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'normalize')} to compute the [Normalized AST](${doc_files_1.FlowrWikiBaseRef}/Normalized%20AST)\\
147
+ * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'normalize')} to compute the ${ctx.linkPage('wiki/Normalized AST', 'Normalized AST')}\\
148
148
  Likewise, ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'peekNormalize', { codeFont: true, realNameWrapper: 'i' })} returns the normalized AST if it was already computed but without triggering a computation.
149
- * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'dataflow')} to compute the [Dataflow Graph](${doc_files_1.FlowrWikiBaseRef}/Dataflow%20Graph)\\
149
+ * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'dataflow')} to compute the ${ctx.linkPage('wiki/Dataflow Graph', 'Dataflow Graph')}\\
150
150
  Again, ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'peekDataflow', { codeFont: true, realNameWrapper: 'i' })} allows you to inspect the dataflow graph if it was already computed (but without triggering a computation).
151
- * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'controlflow')} to compute the [Control Flow Graph](${doc_files_1.FlowrWikiBaseRef}/Control%20Flow%20Graph)\\
151
+ * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'controlflow')} to compute the ${ctx.linkPage('wiki/Control Flow Graph', 'Control Flow Graph')}\\
152
152
  Also, ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'peekControlflow', { codeFont: true, realNameWrapper: 'i' })} returns the control flow graph if it was already computed but without triggering a computation.
153
153
  * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'callGraph')} to compute the ${ctx.linkPage('wiki/Dataflow Graph', 'call graph', 'perspectives-cg')} of the analyzed code\\
154
154
  Likewise, ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'peekCallGraph', { codeFont: true, realNameWrapper: 'i' })} allows you to inspect the call graph if it was already computed (but without triggering a computation).
155
- * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'query')} to run [queries](${doc_files_1.FlowrWikiBaseRef}/Query-API) on the analyzed code.
156
- * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'runSearch')} to run a search query on the analyzed code using the [search API](${doc_files_1.FlowrWikiBaseRef}/Search%20API)
155
+ * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'query')} to run ${ctx.linkPage('wiki/Query API', 'queries')} on the analyzed code.
156
+ * ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'runSearch')} to run a search query on the analyzed code using the ${ctx.linkPage('wiki/Search API', 'search API')}
157
157
 
158
158
  We work on providing a set of example repositories that demonstrate how to use the analyzer in different scenarios:
159
159
 
@@ -171,7 +171,7 @@ The following sections highlight some of the most important configuration option
171
171
 
172
172
  ${(0, doc_structure_1.section)('Configuring flowR', 3)}
173
173
 
174
- You can fundamentally change the behavior of flowR using the [config file](${doc_files_1.FlowrWikiBaseRef}/Interface#configuring-flowr),
174
+ You can fundamentally change the behavior of flowR using the ${ctx.linkPage('wiki/Interface', 'config file', 'configuring-flowr')},
175
175
  embedded in the interface ${ctx.link(config_1.FlowrConfig)}.
176
176
  With the builder you can either provide a complete configuration or amend the default configuration using:
177
177