language-javascript-0.6.0.11: 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 
ContinueToken 
DebuggerToken 
DefaultToken 
DeleteToken 
DoToken 
ElseToken 
EnumToken 
FalseToken 
FinallyToken 
ForToken 
FunctionToken 
IfToken 
InToken 
InstanceofToken 
NewToken 
NullToken 
ReturnToken 
SwitchToken 
ThisToken 
ThrowToken 
TrueToken 
TryToken 
TypeofToken 
VarToken 
VoidToken 
WhileToken 
WithToken 
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 
DotToken 
LeftBracketToken 
RightBracketToken 
LeftCurlyToken 
RightCurlyToken 
LeftParenToken 
RightParenToken 
CondcommentEndToken 
TailToken

Stuff between last JS and EOF

EOFToken

End of file

Instances

Eq Token Source # 

Methods

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

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

Show Token Source # 

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

data Alex a Source #

Instances

Monad Alex Source # 

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 # 

Methods

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

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

Applicative Alex Source # 

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 #