fostr/trans/analysis.str
Glen Whitney b9c8532899
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
feat: Allow expressions to be terminated/sequenced by ;
Note that ultimately a terminated sequence may have
   a slightly different semantics (applying streams
   to `_|_`, most likely) but for now they don't.
2021-02-10 12:47:34 -08:00

54 lines
1.6 KiB
Plaintext

module analysis
imports
statixruntime
statix/api
pp
injections/-
libspoofax/term/origin
desugar
rules // Analysis
// single-file analysis
editor-analyze = stx-editor-analyze(pre-analyze, post-analyze|"statics", "programOk")
// see docs/implementation.md for details on how to switch to multi-file analysis
// multi-file analysis
// editor-analyze = stx-editor-analyze(pre-analyze, post-analyze|"statics", "projectOk", "fileOk")
pre-analyze = desugar-fostr
; origin-track-forced(explicate-injections-fostr-Start)
post-analyze = origin-track-forced(implicate-injections-fostr-Start)
rules // Editor Services
editor-resolve = stx-editor-resolve
editor-hover = stx-editor-hover
rules // Debugging
// Prints the abstract syntax ATerm of a selection.
debug-show-aterm: (sel, _, _, path, projp) -> (filename, result)
with filename := <guarantee-extension(|"aterm")> path
; result := sel
// Prints the desugared abstract syntax ATerm of a selection.
debug-desugar-fostr: (sel, _, _, path, projp) -> (filename, result)
with filename := <guarantee-extension(|"desugared.aterm")> path
; result := <desugar-fostr> sel
// Prints the pre-analyzed abstract syntax ATerm of a selection.
debug-show-pre-analyzed: (sel, _, _, path, projp) -> (filename, result)
with filename := <guarantee-extension(|"pre-analyzed.aterm")> path
; result := <pre-analyze> sel
// Prints the analyzed annotated abstract syntax ATerm of a selection.
debug-show-analyzed: (sel, _, _, path, projp) -> (filename, result)
with filename := <guarantee-extension(|"analyzed.aterm")> path
; result := sel