Token

The result of a Lexer action.

Constructors

this
this(TokenType type, Tag tag)

Create a token of a type and value

this
this(TokenType type)

Create a token of a non value type

Members

Functions

hasChr
bool hasChr(dchar c)
Undocumented in source. Be warned that the author may not have intended to support it.
isId
bool isId()
Undocumented in source. Be warned that the author may not have intended to support it.
isOf
bool isOf(TokenType type, Tag value)
Undocumented in source. Be warned that the author may not have intended to support it.
isScalar
bool isScalar()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(const(Token) tk)
Undocumented in source. Be warned that the author may not have intended to support it.
value
const(T) value()

Get a Tag value from the token's data

Properties

curChar
dchar curChar [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isAlpha
bool isAlpha [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isAlphaNum
bool isAlphaNum [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isEmpty
bool isEmpty [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isNewLine
bool isNewLine [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isSpace
bool isSpace [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isUpper
bool isUpper [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isValid
bool isValid [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
tag
const(Tag) tag [@property getter]

Token's tag data

type
TokenType type [@property getter]

Current TokenType

Static functions

makeChar
Token makeChar(dchar c)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta