-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Parser for JavaScript
--   
--   Parses Javascript into an Abstract Syntax Tree (AST). Initially
--   intended as frontend to hjsmin.
--   
--   Note: Version 0.5.0 breaks compatibility with prior versions, the AST
--   has been reworked to allow round trip processing of JavaScript.
@package language-javascript
@version 0.5.14.2

module Language.JavaScript.Parser.SrcLocation

-- | <a>TokenPosn</a> records the location of a token in the input text. It
--   has three fields: the address (number of characters preceding the
--   token), line number and column of a token within the file. Note: The
--   lexer assumes the usual eight character tab stops.
data TokenPosn
TokenPn :: !Int -> !Int -> !Int -> TokenPosn
tokenPosnEmpty :: TokenPosn
instance Data.Data.Data Language.JavaScript.Parser.SrcLocation.TokenPosn
instance GHC.Read.Read Language.JavaScript.Parser.SrcLocation.TokenPosn
instance GHC.Show.Show Language.JavaScript.Parser.SrcLocation.TokenPosn
instance GHC.Classes.Eq Language.JavaScript.Parser.SrcLocation.TokenPosn

module Language.JavaScript.Parser.Lexer

-- | Lexical tokens. Each may be annotated with any comment occuring
--   between the prior token and this one
data Token

-- | Single line comment.
CommentToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]

-- | White space, for preservation.
WsToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]

-- | Identifier.
IdentifierToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]

-- | Literal: Decimal
DecimalToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]

-- | Literal: Hexadecimal Integer
HexIntegerToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]

-- | Literal: Octal Integer
OctalToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]

-- | Literal: string, delimited by either single or double quotes
StringToken :: !TokenPosn -> !String -> !Char -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[token_delimiter] :: Token -> !Char
[tokenComment] :: Token -> ![CommentAnnotation]

-- | Literal: Regular Expression
RegExToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
BreakToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
CaseToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
CatchToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
ConstToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
ContinueToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
DebuggerToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
DefaultToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
DeleteToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
DoToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
ElseToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
EnumToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
FalseToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
FinallyToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
ForToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
FunctionToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
IfToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
InToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
InstanceofToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
NewToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
NullToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
ReturnToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
SwitchToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
ThisToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
ThrowToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
TrueToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
TryToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
TypeofToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
VarToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
VoidToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
WhileToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
WithToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
FutureToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
GetToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
SetToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
AutoSemiToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
SemiColonToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
CommaToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
HookToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
ColonToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
OrToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
AndToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
BitwiseOrToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
BitwiseXorToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
BitwiseAndToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
StrictEqToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
EqToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
AssignToken :: !TokenPosn -> !String -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenLiteral] :: Token -> !String
[tokenComment] :: Token -> ![CommentAnnotation]
SimpleAssignToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
StrictNeToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
NeToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
LshToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
LeToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
LtToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
UrshToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
RshToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
GeToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
GtToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
IncrementToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
DecrementToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
PlusToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
MinusToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
MulToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
DivToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
ModToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
NotToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
BitwiseNotToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
DotToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
LeftBracketToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
RightBracketToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
LeftCurlyToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
RightCurlyToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
LeftParenToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
RightParenToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
CondcommentEndToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]

-- | Stuff between last JS and EOF
TailToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]

-- | End of file
EOFToken :: !TokenPosn -> ![CommentAnnotation] -> Token
[tokenSpan] :: Token -> !TokenPosn
[tokenComment] :: Token -> ![CommentAnnotation]
data AlexPosn
AlexPn :: !Int -> !Int -> !Int -> AlexPosn
data Alex a
lexCont :: (Token -> Alex a) -> Alex a
alexError :: String -> Alex a
runAlex :: String -> Alex a -> Either String a
alexTestTokeniser :: String -> Either String [Token]
instance GHC.Show.Show Language.JavaScript.Parser.Lexer.AlexPosn
instance GHC.Classes.Eq Language.JavaScript.Parser.Lexer.AlexPosn
instance GHC.Base.Functor Language.JavaScript.Parser.Lexer.Alex
instance GHC.Base.Applicative Language.JavaScript.Parser.Lexer.Alex
instance GHC.Base.Monad Language.JavaScript.Parser.Lexer.Alex
instance GHC.Base.Functor Language.JavaScript.Parser.Lexer.AlexLastAcc

module Language.JavaScript.Parser.AST
data Node

-- | Terminals
JSIdentifier :: String -> Node
JSDecimal :: String -> Node
JSLiteral :: String -> Node
JSHexInteger :: String -> Node
JSOctal :: String -> Node
JSStringLiteral :: Char -> [Char] -> Node
JSRegEx :: String -> Node

