Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ast.Types
Synopsis
- data SrcLoc = SrcLoc {}
- data Literal
- data Type
- data AsmConstraint = AsmConstraint {}
- data AsmDialect
- data AsmExpr = AsmExpr {
- asmCode :: String
- asmConstraints :: AsmConstraint
- asmArgs :: [Expr]
- asmParameters :: [Type]
- asmReturnType :: Type
- asmSideEffects :: Bool
- asmAlignStack :: Bool
- asmDialect :: AsmDialect
- data Expr
- = Lit SrcLoc Literal
- | Var SrcLoc String Type
- | Function { }
- | ForeignFunction { }
- | Declaration { }
- | Assignment {
- assignLoc :: SrcLoc
- assignTarget :: Expr
- assignValue :: Expr
- | Call { }
- | If { }
- | While { }
- | From { }
- | Block [Expr]
- | Return SrcLoc (Maybe Expr)
- | Break SrcLoc
- | Continue SrcLoc
- | Op SrcLoc Operation Expr Expr
- | UnaryOp SrcLoc UnaryOperation Expr
- | StructAccess SrcLoc Expr Expr
- | ArrayAccess SrcLoc Expr Expr
- | Cast SrcLoc Type Expr
- | Assembly { }
- data Operation
- data UnaryOperation
- data Program = Program {}
Documentation
Source location for better error reporting
Enhanced literal values including characters and floating-point numbers
Constructors
LInt Integer | |
LFloat Double | |
LDouble Double | |
LChar Char | |
LBool Bool | |
LArray [Literal] | |
LNull | |
LStruct [(String, Literal)] |
Enhanced type system with size information and qualifiers | TInt: Int with bit width (8, 16, 32, 64) | TFloat: 32-bit float | TDouble: 64-bit float | TArray: Array type with optional size | TTypedef: Type aliases
Constructors
TInt Int | |
TFloat | |
TDouble | |
TChar | |
TBoolean | |
TVoid | |
TMutable Type | |
TPointer Type | |
TArray Type (Maybe Int) | |
TFunction | |
Fields
| |
TStruct | |
Fields
| |
TUnion | |
TTypedef String Type | |
TUnknown |
data AsmConstraint Source #
Assembly constraint type
Constructors
AsmConstraint | |
Fields
|
Instances
Show AsmConstraint Source # | |
Defined in Ast.Types Methods showsPrec :: Int -> AsmConstraint -> ShowS # show :: AsmConstraint -> String # showList :: [AsmConstraint] -> ShowS # | |
Eq AsmConstraint Source # | |
Defined in Ast.Types Methods (==) :: AsmConstraint -> AsmConstraint -> Bool # (/=) :: AsmConstraint -> AsmConstraint -> Bool # | |
Ord AsmConstraint Source # | |
Defined in Ast.Types Methods compare :: AsmConstraint -> AsmConstraint -> Ordering # (<) :: AsmConstraint -> AsmConstraint -> Bool # (<=) :: AsmConstraint -> AsmConstraint -> Bool # (>) :: AsmConstraint -> AsmConstraint -> Bool # (>=) :: AsmConstraint -> AsmConstraint -> Bool # max :: AsmConstraint -> AsmConstraint -> AsmConstraint # min :: AsmConstraint -> AsmConstraint -> AsmConstraint # |
data AsmDialect Source #
Assembly dialect
Instances
Show AsmDialect Source # | |
Defined in Ast.Types Methods showsPrec :: Int -> AsmDialect -> ShowS # show :: AsmDialect -> String # showList :: [AsmDialect] -> ShowS # | |
Eq AsmDialect Source # | |
Defined in Ast.Types | |
Ord AsmDialect Source # | |
Defined in Ast.Types Methods compare :: AsmDialect -> AsmDialect -> Ordering # (<) :: AsmDialect -> AsmDialect -> Bool # (<=) :: AsmDialect -> AsmDialect -> Bool # (>) :: AsmDialect -> AsmDialect -> Bool # (>=) :: AsmDialect -> AsmDialect -> Bool # max :: AsmDialect -> AsmDialect -> AsmDialect # min :: AsmDialect -> AsmDialect -> AsmDialect # |
Assembly expression type
Constructors
AsmExpr | |
Fields
|
Enhanced expression nodes | StructAccess: For accessing struct fields | ArrayAccess: For array indexing
Constructors
Enhanced operations including bitwise operations
Instances
Show Operation Source # | |
Eq Operation Source # | |
Ord Operation Source # | |
data UnaryOperation Source #
Unary operations | Not: Logical not | BitNot: Bitwise not | Deref: Pointer dereference | AddrOf: Address-of operator | PreInc: Pre-increment | PreDec: Pre-decrement | PostInc: Post-increment | PostDec: Post-decrement
Instances
Show UnaryOperation Source # | |
Defined in Ast.Types Methods showsPrec :: Int -> UnaryOperation -> ShowS # show :: UnaryOperation -> String # showList :: [UnaryOperation] -> ShowS # | |
Eq UnaryOperation Source # | |
Defined in Ast.Types Methods (==) :: UnaryOperation -> UnaryOperation -> Bool # (/=) :: UnaryOperation -> UnaryOperation -> Bool # | |
Ord UnaryOperation Source # | |
Defined in Ast.Types Methods compare :: UnaryOperation -> UnaryOperation -> Ordering # (<) :: UnaryOperation -> UnaryOperation -> Bool # (<=) :: UnaryOperation -> UnaryOperation -> Bool # (>) :: UnaryOperation -> UnaryOperation -> Bool # (>=) :: UnaryOperation -> UnaryOperation -> Bool # max :: UnaryOperation -> UnaryOperation -> UnaryOperation # min :: UnaryOperation -> UnaryOperation -> UnaryOperation # |
Program representation with global scope information | globals: Global variables and functions | types: Type definitions | sourceFile: Source file name
Constructors
Program | |