lambda Typer

Copyright(c) 2018 Nicolas Osborne
LicenseBSD 3-clauses
Safe HaskellSafe

Ast2Tree

Contents

Description

Provide the function to turn an Abstract Syntax Tree into a String coding the corresponding tree for the dot unix program.

Synopsis

Exported function

ast2tree :: AST -> [Char] Source #

Return the string describing in dot language the tree corresponding to the given AST.

Helper functions

ast2tree' :: Int -> AST -> [Char] Source #

Return the internal description of the AST.

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.

leaf2tree :: Int -> AST -> [Char] Source #

Return the part of the string describing a leaf of an AST in the dot language.

printNode :: Int -> AST -> [Char] Source #

Return the part of the string describing the node label in the description of the given AST in the dot language