-- | lb, args, rb
JSArguments :: JSNode -> [JSNode] -> JSNode -> Node

-- | lb, contents, rb
JSArrayLiteral :: JSNode -> [JSNode] -> JSNode -> Node

-- | optional lb,optional block statements,optional rb
JSBlock :: [JSNode] -> [JSNode] -> [JSNode] -> Node

-- | break, optional identifier, autosemi
JSBreak :: JSNode -> [JSNode] -> JSNode -> Node

-- | type : ., (), []; opening [ or ., contents, closing
JSCallExpression :: String -> [JSNode] -> [JSNode] -> [JSNode] -> Node

-- | case,expr,colon,stmtlist
JSCase :: JSNode -> JSNode -> JSNode -> [JSNode] -> Node

-- | catch,lb,ident,[if,expr],rb,block
JSCatch :: JSNode -> JSNode -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | continue,optional identifier,autosemi
JSContinue :: JSNode -> [JSNode] -> JSNode -> Node

-- | default,colon,stmtlist
JSDefault :: JSNode -> JSNode -> [JSNode] -> Node

-- | do,stmt,while,lb,expr,rb,autosemi
JSDoWhile :: JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> Node

-- | comma
JSElision :: JSNode -> Node

-- | expression components
JSExpression :: [JSNode] -> Node

-- | what, lhs, op, rhs
JSExpressionBinary :: String -> [JSNode] -> JSNode -> [JSNode] -> Node

-- | lb,expression,rb
JSExpressionParen :: JSNode -> JSNode -> JSNode -> Node

-- | type, expression, operator
JSExpressionPostfix :: String -> [JSNode] -> JSNode -> Node

-- | cond, ?, trueval, :, falseval
JSExpressionTernary :: [JSNode] -> JSNode -> [JSNode] -> JSNode -> [JSNode] -> Node

-- | finally,block
JSFinally :: JSNode -> JSNode -> Node

-- | for,lb,expr,semi,expr,semi,expr,rb.stmt
JSFor :: JSNode -> JSNode -> [JSNode] -> JSNode -> [JSNode] -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | for,lb,expr,in,expr,rb,stmt
JSForIn :: JSNode -> JSNode -> [JSNode] -> JSNode -> JSNode -> JSNode -> JSNode -> Node

-- | for,lb,var,vardecl,semi,expr,semi,expr,rb,stmt
JSForVar :: JSNode -> JSNode -> JSNode -> [JSNode] -> JSNode -> [JSNode] -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | for,lb,var,vardecl,in,expr,rb,stmt
JSForVarIn :: JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> Node

-- | fn,name, lb,parameter list,rb,block | JSFunctionBody [JSNode] -- ^body
JSFunction :: JSNode -> JSNode -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | fn,[name],lb, parameter list,rb,block`
JSFunctionExpression :: JSNode -> [JSNode] -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | if,(,expr,),stmt,optional rest
JSIf :: JSNode -> JSNode -> JSNode -> JSNode -> [JSNode] -> [JSNode] -> Node

-- | identifier,colon,stmt
JSLabelled :: JSNode -> JSNode -> JSNode -> Node

-- | firstpart, dot, name
JSMemberDot :: [JSNode] -> JSNode -> JSNode -> Node

-- | firstpart, lb, expr, rb
JSMemberSquare :: [JSNode] -> JSNode -> JSNode -> JSNode -> Node

-- | lbrace contents rbrace
JSObjectLiteral :: JSNode -> [JSNode] -> JSNode -> Node

-- | opnode
JSOperator :: JSNode -> Node

-- | (get|set), name, lb, params, rb, block
JSPropertyAccessor :: JSNode -> JSNode -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | name, colon, value
JSPropertyNameandValue :: JSNode -> JSNode -> [JSNode] -> Node

-- | return,optional expression,autosemi | JSSourceElements [JSNode] --
--   ^source elements
JSReturn :: JSNode -> [JSNode] -> JSNode -> Node

-- | source elements | JSStatementBlock JSNode JSNode JSNode --
--   ^lb,block,rb | JSStatementList [JSNode] -- ^statements
JSSourceElementsTop :: [JSNode] -> Node

-- | switch,lb,expr,rb,caseblock
JSSwitch :: JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> Node

-- | throw val
JSThrow :: JSNode -> JSNode -> Node

-- | try,block,rest
JSTry :: JSNode -> JSNode -> [JSNode] -> Node

-- | type, operator
JSUnary :: String -> JSNode -> Node

-- | identifier, optional initializer
JSVarDecl :: JSNode -> [JSNode] -> Node

-- | var|const, decl, autosemi
JSVariables :: JSNode -> [JSNode] -> JSNode -> Node

-- | while,lb,expr,rb,stmt
JSWhile :: JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> Node

-- | with,lb,expr,rb,stmt list
JSWith :: JSNode -> JSNode -> JSNode -> JSNode -> [JSNode] -> Node

-- | The JSNode is the building block of the AST. Each has a syntactic part
--   <a>Node</a>. In addition, the leaf elements (terminals) have a
--   position <a>TokenPosn</a>, as well as an array of comments and/or
--   whitespace that was collected while parsing.
data JSNode

-- | Non Terminal node, does not have any position or comment information
NN :: Node -> JSNode

-- | Terminal node, including position and comment/whitespace information
NT :: Node -> TokenPosn -> [CommentAnnotation] -> JSNode
showStripped :: JSNode -> String
instance Data.Data.Data Language.JavaScript.Parser.AST.JSNode
instance GHC.Read.Read Language.JavaScript.Parser.AST.JSNode
instance GHC.Classes.Eq Language.JavaScript.Parser.AST.JSNode
instance GHC.Show.Show Language.JavaScript.Parser.AST.JSNode
instance Data.Data.Data Language.JavaScript.Parser.AST.Node
instance GHC.Read.Read Language.JavaScript.Parser.AST.Node
instance GHC.Classes.Eq Language.JavaScript.Parser.AST.Node
instance GHC.Show.Show Language.JavaScript.Parser.AST.Node

module Language.JavaScript.Parser.Grammar5
parseProgram :: Alex JSNode
parseLiteral :: Alex JSNode
parsePrimaryExpression :: Alex JSNode
parseStatement :: Alex JSNode
fp :: JSNode -> JSNode

module Language.JavaScript.Parser.Parser

-- | Parse one compound statement, or a sequence of simple statements.
--   Generally used for interactive input, such as from the command line of
--   an interpreter. Return comments in addition to the parsed statements.
parse :: String -> String -> Either String JSNode
readJs :: String -> JSNode

-- | Parse the given file. For UTF-8 support, make sure your locale is set
--   such that "System.IO.localeEncoding" returns "utf8"
parseFile :: FilePath -> IO JSNode

-- | Parse the given file, explicitly setting the encoding to UTF8 when
--   reading it
parseFileUtf8 :: FilePath -> IO JSNode

-- | Parse one compound statement, or a sequence of simple statements.
--   Generally used for interactive input, such as from the command line of
--   an interpreter. Return comments in addition to the parsed statements.
parseUsing :: Alex JSNode -> String -> String -> Either String JSNode
showStripped :: JSNode -> String
showStrippedMaybe :: Show a => Either a JSNode -> String

module Language.JavaScript.Pretty.Printer
renderJS :: JSNode -> Builder
renderToString :: JSNode -> String

module Language.JavaScript.Parser

-- | Parse one compound statement, or a sequence of simple statements.
--   Generally used for interactive input, such as from the command line of
--   an interpreter. Return comments in addition to the parsed statements.
parse :: String -> String -> Either String JSNode
readJs :: String -> JSNode

-- | Parse the given file. For UTF-8 support, make sure your locale is set
--   such that "System.IO.localeEncoding" returns "utf8"
parseFile :: FilePath -> IO JSNode

-- | Parse the given file, explicitly setting the encoding to UTF8 when
--   reading it
parseFileUtf8 :: FilePath -> IO JSNode
showStripped :: JSNode -> String
showStrippedMaybe :: Show a => Either a JSNode -> String

-- | The JSNode is the building block of the AST. Each has a syntactic part
--   <a>Node</a>. In addition, the leaf elements (terminals) have a
--   position <a>TokenPosn</a>, as well as an array of comments and/or
--   whitespace that was collected while parsing.
data JSNode

-- | Non Terminal node, does not have any position or comment information
NN :: Node -> JSNode

-- | Terminal node, including position and comment/whitespace information
NT :: Node -> TokenPosn -> [CommentAnnotation] -> JSNode
data Node

-- | Terminals
JSIdentifier :: String -> Node
JSDecimal :: String -> Node
JSLiteral :: String -> Node
JSHexInteger :: String -> Node
JSOctal :: String -> Node
JSStringLiteral :: Char -> [Char] -> Node
JSRegEx :: String -> Node

-- | lb, args, rb
JSArguments :: JSNode -> [JSNode] -> JSNode -> Node

-- | lb, contents, rb
JSArrayLiteral :: JSNode -> [JSNode] -> JSNode -> Node

-- | optional lb,optional block statements,optional rb
JSBlock :: [JSNode] -> [JSNode] -> [JSNode] -> Node

-- | break, optional identifier, autosemi
JSBreak :: JSNode -> [JSNode] -> JSNode -> Node

-- | type : ., (), []; opening [ or ., contents, closing
JSCallExpression :: String -> [JSNode] -> [JSNode] -> [JSNode] -> Node

-- | case,expr,colon,stmtlist
JSCase :: JSNode -> JSNode -> JSNode -> [JSNode] -> Node

-- | catch,lb,ident,[if,expr],rb,block
JSCatch :: JSNode -> JSNode -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | continue,optional identifier,autosemi
JSContinue :: JSNode -> [JSNode] -> JSNode -> Node

-- | default,colon,stmtlist
JSDefault :: JSNode -> JSNode -> [JSNode] -> Node

-- | do,stmt,while,lb,expr,rb,autosemi
JSDoWhile :: JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> Node

-- | comma
JSElision :: JSNode -> Node

-- | expression components
JSExpression :: [JSNode] -> Node

-- | what, lhs, op, rhs
JSExpressionBinary :: String -> [JSNode] -> JSNode -> [JSNode] -> Node

-- | lb,expression,rb
JSExpressionParen :: JSNode -> JSNode -> JSNode -> Node

-- | type, expression, operator
JSExpressionPostfix :: String -> [JSNode] -> JSNode -> Node

-- | cond, ?, trueval, :, falseval
JSExpressionTernary :: [JSNode] -> JSNode -> [JSNode] -> JSNode -> [JSNode] -> Node

-- | finally,block
JSFinally :: JSNode -> JSNode -> Node

-- | for,lb,expr,semi,expr,semi,expr,rb.stmt
JSFor :: JSNode -> JSNode -> [JSNode] -> JSNode -> [JSNode] -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | for,lb,expr,in,expr,rb,stmt
JSForIn :: JSNode -> JSNode -> [JSNode] -> JSNode -> JSNode -> JSNode -> JSNode -> Node

-- | for,lb,var,vardecl,semi,expr,semi,expr,rb,stmt
JSForVar :: JSNode -> JSNode -> JSNode -> [JSNode] -> JSNode -> [JSNode] -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | for,lb,var,vardecl,in,expr,rb,stmt
JSForVarIn :: JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> Node

-- | fn,name, lb,parameter list,rb,block | JSFunctionBody [JSNode] -- ^body
JSFunction :: JSNode -> JSNode -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | fn,[name],lb, parameter list,rb,block`
JSFunctionExpression :: JSNode -> [JSNode] -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | if,(,expr,),stmt,optional rest
JSIf :: JSNode -> JSNode -> JSNode -> JSNode -> [JSNode] -> [JSNode] -> Node

-- | identifier,colon,stmt
JSLabelled :: JSNode -> JSNode -> JSNode -> Node

-- | firstpart, dot, name
JSMemberDot :: [JSNode] -> JSNode -> JSNode -> Node

-- | firstpart, lb, expr, rb
JSMemberSquare :: [JSNode] -> JSNode -> JSNode -> JSNode -> Node

-- | lbrace contents rbrace
JSObjectLiteral :: JSNode -> [JSNode] -> JSNode -> Node

-- | opnode
JSOperator :: JSNode -> Node

-- | (get|set), name, lb, params, rb, block
JSPropertyAccessor :: JSNode -> JSNode -> JSNode -> [JSNode] -> JSNode -> JSNode -> Node

-- | name, colon, value
JSPropertyNameandValue :: JSNode -> JSNode -> [JSNode] -> Node

-- | return,optional expression,autosemi | JSSourceElements [JSNode] --
--   ^source elements
JSReturn :: JSNode -> [JSNode] -> JSNode -> Node

-- | source elements | JSStatementBlock JSNode JSNode JSNode --
--   ^lb,block,rb | JSStatementList [JSNode] -- ^statements
JSSourceElementsTop :: [JSNode] -> Node

-- | switch,lb,expr,rb,caseblock
JSSwitch :: JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> Node

-- | throw val
JSThrow :: JSNode -> JSNode -> Node

-- | try,block,rest
JSTry :: JSNode -> JSNode -> [JSNode] -> Node

-- | type, operator
JSUnary :: String -> JSNode -> Node

-- | identifier, optional initializer
JSVarDecl :: JSNode -> [JSNode] -> Node

-- | var|const, decl, autosemi
JSVariables :: JSNode -> [JSNode] -> JSNode -> Node

-- | while,lb,expr,rb,stmt
JSWhile :: JSNode -> JSNode -> JSNode -> JSNode -> JSNode -> Node

-- | with,lb,expr,rb,stmt list
JSWith :: JSNode -> JSNode -> JSNode -> JSNode -> [JSNode] -> Node
data CommentAnnotation
CommentA :: TokenPosn -> String -> CommentAnnotation
WhiteSpace :: TokenPosn -> String -> CommentAnnotation
NoComment :: CommentAnnotation

-- | <a>TokenPosn</a> records the location of a token in the input text. It
--   has three fields: the address (number of characters preceding the
--   token), line number and column of a token within the file. Note: The
--   lexer assumes the usual eight character tab stops.
data TokenPosn
TokenPn :: !Int -> !Int -> !Int -> TokenPosn
tokenPosnEmpty :: TokenPosn
renderJS :: JSNode -> Builder
renderToString :: JSNode -> String
