language-javascript-0.6.0.13: Parser for JavaScript

Safe HaskellNone
LanguageHaskell98

Language.JavaScript.Parser.Lexer

Synopsis

Documentation

data Token Source #

Lexical tokens. Each may be annotated with any comment occurring between the prior token and this one

Constructors

CommentToken

Single line comment.

WsToken

White space, for preservation.

IdentifierToken

Identifier.

DecimalToken

Literal: Decimal

HexIntegerToken

Literal: Hexadecimal Integer

OctalToken

Literal: Octal Integer

StringToken

Literal: string, delimited by either single or double quotes

RegExToken

Literal: Regular Expression

BreakToken 
CaseToken 
CatchToken 
ConstToken 
LetToken 
ContinueToken 
DebuggerToken 
DefaultToken 
DeleteToken 
DoToken 
ElseToken 
EnumToken 
FalseToken 
FinallyToken 
ForToken 
FunctionToken 
FromToken 
IfToken 
InToken 
InstanceofToken 
NewToken 
NullToken 
OfToken 
ReturnToken 
SwitchToken 
ThisToken 
ThrowToken 
TrueToken 
TryToken 
TypeofToken 
VarToken 
VoidToken 
WhileToken 
ImportToken 
WithToken 
ExportToken 
FutureToken 
GetToken 
SetToken 
AutoSemiToken 
SemiColonToken 
CommaToken 
HookToken 
ColonToken 
OrToken 
AndToken 
BitwiseOrToken 
BitwiseXorToken 
BitwiseAndToken 
StrictEqToken 
EqToken 
TimesAssignToken 
DivideAssignToken 
ModAssignToken 
PlusAssignToken 
MinusAssignToken 
LshAssignToken 
RshAssignToken 
UrshAssignToken 
AndAssignToken 
XorAssignToken 
OrAssignToken 
SimpleAssignToken 
StrictNeToken 
NeToken 
LshToken 
LeToken 
LtToken 
UrshToken 
RshToken 
GeToken 
GtToken 
IncrementToken 
DecrementToken 
PlusToken 
MinusToken 
MulToken 
DivToken 
ModToken 
NotToken 
BitwiseNotToken 
ArrowToken 
SpreadToken 
DotToken 
LeftBracketToken 
RightBracketToken 
LeftCurlyToken 
RightCurlyToken 
LeftParenToken 
RightParenToken 
CondcommentEndToken 
AsToken 
TailToken

Stuff between last JS and EOF

EOFToken

End of file

Instances
Eq Token Source # 
Instance details

Defined in Language.JavaScript.Parser.Token

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Show Token Source # 
Instance details

Defined in Language.JavaScript.Parser.Token

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

data Alex a Source #

Instances
Monad Alex Source # 
Instance details

Defined in Language.JavaScript.Parser.Lexer

Methods

(>>=) :: Alex a -> (a -> Alex b) -> Alex b #

(>>) :: Alex a -> Alex b -> Alex b #

return :: a -> Alex a #

fail :: String -> Alex a #

Functor Alex Source # 
Instance details

Defined in Language.JavaScript.Parser.Lexer

Methods

fmap :: (a -> b) -> Alex a -> Alex b #

(<$) :: a -> Alex b -> Alex a #

Applicative Alex Source # 
Instance details

Defined in Language.JavaScript.Parser.Lexer

Methods

pure :: a -> Alex a #

(<*>) :: Alex (a -> b) -> Alex a -> Alex b #

liftA2 :: (a -> b -> c) -> Alex a -> Alex b -> Alex c #

(*>) :: Alex a -> Alex b -> Alex b #

(<*) :: Alex a -> Alex b -> Alex a #

lexCont :: (Token -> Alex a) -> Alex a Source #