Copyright | (C) CSIRO 2017-2019 |
---|---|
License | BSD3 |
Maintainer | Isaac Elliott <isaace71295@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data PyToken a
- = TkIf a
- | TkElse a
- | TkElif a
- | TkWhile a
- | TkAssert a
- | TkDef a
- | TkReturn a
- | TkPass a
- | TkBreak a
- | TkContinue a
- | TkTrue a
- | TkFalse a
- | TkNone a
- | TkEllipsis a
- | TkOr a
- | TkAnd a
- | TkIs a
- | TkNot a
- | TkGlobal a
- | TkNonlocal a
- | TkDel a
- | TkLambda a
- | TkImport a
- | TkFrom a
- | TkAs a
- | TkRaise a
- | TkTry a
- | TkExcept a
- | TkFinally a
- | TkClass a
- | TkRightArrow a
- | TkWith a
- | TkFor a
- | TkIn a
- | TkYield a
- | TkInt (IntLiteral a)
- | TkFloat (FloatLiteral a)
- | TkImag (ImagLiteral a)
- | TkIdent String a
- | TkString (Maybe StringPrefix) StringType QuoteType [PyChar] a
- | TkBytes BytesPrefix StringType QuoteType [PyChar] a
- | TkRawString RawStringPrefix StringType QuoteType [PyChar] a
- | TkRawBytes RawBytesPrefix StringType QuoteType [PyChar] a
- | TkSpace a
- | TkTab a
- | TkNewline Newline a
- | TkLeftBracket a
- | TkRightBracket a
- | TkLeftParen a
- | TkRightParen a
- | TkLeftBrace a
- | TkRightBrace a
- | TkLt a
- | TkLte a
- | TkEq a
- | TkDoubleEq a
- | TkBangEq a
- | TkGt a
- | TkGte a
- | TkContinued Newline a
- | TkColon a
- | TkSemicolon a
- | TkComma a
- | TkDot a
- | TkPlus a
- | TkMinus a
- | TkTilde a
- | TkComment (Comment a)
- | TkStar a
- | TkDoubleStar a
- | TkSlash a
- | TkDoubleSlash a
- | TkPercent a
- | TkShiftLeft a
- | TkShiftRight a
- | TkPlusEq a
- | TkMinusEq a
- | TkStarEq a
- | TkAtEq a
- | TkAt a
- | TkSlashEq a
- | TkPercentEq a
- | TkAmpersandEq a
- | TkPipeEq a
- | TkCaretEq a
- | TkShiftLeftEq a
- | TkShiftRightEq a
- | TkDoubleStarEq a
- | TkDoubleSlashEq a
- | TkPipe a
- | TkCaret a
- | TkAmpersand a
- | TkIndent a (Indents a)
- | TkLevel a (Indents a)
- | TkDedent a
- pyTokenAnn :: PyToken a -> a
Documentation
A PyToken
is a single lexical token of Python source. A PyToken
has an
optional annotation, which can be '()' when no annotation is desired.
Instances
Functor PyToken Source # | |
Eq1 PyToken Source # | |
Ord1 PyToken Source # | |
Defined in Language.Python.Internal.Token | |
Eq (PyToken a) Source # | |
Ord (PyToken a) Source # | |
Defined in Language.Python.Internal.Token | |
Show a => Show (PyToken a) Source # | |
HasIndents (PyToken a) a Source # | |
Defined in Language.Python.Optics.Indents | |
AsParseError (ParseError a) (PyToken a) Source # | |
Defined in Language.Python.Parse.Error |
pyTokenAnn :: PyToken a -> a Source #
Get the annotation from a PyToken
.