Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module containg the lexing of C# resulting in the list of tokens with their position in the original source file.
- lexer :: String -> [Positioned Token]
- data Positioned a = Positioned AlexPosn a
- data Token
- = TKWabstract
- | TKWas
- | TKWbase
- | TKWbool
- | TKWbreak
- | TKWbyte
- | TKWcase
- | TKWcatch
- | TKWchar
- | TKWchecked
- | TKWclass
- | TKWconst
- | TKWcontinue
- | TKWdecimal
- | TKWdefault
- | TKWdelegate
- | TKWdo
- | TKWdouble
- | TKWelse
- | TKWenum
- | TKWevent
- | TKWexplicit
- | TKWextern
- | TKWfalse
- | TKWfinally
- | TKWfixed
- | TKWfloat
- | TKWfor
- | TKWforeach
- | TKWgoto
- | TKWif
- | TKWimplicit
- | TKWin
- | TKWint
- | TKWinterface
- | TKWinternal
- | TKWis
- | TKWlock
- | TKWlong
- | TKWnamespace
- | TKWnew
- | TKWnull
- | TKWobject
- | TKWoperator
- | TKWout
- | TKWoverride
- | TKWparams
- | TKWprivate
- | TKWprotected
- | TKWpublic
- | TKWreadonly
- | TKWref
- | TKWreturn
- | TKWsbyte
- | TKWsealed
- | TKWshort
- | TKWsizeof
- | TKWstackalloc
- | TKWstatic
- | TKWstring
- | TKWstruct
- | TKWswitch
- | TKWthis
- | TKWthrow
- | TKWtrue
- | TKWtry
- | TKWtypeof
- | TKWuint
- | TKWulong
- | TKWunchecked
- | TKWunsafe
- | TKWushort
- | TKWusing
- | TKWvirtual
- | TKWvoid
- | TKWvolatile
- | TKWwhile
- | TOParens
- | TCParens
- | TOSquare
- | TCSquare
- | TOCurly
- | TCCurly
- | TSemicolon
- | TDoubleColon
- | TColon
- | TComma
- | TPeriod
- | TQuestion
- | TLambda
- | TOpPlus
- | TOpMinus
- | TOpMultiply
- | TOpDivide
- | TOpModulo
- | TOpBitwiseAnd
- | TOpBitwiseOr
- | TOpBitwiseXor
- | TOpLeftShift
- | TOpRightShift
- | TOpEqual
- | TOpNotEqual
- | TOpGreaterThan
- | TOpLessThan
- | TOpGreaterThanEqual
- | TOpLessThanEqual
- | TOpAnd
- | TOpOr
- | TOpNot
- | TOpBitwiseNot
- | TOpPlusPlus
- | TOpMinusMinus
- | TOpNullCoalescing
- | TOpAwait
- | TOpAssign
- | TOpAssignPlus
- | TOpAssignMinus
- | TOpAssignMultiply
- | TOpAssignDivide
- | TOpAssignModulo
- | TOpAssignBitwiseAnd
- | TOpAssignBitwiseOr
- | TOpAssignBitwiseXor
- | TOpAssignBitwiseLeftShift
- | TOpAssignBitwiseRightShift
- | TCharLiteral String
- | TStringLiteral String
- | TVerbatimStringLiteral String
- | TInterpolatedStringLiteral String
- | TFloatLiteral Double
- | TDoubleLiteral Double
- | TDecimalLiteral Double
- | TIntLiteral Integer
- | TUIntLiteral Integer
- | TLongLiteral Integer
- | TULongLiteral Integer
- | TIdentifier String
- data AlexPosn = AlexPn !Int !Int !Int
Documentation
lexer :: String -> [Positioned Token] Source #
Lexes the given string and returns the list of tokens with their position in the original source file. When the lexing fails an exception will be thrown.