spoofax_prop/trans/analysis.str

30 lines
821 B
Plaintext
Raw Normal View History

module analysis
imports
nabl2/api
nabl2/runtime
nabl2/shared/-
statics
pp
rules // Analysis
// editor-analyze = nabl2-analyze(id)
strip-indices : AnalysisResult([(r,Full(y,a,l,m,n))]) -> AnalysisResult([(r,Full(<nabl2--erase-ast-indices>y,a,l,m,n))])
editor-analyze = nabl2-analyze(id); strip-indices
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 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