tools/pas2c/PascalUnitSyntaxTree.hs
changeset 10129 cd2a64a1f4aa
parent 10120 b7f632c12784
child 10142 adb804cb2638
equal deleted inserted replaced
10128:0f6878b5395a 10129:cd2a64a1f4aa
    14     deriving Show
    14     deriving Show
    15 data TypesAndVars = TypesAndVars [TypeVarDeclaration]
    15 data TypesAndVars = TypesAndVars [TypeVarDeclaration]
    16     deriving Show
    16     deriving Show
    17 data TypeVarDeclaration = TypeDeclaration Identifier TypeDecl
    17 data TypeVarDeclaration = TypeDeclaration Identifier TypeDecl
    18     | VarDeclaration Bool Bool ([Identifier], TypeDecl) (Maybe InitExpression)
    18     | VarDeclaration Bool Bool ([Identifier], TypeDecl) (Maybe InitExpression)
    19     | FunctionDeclaration Identifier Bool Bool TypeDecl [TypeVarDeclaration] (Maybe (TypesAndVars, Phrase))
    19     | FunctionDeclaration Identifier Bool Bool Bool TypeDecl [TypeVarDeclaration] (Maybe (TypesAndVars, Phrase))
    20     | OperatorDeclaration String Identifier Bool TypeDecl [TypeVarDeclaration] (Maybe (TypesAndVars, Phrase))
    20     | OperatorDeclaration String Identifier Bool TypeDecl [TypeVarDeclaration] (Maybe (TypesAndVars, Phrase))
    21     deriving Show
    21     deriving Show
    22 data TypeDecl = SimpleType Identifier
    22 data TypeDecl = SimpleType Identifier
    23     | RangeType Range
    23     | RangeType Range
    24     | Sequence [Identifier]
    24     | Sequence [Identifier]
   105     | BTInt Bool -- second param indicates whether signed or not
   105     | BTInt Bool -- second param indicates whether signed or not
   106     | BTBool
   106     | BTBool
   107     | BTFloat
   107     | BTFloat
   108     | BTRecord String [(String, BaseType)]
   108     | BTRecord String [(String, BaseType)]
   109     | BTArray Range BaseType BaseType
   109     | BTArray Range BaseType BaseType
   110     | BTFunction Bool [(Bool, BaseType)] BaseType -- (Bool, BaseType), Bool indiciates whether var or not
   110     | BTFunction Bool Bool [(Bool, BaseType)] BaseType -- in (Bool, BaseType), Bool indiciates whether var or not
   111     | BTPointerTo BaseType
   111     | BTPointerTo BaseType
   112     | BTUnresolved String
   112     | BTUnresolved String
   113     | BTSet BaseType
   113     | BTSet BaseType
   114     | BTEnum [String]
   114     | BTEnum [String]
   115     | BTVoid
   115     | BTVoid