A library to represent JavaScript programs.
Author: Michael Hanus
Version: May 2017
jsConsTerm
:: String -> [JSExp] -> JSExp
Representation of constructor terms in JavaScript as array structures. |
Type of JavaScript expressions.
Constructors:
JSString
:: String -> JSExp
: string constant
JSInt
:: Int -> JSExp
: integer constant
JSBool
:: Bool -> JSExp
: Boolean constant
JSIVar
:: Int -> JSExp
: indexed variable
JSIArrayIdx
:: Int -> Int -> JSExp
: array access to index array variable
JSOp
:: String -> JSExp -> JSExp -> JSExp
: infix operator expression
JSFCall
:: String -> [JSExp] -> JSExp
: function call
JSApply
:: JSExp -> JSExp -> JSExp
: function call where the function is an expression
JSLambda
:: [Int] -> [JSStat] -> JSExp
: (anonymous) function with indexed variables as arguments
Type of JavaScript statements.
Constructors:
JSAssign
:: JSExp -> JSExp -> JSStat
: assignment
JSIf
:: JSExp -> [JSStat] -> [JSStat] -> JSStat
: conditional
JSSwitch
:: JSExp -> [JSBranch] -> JSStat
: switch statement
JSPCall
:: String -> [JSExp] -> JSStat
: procedure call
JSReturn
:: JSExp -> JSStat
: return statement
JSVarDecl
:: Int -> JSStat
: local variable declaration
Constructors:
JSCase
:: String -> [JSStat] -> JSBranch
: case branch
JSDefault
:: [JSStat] -> JSBranch
: default branch
Constructors:
JSFDecl
:: String -> [Int] -> [JSStat] -> JSFDecl
Representation of constructor terms in JavaScript as array structures.
|