Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data types for the imperative core AST
Synopsis
- data UnaryOperator
- = Negate
- | Not
- | BitwiseNot
- | Positive
- | New
- data BinaryOperator
- data AST
- = NumericLiteral (Maybe SourceSpan) (Either Integer Double)
- | StringLiteral (Maybe SourceSpan) PSString
- | BooleanLiteral (Maybe SourceSpan) Bool
- | Unary (Maybe SourceSpan) UnaryOperator AST
- | Binary (Maybe SourceSpan) BinaryOperator AST AST
- | ArrayLiteral (Maybe SourceSpan) [AST]
- | Indexer (Maybe SourceSpan) AST AST
- | ObjectLiteral (Maybe SourceSpan) [(PSString, AST)]
- | Function (Maybe SourceSpan) (Maybe Text) [Text] AST
- | App (Maybe SourceSpan) AST [AST]
- | Var (Maybe SourceSpan) Text
- | Block (Maybe SourceSpan) [AST]
- | VariableIntroduction (Maybe SourceSpan) Text (Maybe AST)
- | Assignment (Maybe SourceSpan) AST AST
- | While (Maybe SourceSpan) AST AST
- | For (Maybe SourceSpan) Text AST AST AST
- | ForIn (Maybe SourceSpan) Text AST AST
- | IfElse (Maybe SourceSpan) AST AST (Maybe AST)
- | Return (Maybe SourceSpan) AST
- | ReturnNoResult (Maybe SourceSpan)
- | Throw (Maybe SourceSpan) AST
- | InstanceOf (Maybe SourceSpan) AST AST
- | Comment (Maybe SourceSpan) [Comment] AST
- withSourceSpan :: SourceSpan -> AST -> AST
- getSourceSpan :: AST -> Maybe SourceSpan
- everywhere :: (AST -> AST) -> AST -> AST
- everywhereTopDown :: (AST -> AST) -> AST -> AST
- everywhereTopDownM :: Monad m => (AST -> m AST) -> AST -> m AST
- everything :: (r -> r -> r) -> (AST -> r) -> AST -> r
Documentation
data UnaryOperator Source #
Built-in unary operators
Instances
Eq UnaryOperator Source # | |
Defined in Language.PureScript.CoreImp.AST (==) :: UnaryOperator -> UnaryOperator -> Bool # (/=) :: UnaryOperator -> UnaryOperator -> Bool # | |
Show UnaryOperator Source # | |
Defined in Language.PureScript.CoreImp.AST showsPrec :: Int -> UnaryOperator -> ShowS # show :: UnaryOperator -> String # showList :: [UnaryOperator] -> ShowS # |
data BinaryOperator Source #
Built-in binary operators
Add | |
Subtract | |
Multiply | |
Divide | |
Modulus | |
EqualTo | |
NotEqualTo | |
LessThan | |
LessThanOrEqualTo | |
GreaterThan | |
GreaterThanOrEqualTo | |
And | |
Or | |
BitwiseAnd | |
BitwiseOr | |
BitwiseXor | |
ShiftLeft | |
ShiftRight | |
ZeroFillShiftRight |
Instances
Eq BinaryOperator Source # | |
Defined in Language.PureScript.CoreImp.AST (==) :: BinaryOperator -> BinaryOperator -> Bool # (/=) :: BinaryOperator -> BinaryOperator -> Bool # | |
Show BinaryOperator Source # | |
Defined in Language.PureScript.CoreImp.AST showsPrec :: Int -> BinaryOperator -> ShowS # show :: BinaryOperator -> String # showList :: [BinaryOperator] -> ShowS # |
Data type for simplified JavaScript expressions
withSourceSpan :: SourceSpan -> AST -> AST Source #
getSourceSpan :: AST -> Maybe SourceSpan Source #
everything :: (r -> r -> r) -> (AST -> r) -> AST -> r Source #