Modulehaskell-lexer-1.2.1Haskell2010
Language.Haskell.Lexer
- 3 types
- 9 values
- Packagehaskell-lexer-1.2.1
- Exports12
- LanguageHaskell2010
- LicenceMIT
- SourceTokens.hs
Haskell token classifications:
Constructors
VaridVariable
ConidConstructor
VarsymVariable operator
ConsymConstructor operator
ReservedidReserved keyword
ReservedopReserved operator
SpecialidIntLitIntegral numeric literal
FloatLitFractional numeric literal
CharLitCharacter literal
StringLitString literal
QQuoteQuasi quote:
[|text|stuff|]QvaridQualified variable
QconidQualified constructor
QvarsymQualified variable operator
QconsymQualified constructor operator
SpecialWhitespaceWhite space
NestedCommentStartInternal: causes a call to an external function
NestedCommentA nested comment ({- ... -})
LiterateCommentNot handled by the lexer
CommentstartDashes
CommentThe stuff after the dashes
ErrorTokenGotEOFTheRestModuleNameModuleAliasrecognized in a later pass
Layoutfor implicit braces
Indent Int<n>, to preceed first token on each line
Open Int{n}, after let, where, do or of, if not followed by a "{"
Tokenize and add position information. Preserves white space, and does not insert extra tokens due to layout.
Same as lexerPass0, except that it uses the given start position.
The function lexerPass1 handles the part of lexical analysis that can be done independently of the parser---the tokenization and the addition of the extra layout tokens <n> and {n}, as specified in section 9.3 of the revised Haskell 98 Report.
Remove token that are not meaningful (e.g., white space and comments).
This is an implementation of Haskell layout, as specified in section 9.3 of the revised Haskell 98 report. This preprocessor inserts the extra <n> and {n} tokens.
The line and column numbers of a position.
The first column is designated column 1, not 0.
Advance position by a string.
Advance position by a single character.