Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data types for the imperative core AST
- 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
data BinaryOperator Source #
Built-in binary operators
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 #