tools/PascalUnitSyntaxTree.hs
changeset 7429 fcf13e40d6b6
parent 7333 520a16a14747
child 7513 39866eb9e4a6
equal deleted inserted replaced
7426:55b49cc1f33a 7429:fcf13e40d6b6
     5 
     5 
     6 data PascalUnit =
     6 data PascalUnit =
     7     Program Identifier Implementation Phrase
     7     Program Identifier Implementation Phrase
     8     | Unit Identifier Interface Implementation (Maybe Initialize) (Maybe Finalize)
     8     | Unit Identifier Interface Implementation (Maybe Initialize) (Maybe Finalize)
     9     | System [TypeVarDeclaration]
     9     | System [TypeVarDeclaration]
       
    10     | Redo [TypeVarDeclaration]
    10     deriving Show
    11     deriving Show
    11 data Interface = Interface Uses TypesAndVars
    12 data Interface = Interface Uses TypesAndVars
    12     deriving Show
    13     deriving Show
    13 data Implementation = Implementation Uses TypesAndVars
    14 data Implementation = Implementation Uses TypesAndVars
    14     deriving Show
    15     deriving Show
    46     deriving Show
    47     deriving Show
    47 data Phrase = ProcCall Reference [Expression]
    48 data Phrase = ProcCall Reference [Expression]
    48         | IfThenElse Expression Phrase (Maybe Phrase)
    49         | IfThenElse Expression Phrase (Maybe Phrase)
    49         | WhileCycle Expression Phrase
    50         | WhileCycle Expression Phrase
    50         | RepeatCycle Expression [Phrase]
    51         | RepeatCycle Expression [Phrase]
    51         | ForCycle Identifier Expression Expression Phrase
    52         | ForCycle Identifier Expression Expression Phrase Bool -- The last Boolean indicates wether it's up or down counting
    52         | WithBlock Reference Phrase
    53         | WithBlock Reference Phrase
    53         | Phrases [Phrase]
    54         | Phrases [Phrase]
    54         | SwitchCase Expression [([InitExpression], Phrase)] (Maybe [Phrase])
    55         | SwitchCase Expression [([InitExpression], Phrase)] (Maybe [Phrase])
    55         | Assignment Reference Expression
    56         | Assignment Reference Expression
    56         | BuiltInFunctionCall [Expression] Reference
    57         | BuiltInFunctionCall [Expression] Reference