Safe Haskell | None |
---|---|
Language | Haskell2010 |
Front.Token
Description
Sslang source code tokens.
Synopsis
- newtype Token = Token (Span, TokenType)
- tokenType :: Token -> TokenType
- data Span = Span {}
- data TokenType
- = TEOF
- | TType
- | TIf
- | TElse
- | TWhile
- | TDo
- | TPar
- | TLoop
- | TLet
- | TNow
- | TAtAt
- | TBreak
- | TMatch
- | TAfter
- | TWait
- | TFun
- | TExtern
- | TEq
- | TLarrow
- | TRarrow
- | TDRarrow
- | TDBar
- | TColon
- | TSemicolon
- | TBar
- | TComma
- | TUnderscore
- | TAt
- | TAmpersand
- | TLparen
- | TRparen
- | TLbrace
- | TRbrace
- | TLbracket
- | TRbracket
- | TInteger Integer
- | TString String
- | TId Identifier
- | TOp Identifier
- | TCSym Identifier
- | TCQuote String
- | TCBlock String
- prettyTokens :: [Token] -> String
Documentation
Tokens extracted from source text.
The location of a token in the source text.
The types of tokens that can appear in a sslang source file.
Constructors
prettyTokens :: [Token] -> String Source #
Pretty print a list of tokens.