You can pretty print Stratego abstract syntax with the StrategoXT XTC tools library. The module stratego-xt-xtc-tools
contains a strategy
xtc-pp-astratego
, which is defined as
xtc-pp-astratego = xtc-stratego-ensugar ; xtc-ast2abox(!["Stratego-pretty.pp"]) ; xtc-abox2textYou should prefer this strategy over your own composition because in the future this strategy will solve priority and associativity problems.