@eagleoutice/flowr 2.14.0 → 2.14.2

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 (461) hide show
  1. package/README.md +169 -91
  2. package/abstract-interpretation/absint-visitor.d.ts +91 -25
  3. package/abstract-interpretation/absint-visitor.js +235 -74
  4. package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +1 -1
  5. package/abstract-interpretation/data-frame/mappers/access-mapper.js +4 -4
  6. package/abstract-interpretation/data-frame/mappers/arguments.d.ts +1 -1
  7. package/abstract-interpretation/data-frame/mappers/arguments.js +1 -1
  8. package/abstract-interpretation/data-frame/mappers/function-mapper.js +107 -254
  9. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +5 -5
  10. package/abstract-interpretation/data-frame/resolve-args.d.ts +1 -1
  11. package/abstract-interpretation/data-frame/resolve-args.js +6 -4
  12. package/abstract-interpretation/data-frame/shape-inference.d.ts +4 -9
  13. package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -0
  14. package/abstract-interpretation/domains/bounded-set-domain.js +1 -0
  15. package/abstract-interpretation/domains/partial-product-domain.js +1 -1
  16. package/abstract-interpretation/domains/set-range-domain.d.ts +3 -2
  17. package/abstract-interpretation/domains/set-range-domain.js +3 -2
  18. package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +3 -2
  19. package/abstract-interpretation/domains/set-upper-bound-domain.js +3 -2
  20. package/benchmark/calibration.d.ts +18 -11
  21. package/benchmark/calibration.js +37 -27
  22. package/benchmark/slicer.d.ts +9 -2
  23. package/benchmark/slicer.js +44 -37
  24. package/benchmark/stats/count-comments.d.ts +16 -0
  25. package/benchmark/stats/count-comments.js +30 -0
  26. package/benchmark/stats/print.js +2 -0
  27. package/benchmark/stats/size-of.d.ts +7 -3
  28. package/benchmark/stats/size-of.js +7 -3
  29. package/benchmark/stats/stats.d.ts +7 -0
  30. package/benchmark/summarizer/first-phase/process.js +2 -19
  31. package/benchmark/summarizer/second-phase/graph.js +13 -3
  32. package/benchmark/summarizer/second-phase/process.js +2 -0
  33. package/cli/benchmark-app.js +4 -1
  34. package/cli/benchmark-helper-app.d.ts +1 -0
  35. package/cli/benchmark-helper-app.js +2 -2
  36. package/cli/common/options.d.ts +5 -0
  37. package/cli/common/options.js +1 -0
  38. package/cli/common/scripts-info.d.ts +5 -0
  39. package/cli/repl/commands/repl-dataflow.js +70 -27
  40. package/cli/repl/core.d.ts +1 -1
  41. package/cli/repl/core.js +1 -1
  42. package/cli/repl/execute.d.ts +2 -2
  43. package/cli/repl/execute.js +2 -2
  44. package/cli/repl/parser/slice-query-parser.js +2 -1
  45. package/cli/repl/server/connection.d.ts +4 -0
  46. package/cli/repl/server/connection.js +19 -16
  47. package/cli/repl/server/messages/message-analysis.d.ts +1 -1
  48. package/config.d.ts +6 -0
  49. package/config.js +12 -9
  50. package/control-flow/basic-cfg-guided-visitor.d.ts +7 -2
  51. package/control-flow/basic-cfg-guided-visitor.js +37 -24
  52. package/control-flow/cfg-dead-code.js +44 -33
  53. package/control-flow/cfg-properties.js +2 -2
  54. package/control-flow/cfg-simplification.js +6 -5
  55. package/control-flow/cfg-to-basic-blocks.js +11 -13
  56. package/control-flow/control-flow-graph.d.ts +179 -189
  57. package/control-flow/control-flow-graph.js +400 -263
  58. package/control-flow/dfg-cfg-guided-visitor.d.ts +21 -3
  59. package/control-flow/dfg-cfg-guided-visitor.js +17 -13
  60. package/control-flow/diff-cfg.js +6 -14
  61. package/control-flow/happens-before.js +5 -4
  62. package/control-flow/semantic-cfg-guided-visitor.d.ts +44 -101
  63. package/control-flow/semantic-cfg-guided-visitor.js +6 -26
  64. package/control-flow/simple-visitor.js +14 -15
  65. package/control-flow/syntax-cfg-guided-visitor.d.ts +2 -1
  66. package/control-flow/useless-loop.js +18 -14
  67. package/core/steps/all/core/20-dataflow.d.ts +1 -3
  68. package/core/steps/pipeline/default-pipelines.d.ts +141 -157
  69. package/dataflow/cluster.js +7 -0
  70. package/dataflow/environments/apply-kill.d.ts +6 -0
  71. package/dataflow/environments/apply-kill.js +64 -32
  72. package/dataflow/environments/built-in-props.d.ts +10 -2
  73. package/dataflow/environments/built-in-props.js +9 -1
  74. package/dataflow/environments/built-in.d.ts +6 -3
  75. package/dataflow/environments/built-in.js +8 -5
  76. package/dataflow/environments/clone.d.ts +3 -3
  77. package/dataflow/environments/clone.js +5 -5
  78. package/dataflow/environments/default-builtin-config.d.ts +188 -8
  79. package/dataflow/environments/default-builtin-config.js +112 -39
  80. package/dataflow/environments/environment.d.ts +9 -1
  81. package/dataflow/environments/environment.js +25 -7
  82. package/dataflow/environments/identifier.d.ts +12 -1
  83. package/dataflow/environments/identifier.js +4 -1
  84. package/dataflow/environments/query-fn-props.d.ts +6 -0
  85. package/dataflow/environments/query-fn-props.js +20 -0
  86. package/dataflow/environments/resolve-by-name.d.ts +7 -0
  87. package/dataflow/environments/resolve-by-name.js +26 -2
  88. package/dataflow/environments/resolve-helper.d.ts +3 -1
  89. package/dataflow/environments/resolve-helper.js +2 -0
  90. package/dataflow/eval/resolve/alias-tracking.d.ts +2 -2
  91. package/dataflow/eval/resolve/alias-tracking.js +2 -2
  92. package/dataflow/eval/resolve/match-arguments.js +7 -5
  93. package/dataflow/eval/resolve/node-value.d.ts +3 -1
  94. package/dataflow/eval/resolve/node-value.js +12 -0
  95. package/dataflow/eval/resolve/resolve-argument.js +5 -4
  96. package/dataflow/eval/resolve/resolve-operators.js +10 -7
  97. package/dataflow/eval/resolve/resolve-strings.js +2 -2
  98. package/dataflow/eval/resolve/resolve-working-directory.d.ts +1 -1
  99. package/dataflow/eval/resolve/resolve-working-directory.js +5 -5
  100. package/dataflow/eval/resolve/resolve.js +3 -2
  101. package/dataflow/eval/values/general.js +8 -5
  102. package/dataflow/extractor.d.ts +1 -4
  103. package/dataflow/extractor.js +11 -10
  104. package/dataflow/fn/exceptions-of-function.d.ts +6 -2
  105. package/dataflow/fn/exceptions-of-function.js +85 -38
  106. package/dataflow/fn/strict-function.d.ts +40 -0
  107. package/dataflow/fn/strict-function.js +339 -0
  108. package/dataflow/graph/call-graph.js +2 -2
  109. package/dataflow/graph/df-helper.d.ts +17 -2
  110. package/dataflow/graph/df-helper.js +19 -3
  111. package/dataflow/graph/diff-dataflow-graph.d.ts +1 -1
  112. package/dataflow/graph/diff-dataflow-graph.js +19 -2
  113. package/dataflow/graph/edge.d.ts +38 -2
  114. package/dataflow/graph/edge.js +32 -2
  115. package/dataflow/graph/graph.d.ts +32 -5
  116. package/dataflow/graph/graph.js +65 -4
  117. package/dataflow/graph/match-args.d.ts +69 -0
  118. package/dataflow/graph/match-args.js +167 -0
  119. package/dataflow/info.d.ts +40 -0
  120. package/dataflow/info.js +28 -1
  121. package/dataflow/internal/control-flow.d.ts +102 -0
  122. package/dataflow/internal/control-flow.js +200 -0
  123. package/dataflow/internal/linker.d.ts +6 -31
  124. package/dataflow/internal/linker.js +24 -81
  125. package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +1 -1
  126. package/dataflow/internal/process/functions/call/argument/unpack-argument.js +3 -3
  127. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +2 -2
  128. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +9 -6
  129. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
  130. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +6 -4
  131. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +1 -10
  132. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +18 -37
  133. package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -1
  134. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +3 -3
  135. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +1 -1
  136. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +11 -7
  137. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -8
  138. package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
  139. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +18 -14
  140. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +8 -1
  141. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +11 -0
  142. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -1
  143. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +27 -20
  144. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -2
  145. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
  146. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +35 -6
  147. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +1 -1
  148. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +20 -17
  149. package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +1 -1
  150. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +6 -4
  151. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +4 -3
  152. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +8 -3
  153. package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.d.ts +2 -2
  154. package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.js +5 -5
  155. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.d.ts +1 -1
  156. package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +5 -4
  157. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +7 -5
  158. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +1 -1
  159. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +15 -13
  160. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +2 -2
  161. package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +2 -2
  162. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +4 -3
  163. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +1 -1
  164. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +26 -4
  165. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -2
  166. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +17 -4
  167. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +3 -2
  168. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +97 -33
  169. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +6 -15
  170. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +12 -13
  171. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
  172. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +15 -12
  173. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +15 -1
  174. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +1 -1
  175. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +12 -8
  176. package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +6 -5
  177. package/dataflow/internal/process/functions/call/built-in/built-in-string-template.d.ts +1 -1
  178. package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +5 -4
  179. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +2 -2
  180. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +45 -10
  181. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +2 -2
  182. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +19 -3
  183. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +6 -2
  184. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +29 -8
  185. package/dataflow/internal/process/functions/call/common.js +5 -6
  186. package/dataflow/internal/process/functions/call/deferred.js +2 -2
  187. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +12 -2
  188. package/dataflow/internal/process/functions/call/known-call-handling.js +23 -1
  189. package/dataflow/internal/process/functions/call/named-call-handling.js +2 -0
  190. package/dataflow/internal/process/functions/call/nse.d.ts +1 -1
  191. package/dataflow/internal/process/functions/call/nse.js +6 -1
  192. package/dataflow/internal/process/functions/call/quoted.js +2 -2
  193. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +19 -6
  194. package/dataflow/internal/process/functions/process-argument.d.ts +1 -1
  195. package/dataflow/internal/process/functions/process-argument.js +12 -4
  196. package/dataflow/internal/process/functions/process-parameter.js +13 -0
  197. package/dataflow/internal/process/process-named-call.d.ts +2 -2
  198. package/dataflow/internal/process/process-named-call.js +9 -7
  199. package/documentation/data/server/doc-data-server-messages.js +4 -4
  200. package/documentation/doc-readme.js +45 -0
  201. package/documentation/doc-util/doc-cfg.d.ts +8 -7
  202. package/documentation/doc-util/doc-cfg.js +10 -10
  203. package/documentation/doc-util/doc-playground.d.ts +12 -0
  204. package/documentation/doc-util/doc-playground.js +21 -0
  205. package/documentation/doc-util/doc-query.d.ts +4 -1
  206. package/documentation/doc-util/doc-query.js +4 -2
  207. package/documentation/wiki-absint.d.ts +3 -4
  208. package/documentation/wiki-absint.js +12 -5
  209. package/documentation/wiki-analyzer.js +2 -2
  210. package/documentation/wiki-cfg.js +101 -106
  211. package/documentation/wiki-core.js +1 -1
  212. package/documentation/wiki-dataflow-graph.js +85 -53
  213. package/documentation/wiki-linter.js +16 -1
  214. package/documentation/wiki-linting-and-testing.js +1 -16
  215. package/documentation/wiki-mk/doc-maker.js +6 -4
  216. package/documentation/wiki-query.js +67 -4
  217. package/documentation/wiki-signature-database.js +28 -2
  218. package/linter/linter-fix.d.ts +16 -0
  219. package/linter/linter-fix.js +104 -0
  220. package/linter/linter-format.d.ts +18 -1
  221. package/linter/linter-format.js +31 -1
  222. package/linter/linter-output.js +47 -11
  223. package/linter/linter-rules.d.ts +64 -9
  224. package/linter/linter-rules.js +5 -1
  225. package/linter/rules/absolute-path.js +4 -2
  226. package/linter/rules/dataframe-access-validation.js +6 -7
  227. package/linter/rules/deprecated-functions.d.ts +107 -10
  228. package/linter/rules/deprecated-functions.js +309 -23
  229. package/linter/rules/file-path-validity.js +5 -4
  230. package/linter/rules/function-finder-util.d.ts +6 -0
  231. package/linter/rules/function-finder-util.js +21 -13
  232. package/linter/rules/naming-convention.js +1 -1
  233. package/linter/rules/network-functions.d.ts +3 -3
  234. package/linter/rules/stop-with-call-arg.js +2 -2
  235. package/linter/rules/unclosed-connection.d.ts +44 -0
  236. package/linter/rules/unclosed-connection.js +200 -0
  237. package/linter/rules/undefined-symbol-util.js +6 -4
  238. package/linter/rules/undefined-symbol.js +2 -2
  239. package/linter/rules/unused-definition.js +8 -4
  240. package/linter/rules/unused-import.d.ts +60 -0
  241. package/linter/rules/unused-import.js +179 -0
  242. package/package.json +5 -8
  243. package/project/attached-packages.js +2 -1
  244. package/project/cache/flowr-analyzer-cache.d.ts +2 -5
  245. package/project/cache/flowr-analyzer-cache.js +4 -7
  246. package/project/cache/flowr-analyzer-controlflow-cache.d.ts +9 -8
  247. package/project/cache/flowr-analyzer-controlflow-cache.js +17 -34
  248. package/project/cache/flowr-cache.d.ts +9 -0
  249. package/project/cache/flowr-cache.js +19 -0
  250. package/project/context/flowr-analyzer-context.d.ts +7 -3
  251. package/project/context/flowr-analyzer-context.js +15 -9
  252. package/project/context/flowr-analyzer-dependencies-context.d.ts +24 -3
  253. package/project/context/flowr-analyzer-dependencies-context.js +9 -14
  254. package/project/context/flowr-analyzer-files-context.js +15 -17
  255. package/project/context/flowr-analyzer-meta-context.js +2 -12
  256. package/project/dependency-version-space.d.ts +3 -10
  257. package/project/dependency-version-space.js +10 -9
  258. package/project/flowr-analyzer.d.ts +4 -6
  259. package/project/flowr-analyzer.js +4 -5
  260. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +1 -1
  261. package/project/plugins/file-plugins/files/flowr-description-file.js +1 -1
  262. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +1 -1
  263. package/project/plugins/file-plugins/files/flowr-namespace-file.js +23 -35
  264. package/project/plugins/file-plugins/files/flowr-news-file.d.ts +1 -1
  265. package/project/plugins/file-plugins/files/flowr-news-file.js +1 -1
  266. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +13 -13
  267. package/project/plugins/file-plugins/files/flowr-rda-file.js +131 -286
  268. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +1 -0
  269. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +1 -0
  270. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +2 -5
  271. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +2 -8
  272. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +32 -0
  273. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +43 -1
  274. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.d.ts +4 -12
  275. package/project/plugins/file-plugins/flowr-analyzer-inst-file-plugin.js +3 -16
  276. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.d.ts +5 -8
  277. package/project/plugins/file-plugins/flowr-analyzer-license-file-plugin.js +4 -10
  278. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +3 -10
  279. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +1 -13
  280. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.d.ts +3 -6
  281. package/project/plugins/file-plugins/flowr-analyzer-namespace-files-plugin.js +2 -8
  282. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.d.ts +2 -5
  283. package/project/plugins/file-plugins/flowr-analyzer-news-file-plugin.js +2 -8
  284. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.d.ts +2 -5
  285. package/project/plugins/file-plugins/flowr-analyzer-rda-file-plugin.js +2 -8
  286. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +3 -4
  287. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +3 -6
  288. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.d.ts +4 -12
  289. package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +3 -16
  290. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.d.ts +4 -12
  291. package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +3 -16
  292. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +4 -12
  293. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -16
  294. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +2 -5
  295. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +2 -8
  296. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.d.ts +2 -6
  297. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.js +1 -10
  298. package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.d.ts +2 -5
  299. package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.js +2 -8
  300. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-library-plugin.js +2 -1
  301. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +5 -5
  302. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +33 -6
  303. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -2
  304. package/project/sigdb/build.d.ts +2 -2
  305. package/project/sigdb/decode.d.ts +0 -5
  306. package/project/sigdb/decode.js +0 -8
  307. package/project/sigdb/index-format.d.ts +4 -4
  308. package/project/sigdb/manifest.d.ts +5 -3
  309. package/project/sigdb/manifest.js +50 -9
  310. package/project/sigdb/reader.d.ts +48 -13
  311. package/project/sigdb/reader.js +3 -2
  312. package/project/sigdb/schema.d.ts +5 -3
  313. package/project/sigdb/schema.js +2 -2
  314. package/project/sigdb/signature-db.d.ts +69 -0
  315. package/project/sigdb/signature-db.js +54 -0
  316. package/project/sigdb/signature-match.d.ts +10 -5
  317. package/project/sigdb/signature-match.js +13 -8
  318. package/queries/catalog/absint-query/absint-query-executor.js +1 -2
  319. package/queries/catalog/call-context-query/call-context-query-executor.js +2 -4
  320. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +1 -1
  321. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +33 -6
  322. package/queries/catalog/control-flow-query/control-flow-query-executor.js +1 -2
  323. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -2
  324. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +8 -7
  325. package/queries/catalog/dependencies-query/dependencies-query-format.js +22 -35
  326. package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +13 -1
  327. package/queries/catalog/dependencies-query/function-info/library-functions.js +26 -22
  328. package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +9 -0
  329. package/queries/catalog/dependencies-query/function-info/statistics-functions.js +19 -0
  330. package/queries/catalog/dependencies-query/implicit-echo.d.ts +13 -0
  331. package/queries/catalog/dependencies-query/implicit-echo.js +133 -0
  332. package/queries/catalog/dependencies-query/link-devices.js +2 -8
  333. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +2 -2
  334. package/queries/catalog/happens-before-query/happens-before-query-executor.js +1 -2
  335. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +2 -1
  336. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
  337. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -0
  338. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.d.ts +6 -0
  339. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.js +25 -0
  340. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.d.ts +31 -0
  341. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.js +56 -0
  342. package/queries/catalog/signature-query/signature-query-executor.js +4 -3
  343. package/queries/catalog/slice-query-options.d.ts +1 -1
  344. package/queries/catalog/slice-query-options.js +1 -1
  345. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
  346. package/queries/query-function-filter.d.ts +8 -2
  347. package/queries/query-function-filter.js +11 -1
  348. package/queries/query.d.ts +11 -1
  349. package/queries/query.js +2 -0
  350. package/r-bridge/lang-4.x/ast/model/model.d.ts +4 -4
  351. package/r-bridge/lang-4.x/ast/model/model.js +4 -4
  352. package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +1 -0
  353. package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +1 -0
  354. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
  355. package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +1 -0
  356. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +4 -1
  357. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -2
  358. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
  359. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +1 -0
  360. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
  361. package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +1 -0
  362. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
  363. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +1 -0
  364. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
  365. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +1 -0
  366. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
  367. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +1 -0
  368. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +6 -4
  369. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +6 -4
  370. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
  371. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +1 -0
  372. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
  373. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +1 -0
  374. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
  375. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +1 -0
  376. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
  377. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +1 -0
  378. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
  379. package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +1 -0
  380. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +6 -0
  381. package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +13 -0
  382. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
  383. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +1 -0
  384. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
  385. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +1 -0
  386. package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +1 -0
  387. package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +1 -0
  388. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
  389. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +1 -0
  390. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
  391. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +1 -0
  392. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
  393. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +1 -0
  394. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
  395. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +1 -0
  396. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
  397. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +1 -0
  398. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +2 -1
  399. package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +1 -1
  400. package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.js +3 -2
  401. package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then-else.js +2 -1
  402. package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.js +2 -1
  403. package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +1 -1
  404. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -1
  405. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.d.ts +2 -2
  406. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +6 -3
  407. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +2 -1
  408. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-parameter.js +2 -1
  409. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-for.js +5 -3
  410. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +2 -1
  411. package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +2 -1
  412. package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +2 -1
  413. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +5 -3
  414. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -1
  415. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.d.ts +1 -1
  416. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +2 -1
  417. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +3 -1
  418. package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +1 -1
  419. package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +2 -1
  420. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +5 -3
  421. package/reconstruct/inline/source-inline-map.js +3 -3
  422. package/reconstruct/reconstruct.js +6 -4
  423. package/search/flowr-search-builder.d.ts +8 -8
  424. package/search/flowr-search-builder.js +4 -4
  425. package/search/flowr-search-filters.d.ts +2 -2
  426. package/search/flowr-search-filters.js +4 -15
  427. package/search/search-executor/search-enrichers.d.ts +6 -4
  428. package/search/search-executor/search-enrichers.js +44 -5
  429. package/slicing/criterion/filters/all-variables.js +2 -1
  430. package/slicing/criterion/parse.d.ts +2 -2
  431. package/slicing/criterion/parse.js +10 -8
  432. package/slicing/static/fingerprint.js +1 -1
  433. package/slicing/static/slice-call.js +2 -2
  434. package/util/arg-matching.d.ts +3 -0
  435. package/util/arg-matching.js +12 -1
  436. package/util/collections/arrays.d.ts +0 -4
  437. package/util/collections/arrays.js +4 -26
  438. package/util/diff-graph.d.ts +1 -1
  439. package/util/diff-graph.js +17 -3
  440. package/util/diff.d.ts +6 -0
  441. package/util/mermaid/ast.d.ts +1 -1
  442. package/util/mermaid/ast.js +5 -4
  443. package/util/mermaid/cfg.js +130 -24
  444. package/util/mermaid/dfg.js +31 -10
  445. package/util/mermaid/mermaid.js +2 -0
  446. package/util/objects.d.ts +21 -0
  447. package/util/objects.js +60 -0
  448. package/util/prefix.d.ts +1 -1
  449. package/util/simple-df/dfg-ascii.js +14 -3
  450. package/util/text/name-rank.d.ts +1 -1
  451. package/util/text/name-rank.js +1 -1
  452. package/util/text/playground-link.d.ts +131 -0
  453. package/util/text/playground-link.js +214 -0
  454. package/util/text/strings.js +7 -3
  455. package/util/version.js +1 -1
  456. package/control-flow/cfg-builder.d.ts +0 -30
  457. package/control-flow/cfg-builder.js +0 -79
  458. package/control-flow/extract-cfg.d.ts +0 -36
  459. package/control-flow/extract-cfg.js +0 -693
  460. package/project/cfg-kind.d.ts +0 -21
  461. package/project/cfg-kind.js +0 -26
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.InspectStrictnessQueryDefinition = void 0;
7
+ const ansi_1 = require("../../../util/text/ansi");
8
+ const joi_1 = __importDefault(require("joi"));
9
+ const inspect_strictness_query_executor_1 = require("./inspect-strictness-query-executor");
10
+ const node_id_1 = require("../../../r-bridge/lang-4.x/ast/model/processing/node-id");
11
+ const slice_query_parser_1 = require("../../../cli/repl/parser/slice-query-parser");
12
+ const range_1 = require("../../../util/range");
13
+ const logic_1 = require("../../../util/logic");
14
+ function inspectStrictLineParser(output, line, _config) {
15
+ const criteria = (0, slice_query_parser_1.sliceCriteriaParser)(line[0]);
16
+ return {
17
+ query: {
18
+ type: 'inspect-strictness',
19
+ filter: criteria
20
+ },
21
+ rCode: (0, slice_query_parser_1.queryLineCode)(line, criteria ? 1 : 0)
22
+ };
23
+ }
24
+ /** How a verdict reads in a sentence, `always`, `never`, or `conditionally` strict. */
25
+ function phrase(value) {
26
+ return value === logic_1.Ternary.Maybe ? 'conditionally' : value;
27
+ }
28
+ exports.InspectStrictnessQueryDefinition = {
29
+ title: 'Inspect Strict Functions Query',
30
+ executor: inspect_strictness_query_executor_1.executeStrictnessQuery,
31
+ asciiSummarizer: async (formatter, processed, queryResults, result) => {
32
+ const out = queryResults;
33
+ result.push(`Query: ${(0, ansi_1.bold)('inspect-strictness', formatter)} (${out['.meta'].timing.toFixed(0)}ms)`);
34
+ const idMap = (await processed.normalize()).idMap;
35
+ for (const [id, info] of Object.entries(out.strictness)) {
36
+ const node = idMap.get(node_id_1.NodeId.normalize(id));
37
+ const loc = node ? range_1.SourceLocation.fromNode(node) : undefined;
38
+ const params = Object.entries(info.parameters)
39
+ .map(([param, value]) => `${idMap.get(node_id_1.NodeId.normalize(param))?.lexeme ?? param}: ${phrase(value)}`)
40
+ .join(', ');
41
+ result.push(` - Function ${(0, ansi_1.bold)(id, formatter)} (${range_1.SourceLocation.format(loc)}) is ${phrase(info.strict)} strict${params.length > 0 ? ` (${params})` : ''}`);
42
+ }
43
+ return true;
44
+ },
45
+ fromLine: inspectStrictLineParser,
46
+ syntax: '@inspect-strictness [(<crit>;...)] <code | file://path>',
47
+ schema: joi_1.default.object({
48
+ type: joi_1.default.string().valid('inspect-strictness').required().description('The type of the query.'),
49
+ filter: joi_1.default.array().items(joi_1.default.string().required()).optional().description('If given, only function definitions that match one of the given slicing criteria are considered. Each criterion can be either `line:column`, `line@variable-name`, or `$id`, where the latter directly specifies the node id of the function definition to be considered.')
50
+ }).description('Either returns all function definitions alongside whether they are strict, or just those matching the filters.'),
51
+ flattenInvolvedNodes: (queryResults) => {
52
+ const out = queryResults;
53
+ return Object.keys(out.strictness).filter(id => out.strictness[id].strict === logic_1.Ternary.Always);
54
+ }
55
+ };
56
+ //# sourceMappingURL=inspect-strictness-query-format.js.map
@@ -22,6 +22,7 @@ const r_version_1 = require("../../../util/r-version");
22
22
  const r_base_packages_1 = require("../../../util/r-base-packages");
