etamoo

Safe HaskellNone
LanguageHaskell2010

MOO.AST

Contents

Description

Data structures representing an abstract syntax tree for MOO code

Synopsis

Data Structures

newtype Program Source

Constructors

Program [Statement] 

newtype Then Source

Constructors

Then [Statement] 

Instances

Show Then Source 
VCacheable Then Source 

data ElseIf Source

Constructors

ElseIf !LineNo Expr [Statement] 

newtype Else Source

Constructors

Else [Statement] 

Instances

Show Else Source 
VCacheable Else Source 

newtype Finally Source

Constructors

Finally [Statement] 

Instances

data Codes Source

Constructors

ANY 
Codes [Argument] 

Instances

newtype Default Source

Constructors

Default (Maybe Expr) 

Instances

Utility Functions

isLValue :: Expr -> Bool Source

Can the given expression be used on the left-hand side of an assignment?

precedence :: Expr -> Int Source

Return a precedence value for the given expression, needed by MOO.Unparser to determine whether parentheses are necessary to isolate an expression from its surrounding context.