purescript-0.3.10.1: PureScript Programming Language Compiler

Safe HaskellSafe-Inferred

Language.PureScript.CodeGen.JS.AST

Description

Data types for the intermediate simplified-Javascript AST

Synopsis

Documentation

data UnaryOperator Source

Built-in unary operators

Constructors

Negate

Numeric negation

Not

Boolean negation

BitwiseNot

Bitwise negation

Positive

Numeric unary 'plus'

data BinaryOperator Source

Built-in binary operators

Constructors

Add

Numeric addition

Subtract

Numeric subtraction

Multiply

Numeric multiplication

Divide

Numeric division

Modulus

Remainder

EqualTo

Generic equality test

NotEqualTo

Generic inequality test

LessThan

Numeric less-than

LessThanOrEqualTo

Numeric less-than-or-equal

GreaterThan

Numeric greater-than

GreaterThanOrEqualTo

Numeric greater-than-or-equal

And

Boolean and

Or

Boolean or

BitwiseAnd

Bitwise and

BitwiseOr

Bitwise or

BitwiseXor

Bitwise xor

ShiftLeft

Bitwise left shift

ShiftRight

Bitwise right shift

ZeroFillShiftRight

Bitwise right shift with zero-fill

data JS Source

Data type for simplified Javascript expressions

Constructors

JSNumericLiteral (Either Integer Double)

A numeric literal

JSStringLiteral String

A string literal

JSBooleanLiteral Bool

A boolean literal

JSUnary UnaryOperator JS

A unary operator application

JSBinary BinaryOperator JS JS

A binary operator application

JSArrayLiteral [JS]

An array literal

JSIndexer JS JS

An array indexer expression

JSObjectLiteral [(String, JS)]

An object literal

JSAccessor String JS

An object property accessor expression

JSFunction (Maybe String) [String] JS

A function introduction (optional name, arguments, body)

JSApp JS [JS]

Function application

JSVar String

Variable

JSConditional JS JS JS

Conditional expression

JSBlock [JS]

A block of expressions in braces

JSVariableIntroduction String (Maybe JS)

A variable introduction and optional initialization

JSAssignment JS JS

A variable assignment

JSWhile JS JS

While loop

JSFor String JS JS JS

For loop

JSIfElse JS JS (Maybe JS)

If-then-else statement

JSReturn JS

Return statement

JSThrow JS

Throw statement

JSTypeOf JS

Type-Of operator

JSLabel String JS

Labelled statement

JSBreak String

Break statement

JSContinue String

Continue statement

JSRaw String

Raw Javascript (generated when parsing fails for an inline foreign import declaration)

Instances