23
23
  const mermaid_1 = require("../../../util/mermaid/mermaid");
24
24
  const resolve_helper_1 = require("../../../dataflow/environments/resolve-helper");
25
+ const arrays_1 = require("../../../util/collections/arrays");
25
26
  /** the CRAN package landing page (only meaningful for CRAN packages, not base R) */
26
27
  function cranPageUrl(pkg) {
27
28
  return `https://cran.r-project.org/package=${encodeURIComponent(pkg)}`;
@@ -565,7 +566,7 @@ function searchSources(sources, allNames, q) {
565
566
  // every source holding a package (its latest lives in `current`, its older releases in `history`)
566
567
  const owningOf = (pkg) => sources.filter(s => s.has(pkg));
567
568
  // the versions of `pkg` matching the spec, unioned across all owning sources (so a `3.*`/date filter reaches history)
568
- const matchingVersions = (owners, pkg, m) => [...new Set(owners.flatMap(s => (0, reader_1.availableVersionEntries)(s, pkg).filter(m).map(e => e.version)))];
569
+ const matchingVersions = (owners, pkg, m) => (0, arrays_1.uniqueArray)(owners.flatMap(s => (0, reader_1.availableVersionEntries)(s, pkg).filter(m).map(e => e.version)));
569
570
  const paramPred = parameterFilter(q);
570
571
  // a parameter filter (with no function name) still means "search functions", not "list packages"
571
572
  if (!q.function && paramPred === undefined) {
@@ -705,10 +706,10 @@ function signatureQueryCompleter(line, startingNewArg) {
705
706
  const stride = all.length / MaxCompletions;
706
707
  return Array.from({ length: MaxCompletions }, (_, i) => all[Math.floor(i * stride)]);
707
708
  };
708
- const packageNames = () => [...new Set(sources.flatMap(s => s.packageNames()))].sort();
709
+ const packageNames = () => (0, arrays_1.uniqueArray)(sources.flatMap(s => s.packageNames())).sort();
709
710
  const functionsOf = (pkg) => {
710
711
  const src = sources.find(s => s.has(pkg));
711
- return src ? [...new Set((src.functions(pkg) ?? []).map(f => f.name))].sort() : [];
712
+ return src ? (0, arrays_1.uniqueArray)((src.functions(pkg) ?? []).map(f => f.name)).sort() : [];
712
713
  };
713
714
  // first token: a package spec (`pkg`, `pkg::fn`, `pkg@ver`)
714
715
  if (line.length === 0 || (line.length === 1 && !startingNewArg)) {
@@ -55,5 +55,5 @@ export declare const SliceQueryOptionsSchema: {
55
55
  * as {@link SlicingCriteria.convertAll} keeps them verbatim.
56
56
  */
57
57
  export declare function resolveSliceCriteria(criteria: SlicingCriteria, ast: NormalizedAst): NodeId[];
58
- /** Reconstruct the given `nodes` of `ast`, honoring the inlining, per-file and magic-comment options. */
58
+ /** Reconstruct the given `nodes` of `ast`, honoring the inlining, per-file, and magic-comment options. */
59
59
  export declare function reconstructSlice(ast: NormalizedAst, graph: DataflowGraph, nodes: ReadonlySet<NodeId>, options: SliceQueryOptions): ReconstructionResult;
@@ -39,7 +39,7 @@ function resolveSliceCriteria(criteria, ast) {
39
39
  }
40
40
  return ids;
41
41
  }
42
- /** Reconstruct the given `nodes` of `ast`, honoring the inlining, per-file and magic-comment options. */
42
+ /** Reconstruct the given `nodes` of `ast`, honoring the inlining, per-file, and magic-comment options. */
43
43
  function reconstructSlice(ast, graph, nodes, options) {
44
44
  const { inlineSources, inlineFull, perFile, noMagicComments } = options;
45
45
  const inlining = inlineSources || inlineFull;
@@ -22,7 +22,7 @@ export interface StaticSliceQuery extends BaseQueryFormat, SliceQueryOptions {
22
22
  export interface StaticSliceQueryResult extends BaseQueryResult {
23
23
  /**
24
24
  * only contains the results of the slice steps to not repeat ourselves, this does not contain the reconstruction
25
- * if you set the {@link SliceQuery#noReconstruction|noReconstruction} flag.
25
+ * if you set the {@link SliceQueryOptions#noReconstruction|noReconstruction} flag.
26
26
  *
27
27
  * The keys are serialized versions of the used queries (i.e., the result of `JSON.stringify`).
28
28
  * This implies that multiple slice queries with the same query configuration will _not_ be re-executed.
@@ -1,4 +1,4 @@
1
- import type { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
1
+ import { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
2
2
  import type { ReadonlyFlowrAnalysisProvider } from '../project/flowr-analyzer';
3
3
  import { SlicingCriterion } from '../slicing/criterion/parse';
4
4
  /** A query that may restrict the functions it inspects to a set of slicing criteria. */
@@ -10,12 +10,18 @@ interface FunctionFilteringQuery {
10
10
  */
11
11
  export declare const QueryFunctionFilter: {
12
12
  readonly name: "QueryFunctionFilter";
13
+ /**
14
+ * Whether the definition is one the analyzed code writes. A deferred expression (`on.exit` and its
15
+ * relatives) is wrapped in a definition of its own, which carries an id no node of the ast does, and
16
+ * nobody asks about a function they never wrote.
17
+ */
18
+ readonly written: (this: void, id: NodeId) => boolean;
13
19
  /** The ids the given queries restrict themselves to; empty if at least one query wants all functions. */
14
20
  readonly criteria: (this: void, queries: readonly FunctionFilteringQuery[], analyzer: ReadonlyFlowrAnalysisProvider) => Promise<ReadonlySet<NodeId>>;
15
21
  /** The call graph together with the functions the given queries want to inspect. */
16
22
  readonly inCallGraph: (this: void, queries: readonly FunctionFilteringQuery[], analyzer: ReadonlyFlowrAnalysisProvider, onlyDefinitions?: boolean) => Promise<{
17
23
  cg: import("../dataflow/graph/call-graph").CallGraph;
18
- fns: MapIterator<[NodeId, Required<import("../dataflow/graph/vertex").DataflowGraphVertexFunctionCall | import("../dataflow/graph/vertex").DataflowGraphVertexFunctionDefinition>]>;
24
+ fns: IteratorObject<[NodeId, Required<import("../dataflow/graph/vertex").DataflowGraphVertexFunctionDefinition | import("../dataflow/graph/vertex").DataflowGraphVertexFunctionCall>], undefined, unknown>;
19
25
  }>;
20
26
  };
21
27
  export {};
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.QueryFunctionFilter = void 0;
4
+ const node_id_1 = require("../r-bridge/lang-4.x/ast/model/processing/node-id");
4
5
  const parse_1 = require("../slicing/criterion/parse");
5
6
  const vertex_1 = require("../dataflow/graph/vertex");
6
7
  /**
@@ -8,6 +9,14 @@ const vertex_1 = require("../dataflow/graph/vertex");
8
9
  */
9
10
  exports.QueryFunctionFilter = {
10
11
  name: 'QueryFunctionFilter',
12
+ /**
13
+ * Whether the definition is one the analyzed code writes. A deferred expression (`on.exit` and its
14
+ * relatives) is wrapped in a definition of its own, which carries an id no node of the ast does, and
15
+ * nobody asks about a function they never wrote.
16
+ */
17
+ written(id) {
18
+ return typeof node_id_1.NodeId.normalize(id) === 'number';
19
+ },
11
20
  /** The ids the given queries restrict themselves to; empty if at least one query wants all functions. */
12
21
  async criteria(queries, analyzer) {
13
22
  let filters = undefined;
@@ -38,7 +47,8 @@ exports.QueryFunctionFilter = {
38
47
  async inCallGraph(queries, analyzer, onlyDefinitions = true) {
39
48
  const filterFor = await exports.QueryFunctionFilter.criteria(queries, analyzer);
40
49
  const cg = await analyzer.callGraph();
41
- let fns = (onlyDefinitions || filterFor.size === 0 ? cg.verticesOfType(vertex_1.VertexType.FunctionDefinition) : cg.vertices(true));
50
+ let fns = (onlyDefinitions || filterFor.size === 0 ? cg.verticesOfType(vertex_1.VertexType.FunctionDefinition) : cg.vertices(true))
51
+ .filter(([id]) => exports.QueryFunctionFilter.written(id));
42
52
  if (filterFor.size > 0) {
43
53
  fns = fns.filter(([id]) => filterFor.has(id));
44
54
  }
@@ -31,6 +31,7 @@ import type { CommandCompletions } from '../cli/repl/core';
31
31
  import type { FilesQuery } from './catalog/files-query/files-query-format';
32
32
  import type { CallGraphQuery } from './catalog/call-graph-query/call-graph-query-format';
33
33
  import type { InspectRecursionQuery } from './catalog/inspect-recursion-query/inspect-recursion-query-format';
34
+ import type { InspectStrictnessQuery } from './catalog/inspect-strictness-query/inspect-strictness-query-format';
34
35
  import type { DoesCallQuery } from './catalog/does-call-query/does-call-query-format';
35
36
  import type { InspectExceptionQuery } from './catalog/inspect-exceptions-query/inspect-exception-query-format';
36
37
  import type { InputSourcesQuery } from './catalog/input-sources-query/input-sources-query-format';
@@ -42,7 +43,7 @@ import { type AbsintQuery } from './catalog/absint-query/absint-query-format';
42
43
  /**
43
44
  * These are all queries that can be executed from within flowR
44
45
  */
45
- export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | DoesCallQuery | CallGraphQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | AbsintQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectExceptionQuery | InspectHigherOrderQuery | InspectRecursionQuery | ResolveValueQuery | ProjectQuery | SignatureQuery | OriginQuery | LinterQuery | ProvenanceQuery | InputSourcesQuery | DiceQuery | GuessDepVersionsQuery;
46
+ export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | DoesCallQuery | CallGraphQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | AbsintQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectExceptionQuery | InspectHigherOrderQuery | InspectRecursionQuery | InspectStrictnessQuery | ResolveValueQuery | ProjectQuery | SignatureQuery | OriginQuery | LinterQuery | ProvenanceQuery | InputSourcesQuery | DiceQuery | GuessDepVersionsQuery;
46
47
  export type QueryArgumentsWithType<QueryType extends BaseQueryFormat['type']> = Query & {
47
48
  type: QueryType;
48
49
  };
@@ -266,6 +267,15 @@ export declare const SupportedQueries: {
266
267
  readonly schema: Joi.ObjectSchema<any>;
267
268
  readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
268
269
  };
270
+ readonly 'inspect-strictness': {
271
+ readonly title: "Inspect Strict Functions Query";
272
+ readonly executor: typeof import("./catalog/inspect-strictness-query/inspect-strictness-query-executor").executeStrictnessQuery;
273
+ readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
274
+ readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-strictness">;
275
+ readonly syntax: "@inspect-strictness [(<crit>;...)] <code | file://path>";
276
+ readonly schema: Joi.ObjectSchema<any>;
277
+ readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
278
+ };
269
279
  readonly 'resolve-value': {
270
280
  readonly title: "Resolve Value Query";
271
281
  readonly executor: typeof import("./catalog/resolve-value-query/resolve-value-query-executor").executeResolveValueQuery;
package/queries/query.js CHANGED
@@ -40,6 +40,7 @@ const fs_1 = __importDefault(require("fs"));
40
40
  const files_query_format_1 = require("./catalog/files-query/files-query-format");
41
41
  const call_graph_query_format_1 = require("./catalog/call-graph-query/call-graph-query-format");
42
42
  const inspect_recursion_query_format_1 = require("./catalog/inspect-recursion-query/inspect-recursion-query-format");
43
+ const inspect_strictness_query_format_1 = require("./catalog/inspect-strictness-query/inspect-strictness-query-format");
43
44
  const does_call_query_format_1 = require("./catalog/does-call-query/does-call-query-format");
44
45
  const inspect_exception_query_format_1 = require("./catalog/inspect-exceptions-query/inspect-exception-query-format");
45
46
  const input_sources_query_format_1 = require("./catalog/input-sources-query/input-sources-query-format");
@@ -70,6 +71,7 @@ exports.SupportedQueries = {
70
71
  'inspect-exception': inspect_exception_query_format_1.InspectExceptionQueryDefinition,
71
72
  'inspect-higher-order': inspect_higher_order_query_format_1.InspectHigherOrderQueryDefinition,
72
73
  'inspect-recursion': inspect_recursion_query_format_1.InspectRecursionQueryDefinition,
74
+ 'inspect-strictness': inspect_strictness_query_format_1.InspectStrictnessQueryDefinition,
73
75
  'resolve-value': resolve_value_query_format_1.ResolveValueQueryDefinition,
74
76
  'project': project_query_format_1.ProjectQueryDefinition,
75
77
  'signature': signature_query_format_1.SignatureQueryDefinition,
@@ -116,7 +116,7 @@ export declare const RConstant: {
116
116
  */
117
117
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RConstant<Info>;
118
118
  /**
119
- * A set of all types of constants in the normalized AST, i.e. number, string and logical constants.
119
+ * A set of all types of constants in the normalized AST, i.e. number, string, and logical constants.
120
120
  */
121
121
  readonly constantTypes: ReadonlySet<RType>;
122
122
  };
@@ -126,7 +126,7 @@ export declare const RConstant: {
126
126
  */
127
127
  export type RSingleNode<Info> = RComment<Info> | RSymbol<Info> | RConstant<Info> | RBreak<Info> | RNext<Info> | RLineDirective<Info>;
128
128
  /**
129
- * Represents a leaf node in the normalized AST, i.e. a node that does not have any children. This includes comment, symbol, constant, break, next and line directive nodes.
129
+ * Represents a leaf node in the normalized AST, i.e. a node that does not have any children. This includes comment, symbol, constant, break, next, and line directive nodes.
130
130
  */
131
131
  export declare const RSingleNode: {
132
132
  readonly name: "RSingleNode";
@@ -136,7 +136,7 @@ export declare const RSingleNode: {
136
136
  */
137
137
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RSingleNode<Info>;
138
138
  /**
139
- * A set of all types of single nodes in the normalized AST, i.e. comment, symbol, constant, break, next and line directive nodes.
139
+ * A set of all types of single nodes in the normalized AST, i.e. comment, symbol, constant, break, next, and line directive nodes.
140
140
  */
141
141
  readonly singleNodeTypes: ReadonlySet<RType>;
142
142
  };
@@ -186,7 +186,7 @@ export declare const RFunctions: {
186
186
  */
187
187
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RFunctions<Info>;
188
188
  /**
189
- * A set of all types of function-related nodes in the normalized AST, i.e. function definitions, function calls, parameters and arguments.
189
+ * A set of all types of function-related nodes in the normalized AST, i.e. function definitions, function calls, parameters, and arguments.
190
190
  */
191
191
  readonly functionTypes: ReadonlySet<RType>;
192
192
  };
@@ -25,12 +25,12 @@ exports.RConstant = {
25
25
  return t === type_1.RType.Number || t === type_1.RType.String || t === type_1.RType.Logical;
26
26
  },
27
27
  /**
28
- * A set of all types of constants in the normalized AST, i.e. number, string and logical constants.
28
+ * A set of all types of constants in the normalized AST, i.e. number, string, and logical constants.
29
29
  */
30
30
  constantTypes: new Set([type_1.RType.Number, type_1.RType.String, type_1.RType.Logical])
31
31
  };
32
32
  /**
33
- * Represents a leaf node in the normalized AST, i.e. a node that does not have any children. This includes comment, symbol, constant, break, next and line directive nodes.
33
+ * Represents a leaf node in the normalized AST, i.e. a node that does not have any children. This includes comment, symbol, constant, break, next, and line directive nodes.
34
34
  */
35
35
  exports.RSingleNode = {
36
36
  name: 'RSingleNode',
@@ -46,7 +46,7 @@ exports.RSingleNode = {
46
46
  return t === type_1.RType.Comment || t === type_1.RType.Symbol || exports.RConstant.constantTypes.has(t) || t === type_1.RType.Break || t === type_1.RType.Next || t === type_1.RType.LineDirective;
47
47
  },
48
48
  /**
49
- * A set of all types of single nodes in the normalized AST, i.e. comment, symbol, constant, break, next and line directive nodes.
49
+ * A set of all types of single nodes in the normalized AST, i.e. comment, symbol, constant, break, next, and line directive nodes.
50
50
  */
51
51
  singleNodeTypes: new Set([type_1.RType.Comment, type_1.RType.Symbol, type_1.RType.Break, type_1.RType.Next, type_1.RType.LineDirective, ...exports.RConstant.constantTypes])
52
52
  };
@@ -100,7 +100,7 @@ exports.RFunctions = {
100
100
  return t === type_1.RType.FunctionDefinition || t === type_1.RType.FunctionCall || t === type_1.RType.Parameter || t === type_1.RType.Argument;
101
101
  },
102
102
  /**
103
- * A set of all types of function-related nodes in the normalized AST, i.e. function definitions, function calls, parameters and arguments.
103
+ * A set of all types of function-related nodes in the normalized AST, i.e. function definitions, function calls, parameters, and arguments.
104
104
  */
105
105
  functionTypes: new Set([type_1.RType.FunctionDefinition, type_1.RType.FunctionCall, type_1.RType.Parameter, type_1.RType.Argument])
106
106
  };
@@ -18,6 +18,7 @@ export declare const RDelimiter: {
18
18
  readonly name: "RDelimiter";
19
19
  /**
20
20
  * Type guard for {@link RDelimiter} nodes.
21
+ * @lintIgnore node-is node-is-optional
21
22
  */
22
23
  readonly is: (this: void, node: unknown) => node is RDelimiter;
23
24
  };
@@ -9,6 +9,7 @@ exports.RDelimiter = {
9
9
  name: 'RDelimiter',
10
10
  /**
11
11
  * Type guard for {@link RDelimiter} nodes.
12
+ * @lintIgnore node-is node-is-optional
12
13
  */
13
14
  is(node) {
14
15
  return typeof node === 'object' && node !== null && 'type' in node && node.type === type_1.RType.Delimiter;
@@ -33,6 +33,7 @@ export declare const RAccess: {
33
33
  readonly name: "RAccess";
34
34
  /**
35
35
  * Type guard for {@link RAccess} nodes.
36
+ * @lintIgnore node-is node-is-optional
36
37
  */
37
38
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RAccess<Info>;
38
39
  /**
@@ -11,6 +11,7 @@ exports.RAccess = {
11
11
  name: 'RAccess',
12
12
  /**
13
13
  * Type guard for {@link RAccess} nodes.
14
+ * @lintIgnore node-is node-is-optional
14
15
  */
15
16
  is(node) {
16
17
  return node?.type === type_1.RType.Access;
@@ -31,6 +31,7 @@ export declare const RArgument: {
31
31
  /**
32
32
  * Type guard for {@link RArgument} nodes.
33
33
  * @see {@link RArgument.isUnnamed} - to check whether an argument is unnamed
34
+ * @lintIgnore node-is node-is-optional
34
35
  */
35
36
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RArgument<Info>;
36
37
  /**
@@ -39,8 +40,10 @@ export declare const RArgument: {
39
40
  readonly isEmpty: <Info = object>(this: void, node: RNode<Info> | typeof EmptyArgument | undefined) => node is typeof EmptyArgument;
40
41
  /**
41
42
  * Type guard for arguments that are _not_ empty, i.e. _not_ {@link EmptyArgument}.
43
+ * It only removes the marker, it does not claim the rest is an {@link RArgument}.
44
+ * @see {@link RArgument.is} - to additionally check that the node is an argument
42
45
  */
43
- readonly isNotEmpty: <Info = object>(this: void, node: RNode<Info> | typeof EmptyArgument | undefined) => node is RArgument<Info>;
46
+ readonly isNotEmpty: <T>(this: void, node: T) => node is Exclude<T, typeof EmptyArgument>;
44
47
  /**
45
48
  * Type guard for named arguments, i.e. arguments with a name.
46
49
  */
@@ -13,6 +13,7 @@ exports.RArgument = {
13
13
  /**
14
14
  * Type guard for {@link RArgument} nodes.
15
15
  * @see {@link RArgument.isUnnamed} - to check whether an argument is unnamed
16
+ * @lintIgnore node-is node-is-optional
16
17
  */
17
18
  is(node) {
18
19
  return node?.type === type_1.RType.Argument;
@@ -25,9 +26,11 @@ exports.RArgument = {
25
26
  },
26
27
  /**
27
28
  * Type guard for arguments that are _not_ empty, i.e. _not_ {@link EmptyArgument}.
29
+ * It only removes the marker, it does not claim the rest is an {@link RArgument}.
30
+ * @see {@link RArgument.is} - to additionally check that the node is an argument
28
31
  */
29
32
  isNotEmpty(node) {
30
- return node !== r_function_call_1.EmptyArgument && exports.RArgument.is(node);
33
+ return node !== r_function_call_1.EmptyArgument;
31
34
  },
32
35
  /**
33
36
  * Type guard for named arguments, i.e. arguments with a name.
@@ -52,7 +55,7 @@ exports.RArgument = {
52
55
  return undefined;
53
56
  }
54
57
  for (const arg of args) {
55
- if (arg === r_function_call_1.EmptyArgument) {
58
+ if (exports.RArgument.isEmpty(arg)) {
56
59
  continue;
57
60
  }
58
61
  if (arg.info.id === id) {
@@ -18,6 +18,7 @@ export declare const RBinaryOp: {
18
18
  readonly name: "RBinaryOp";
19
19
  /**
20
20
  * Type guard for {@link RBinaryOp} nodes.
21
+ * @lintIgnore node-is node-is-optional
21
22
  */
22
23
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RBinaryOp<Info>;
23
24
  /**
@@ -12,6 +12,7 @@ exports.RBinaryOp = {
12
12
  name: 'RBinaryOp',
13
13
  /**
14
14
  * Type guard for {@link RBinaryOp} nodes.
15
+ * @lintIgnore node-is node-is-optional
15
16
  */
16
17
  is(node) {
17
18
  return node?.type === type_1.RType.BinaryOp;
@@ -14,6 +14,7 @@ export declare const RBreak: {
14
14
  readonly name: "RBreak";
15
15
  /**
16
16
  * Type guard for {@link RBreak} nodes.
17
+ * @lintIgnore node-is node-is-optional
17
18
  */
18
19
  readonly is: <Info = object>(this: void, node: unknown) => node is RBreak<Info>;
19
20
  readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
@@ -11,6 +11,7 @@ exports.RBreak = {
11
11
  name: 'RBreak',
12
12
  /**
13
13
  * Type guard for {@link RBreak} nodes.
14
+ * @lintIgnore node-is node-is-optional
14
15
  */
15
16
  is(node) {
16
17
  return typeof node === 'object' && node !== null && node.type === type_1.RType.Break;
@@ -16,6 +16,7 @@ export declare const RComment: {
16
16
  readonly name: "RComment";
17
17
  /**
18
18
  * Type guard for {@link RComment} nodes.
19
+ * @lintIgnore node-is node-is-optional
19
20
  */
20
21
  readonly is: <Info = object>(this: void, node: unknown) => node is RComment<Info>;
21
22
  readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
@@ -11,6 +11,7 @@ exports.RComment = {
11
11
  name: 'RComment',
12
12
  /**
13
13
  * Type guard for {@link RComment} nodes.
14
+ * @lintIgnore node-is node-is-optional
14
15
  */
15
16
  is(node) {
16
17
  return typeof node === 'object' && node !== null && node.type === type_1.RType.Comment;
@@ -18,6 +18,7 @@ export declare const RExpressionList: {
18
18
  readonly name: "RExpressionList";
19
19
  /**
20
20
  * Type guard for {@link RExpressionList} nodes.
21
+ * @lintIgnore node-is node-is-optional
21
22
  */
22
23
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RExpressionList<Info>;
23
24
  /**
@@ -11,6 +11,7 @@ exports.RExpressionList = {
11
11
  name: 'RExpressionList',
12
12
  /**
13
13
  * Type guard for {@link RExpressionList} nodes.
14
+ * @lintIgnore node-is node-is-optional
14
15
  */
15
16
  is(node) {
16
17
  return node?.type === type_1.RType.ExpressionList;
@@ -24,6 +24,7 @@ export declare const RForLoop: {
24
24
  readonly name: "RForLoop";
25
25
  /**
26
26
  * Type guard for RForLoop nodes.
27
+ * @lintIgnore node-is node-is-optional
27
28
  */
28
29
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RForLoop<Info>;
29
30
  readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
@@ -11,6 +11,7 @@ exports.RForLoop = {
11
11
  name: 'RForLoop',
12
12
  /**
13
13
  * Type guard for RForLoop nodes.
14
+ * @lintIgnore node-is node-is-optional
14
15
  */
15
16
  is(node) {
16
17
  return node?.type === type_1.RType.ForLoop;
@@ -37,6 +37,7 @@ export declare const RFunctionCall: {
37
37
  readonly name: "RFunctionCall";
38
38
  /**
39
39
  * Type guard for {@link RFunctionCall} nodes.
40
+ * @lintIgnore node-is node-is-optional
40
41
  */
41
42
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RFunctionCall<Info>;
42
43
  /**
@@ -48,10 +49,11 @@ export declare const RFunctionCall: {
48
49
  */
49
50
  readonly isUnnamed: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RUnnamedFunctionCall<Info>;
50
51
  /**
51
- * Bind a call's `arguments` to the formal `paramNames` with {@link matchArgumentsToParameters}, R's argument
52
- * matching. Returns a map from parameter name to the argument bound to it, so
53
- * `matchArgsToParams(call.arguments, names).get('X')` answers "which argument is mapped to parameter `X`".
54
- * An empty argument (`f(1, ,3)`) takes its formal but never appears in the map, as there is nothing to bind.
52
+ * Bind a call's `arguments` to the formal `paramNames`, R's argument matching.
53
+ *
54
+ * Kept here rather than forwarding to {@link MatchArgs.toNames}: this module is loaded before the dataflow
55
+ * layer exists, so importing the wall from here would drag it into the AST model at load time.
56
+ * @useInstead {@link MatchArgs.toNames}
55
57
  */
56
58
  readonly matchArgsToParams: <Info = object>(this: void, args: readonly PotentiallyEmptyRArgument<Info>[], paramNames: readonly string[]) => ReadonlyMap<string, RArgument<Info>>;
57
59
  /** The one argument a call was given, `undefined` unless there is exactly one and it is not empty. */
@@ -13,6 +13,7 @@ exports.RFunctionCall = {
13
13
  name: 'RFunctionCall',
14
14
  /**
15
15
  * Type guard for {@link RFunctionCall} nodes.
16
+ * @lintIgnore node-is node-is-optional
16
17
  */
17
18
  is(node) {
18
19
  return node?.type === type_1.RType.FunctionCall;
@@ -30,10 +31,11 @@ exports.RFunctionCall = {
30
31
  return exports.RFunctionCall.is(node) && !node.named;
31
32
  },
32
33
  /**
33
- * Bind a call's `arguments` to the formal `paramNames` with {@link matchArgumentsToParameters}, R's argument
34
- * matching. Returns a map from parameter name to the argument bound to it, so
35
- * `matchArgsToParams(call.arguments, names).get('X')` answers "which argument is mapped to parameter `X`".
36
- * An empty argument (`f(1, ,3)`) takes its formal but never appears in the map, as there is nothing to bind.
34
+ * Bind a call's `arguments` to the formal `paramNames`, R's argument matching.
35
+ *
36
+ * Kept here rather than forwarding to {@link MatchArgs.toNames}: this module is loaded before the dataflow
37
+ * layer exists, so importing the wall from here would drag it into the AST model at load time.
38
+ * @useInstead {@link MatchArgs.toNames}
37
39
  */
38
40
  matchArgsToParams(args, paramNames) {
39
41
  const matched = (0, arg_matching_1.matchArgumentsToParameters)(args.map(a => a === exports.EmptyArgument ? undefined : a.name?.content), paramNames);
@@ -25,6 +25,7 @@ export declare const RFunctionDefinition: {
25
25
  readonly name: "RFunctionDefinition";
26
26
  /**
27
27
  * Type guard for {@link RFunctionDefinition} nodes.
28
+ * @lintIgnore node-is node-is-optional
28
29
  */
29
30
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RFunctionDefinition<Info>;
30
31
  /**
@@ -11,6 +11,7 @@ exports.RFunctionDefinition = {
11
11
  name: 'RFunctionDefinition',
12
12
  /**
13
13
  * Type guard for {@link RFunctionDefinition} nodes.
14
+ * @lintIgnore node-is node-is-optional
14
15
  */
15
16
  is(node) {
16
17
  return node?.type === type_1.RType.FunctionDefinition;
@@ -20,6 +20,7 @@ export declare const RIfThenElse: {
20
20
  readonly name: "RIfThenElse";
21
21
  /**
22
22
  * Type guard for {@link RIfThenElse} nodes.
23
+ * @lintIgnore node-is node-is-optional
23
24
  */
24
25
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RIfThenElse<Info>;
25
26
  readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
@@ -11,6 +11,7 @@ exports.RIfThenElse = {
11
11
  name: 'RIfThenElse',
12
12
  /**
13
13
  * Type guard for {@link RIfThenElse} nodes.
14
+ * @lintIgnore node-is node-is-optional
14
15
  */
15
16
  is(node) {
16
17
  return node?.type === type_1.RType.IfThenElse;
@@ -16,6 +16,7 @@ export declare const RLineDirective: {
16
16
  readonly name: "RLineDirective";
17
17
  /**
18
18
  * Type guard for {@link RLineDirective} nodes.
19
+ * @lintIgnore node-is node-is-optional
19
20
  */
20
21
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RLineDirective<Info>;
21
22
  readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
@@ -11,6 +11,7 @@ exports.RLineDirective = {
11
11
  name: 'RLineDirective',
12
12
  /**
13
13
  * Type guard for {@link RLineDirective} nodes.
14
+ * @lintIgnore node-is node-is-optional
14
15
  */
15
16
  is(node) {
16
17
  return node?.type === type_1.RType.LineDirective;
@@ -16,6 +16,7 @@ export declare const RLogical: {
16
16
  readonly name: "RLogical";
17
17
  /**
18
18
  * Type guard for {@link RLogical} nodes.
19
+ * @lintIgnore node-is node-is-optional
19
20
  */
20
21
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RLogical<Info>;
21
22
  /**
@@ -11,6 +11,7 @@ exports.RLogical = {
11
11
  name: 'RLogical',
12
12
  /**
13
13
  * Type guard for {@link RLogical} nodes.
14
+ * @lintIgnore node-is node-is-optional
14
15
  */
15
16
  is(node) {
16
17
  return node?.type === type_1.RType.Logical;
@@ -14,6 +14,7 @@ export declare const RNext: {
14
14
  readonly name: "RNext";
15
15
  /**
16
16
  * Type guard for {@link RNext} nodes.
17
+ * @lintIgnore node-is node-is-optional
17
18
  */
18
19
  readonly is: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RNext<Info>;
19
20
  readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
@@ -11,6 +11,7 @@ exports.RNext = {
11
11
  name: 'RNext',
12
12
  /**
13
13
  * Type guard for {@link RNext} nodes.
14
+ * @lintIgnore node-is node-is-optional
14
15
  */
15
16
  is(node) {
16
17
  return node?.type === type_1.RType.Next;