Language.JavaScript.Parser.Lexer

language-javascript-0.6.0.3: Parser for JavaScript

Safe Haskell | None
Language | Haskell98

Language.JavaScript.Parser.Lexer

Synopsis

- data Token
  - = CommentToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | WsToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | IdentifierToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | DecimalToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | HexIntegerToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | OctalToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | StringToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | RegExToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | BreakToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | CaseToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | CatchToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ConstToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ContinueToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | DebuggerToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | DefaultToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | DeleteToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | DoToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ElseToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | EnumToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | FalseToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | FinallyToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ForToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | FunctionToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | IfToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | InToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | InstanceofToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | NewToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | NullToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ReturnToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | SwitchToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ThisToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ThrowToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | TrueToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | TryToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | TypeofToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | VarToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | VoidToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | WhileToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | WithToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | FutureToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | GetToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | SetToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | AutoSemiToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | SemiColonToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | CommaToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | HookToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | ColonToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | OrToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | AndToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | BitwiseOrToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | BitwiseXorToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | BitwiseAndToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | StrictEqToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | EqToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | TimesAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | DivideAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | ModAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | PlusAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | MinusAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | LshAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | RshAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | UrshAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | AndAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | XorAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | OrAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | SimpleAssignToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | StrictNeToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | NeToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | LshToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | LeToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | LtToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | UrshToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | RshToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | GeToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | GtToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | IncrementToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | DecrementToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | PlusToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | MinusToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | MulToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | DivToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | ModToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | NotToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | BitwiseNotToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | DotToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | LeftBracketToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | RightBracketToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | LeftCurlyToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | RightCurlyToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | LeftParenToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | RightParenToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | CondcommentEndToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | TailToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | EOFToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
- 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]

# Documentation

data Token

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

Constructors

CommentToken | Single line comment.
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
WsToken | White space, for preservation.
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
IdentifierToken | Identifier.
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
DecimalToken | Literal: Decimal
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
HexIntegerToken | Literal: Hexadecimal Integer
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
OctalToken | Literal: Octal Integer
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
StringToken | Literal: string, delimited by either single or double quotes
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
RegExToken | Literal: Regular Expression
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
BreakToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
CaseToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
CatchToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
ConstToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
ContinueToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
DebuggerToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
DefaultToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
DeleteToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
DoToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
ElseToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
EnumToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
FalseToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
FinallyToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
ForToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
FunctionToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
IfToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
InToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
InstanceofToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
NewToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
NullToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
ReturnToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
SwitchToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
ThisToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
ThrowToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
TrueToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
TryToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
TypeofToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
VarToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
VoidToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
WhileToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
WithToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
FutureToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
GetToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
SetToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
AutoSemiToken |
Fields tokenSpan :: !TokenPosn tokenLiteral :: !String tokenComment :: ![CommentAnnotation]
SemiColonToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
CommaToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
HookToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
ColonToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
OrToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
AndToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
BitwiseOrToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
BitwiseXorToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
BitwiseAndToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
StrictEqToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
EqToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
TimesAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
DivideAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
ModAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
PlusAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
MinusAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
LshAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
RshAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
UrshAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
AndAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
XorAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
OrAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
SimpleAssignToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
StrictNeToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
NeToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
LshToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
LeToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
LtToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
UrshToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
RshToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
GeToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
GtToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
IncrementToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
DecrementToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
PlusToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
MinusToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
MulToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
DivToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
ModToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
NotToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
BitwiseNotToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
DotToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
LeftBracketToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
RightBracketToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
LeftCurlyToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
RightCurlyToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
LeftParenToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
RightParenToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
CondcommentEndToken |
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
TailToken | Stuff between last JS and EOF
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]
EOFToken | End of file
Fields tokenSpan :: !TokenPosn tokenComment :: ![CommentAnnotation]

Instances

Eq Token |
Show Token |

data Alex a

Instances

Monad Alex |
Functor Alex |
Applicative Alex |

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

alexError :: String -> Alex a

runAlex :: String -> Alex a -> Either String a

alexTestTokeniser :: String -> Either String [Token]