language-javascript-0.7.1.0: 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]
    }
  - | AsyncToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | AwaitToken {
    - 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]
    }
  - | ClassToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ConstToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | LetToken {
    - 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]
    }
  - | ExtendsToken {
    - 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]
    }
  - | FromToken {
    - 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]
    }
  - | OfToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ReturnToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | StaticToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | SuperToken {
    - 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]
    }
  - | YieldToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ImportToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | WithToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | ExportToken {
    - 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]
    }
  - | ArrowToken {
    - tokenSpan :: !TokenPosn
    - tokenComment :: ![CommentAnnotation]
    }
  - | SpreadToken {
    - 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]
    }
  - | NoSubstitutionTemplateToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | TemplateHeadToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | TemplateMiddleToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | TemplateTailToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - tokenComment :: ![CommentAnnotation]
    }
  - | AsToken {
    - tokenSpan :: !TokenPosn
    - tokenLiteral :: !String
    - 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]
- setInTemplate :: Bool -> Alex ()

# 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.

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]

AsyncToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

AwaitToken |

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]

ClassToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

ConstToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

LetToken |

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]

ExtendsToken |

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]

FromToken |

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]

OfToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

ReturnToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

StaticToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

SuperToken |

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]

YieldToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

ImportToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

WithToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

ExportToken |

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]

ArrowToken |

Fields

- tokenSpan :: !TokenPosn
- tokenComment :: ![CommentAnnotation]

SpreadToken |

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]

NoSubstitutionTemplateToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

TemplateHeadToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

TemplateMiddleToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

TemplateTailToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

AsToken |

Fields

- tokenSpan :: !TokenPosn
- tokenLiteral :: !String
- tokenComment :: ![CommentAnnotation]

TailToken | Stuff between last JS and EOF

Fields

- tokenSpan :: !TokenPosn
- tokenComment :: ![CommentAnnotation]

EOFToken | End of file

Fields

- tokenSpan :: !TokenPosn
- tokenComment :: ![CommentAnnotation]

#### Instances

Instances details

Show Token Source # |
Instance details Defined in Language.JavaScript.Parser.Token Methods showsPrec :: Int -> Token -> ShowS Source # show :: Token -> String Source # showList :: [Token] -> ShowS Source #
Eq Token Source # |
Instance details Defined in Language.JavaScript.Parser.Token Methods (==) :: Token -> Token -> Bool Source # (/=) :: Token -> Token -> Bool Source #

data Alex a Source #

#### Instances

Instances details

Applicative Alex Source # |
Instance details Defined in Language.JavaScript.Parser.Lexer Methods pure :: a -> Alex a Source # (<*>) :: Alex (a -> b) -> Alex a -> Alex b Source # liftA2 :: (a -> b -> c) -> Alex a -> Alex b -> Alex c Source # (*>) :: Alex a -> Alex b -> Alex b Source # (<*) :: Alex a -> Alex b -> Alex a Source #
Functor Alex Source # |
Instance details Defined in Language.JavaScript.Parser.Lexer Methods fmap :: (a -> b) -> Alex a -> Alex b Source # (<$) :: a -> Alex b -> Alex a Source #
Monad Alex Source # |
Instance details Defined in Language.JavaScript.Parser.Lexer Methods (>>=) :: Alex a -> (a -> Alex b) -> Alex b Source # (>>) :: Alex a -> Alex b -> Alex b Source # return :: a -> Alex a Source #

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

alexError :: String -> Alex a Source #

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

alexTestTokeniser :: String -> Either String [Token] Source #

setInTemplate :: Bool -> Alex () Source #