init commit again

This commit is contained in:
Peter
2023-11-01 09:24:46 +01:00
commit 42da98a132
34 changed files with 1786 additions and 0 deletions

52
IBAF-Editor/trans/pp.str Normal file
View File

@@ -0,0 +1,52 @@
module pp
imports
libstratego-lib
imports
libstratego-gpp
libspoofax/sdf/pp
libspoofax/editor/refactoring/-
pp/IBAF-parenthesize
pp/IBAF-pp
rules
editor-format:
(node, _, ast, path, project-path) -> (filename, result)
with
ext := <get-extension> path
; filename := <guarantee-extension(|$[pp.[ext]])> path
; result := <pp-debug> node
rules
pp-IBAF-string =
parenthesize-IBAF
; prettyprint-IBAF-start-symbols
; !V([], <id>)
; box2text-string(|120)
pp-partial-IBAF-string =
parenthesize-IBAF
; prettyprint-IBAF
; !V([], <id>)
; box2text-string(|120)
pp-partial-IBAF-string(|sort) =
parenthesize-IBAF
; prettyprint-IBAF(|sort)
; !V([], <id>)
; box2text-string(|120)
pp-debug :
ast -> result
with
result := <pp-IBAF-string> ast
<+ <bottomup(try(not(is-string); not(is-list); not(pp-IBAF-string); debug(!"cannot pp ")))> ast
; result := ""
rules
construct-textual-change = construct-textual-change(pp-partial-IBAF-string, parenthesize, override-reconstruction, resugar)