etamoo

Safe HaskellNone
LanguageHaskell2010

MOO.Unparser

Description

Recovering MOO code from an abstract syntax tree for the verb_code() built-in function

Synopsis

Documentation

unparse Source

Arguments

:: Bool

fully-paren

-> Bool

indent

-> Program 
-> Text 

Synthesize the MOO code corresponding to the given abstract syntax tree. If fully-paren is true, all expressions are fully parenthesized, even when unnecessary given the circumstances of precedence. If indent is true, the resulting MOO code will be indented with spaces as appropriate to show the nesting structure of statements.

The MOO code is returned as a single lazy Text value containing embedded newline characters.