Copyright | (c) 2018 Nicolas Osborne |
---|---|
License | BSD 3-clauses |
Safe Haskell | Safe |
Ast2Tree
Description
Provide the function to turn an Abstract Syntax Tree into a String coding the
corresponding tree for the dot
unix program.
Exported function
ast2tree :: AST -> [Char] Source #
Return the string describing in dot
language the tree corresponding to
the given AST.
Helper functions
binary2tree :: Int -> AST -> [Char] Source #
Return the part of the string describing a binary node of an AST in the
dot
language.
unary2tree :: Int -> AST -> [Char] Source #
Return the part of the string describing an unary node of an AST in the
dot
language.