fostr/trans/analysis.str
Glen Whitney eaa06e62eb
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build was killed
feat: Allow indented continuation lines
Resolves #2.
2021-02-01 00:29:00 -08:00

47 lines
1.4 KiB
Plaintext

module analysis
imports
statixruntime
statix/api
pp
injections/-
libspoofax/term/origin
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 = 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: (selected, _, _, path, project-path) -> (filename, result)
with filename := <guarantee-extension(|"aterm")> path
; result := selected
// Prints the pre-analyzed abstract syntax ATerm of a selection.
debug-show-pre-analyzed: (selected, _, _, path, project-path) -> (filename, result)
with filename := <guarantee-extension(|"pre-analyzed.aterm")> path
; result := <pre-analyze> selected
// Prints the analyzed annotated abstract syntax ATerm of a selection.
debug-show-analyzed: (selected, _, _, path, project-path) -> (filename, result)
with filename := <guarantee-extension(|"analyzed.aterm")> path
; result := selected