spoofax_prop/trans/analysis.str
Glen Whitney 28a3370d03 feat: Add SPT as an alternate means of running Stratego strategies
Also completed and documented Sec 4.2 of the Stratego
Tutorial/Reference manual
2021-01-16 15:11:47 -08:00

30 lines
821 B
Plaintext

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