CommentToken

comment token

class CommentToken : Token {
dstring _text;
bool _isDocumentationComment;
bool _isMultilineComment;
}

Members

Properties

isMultilineComment
bool isMultilineComment [@property getter]

returns true if this is multiline

Inherited Members

From Token

type
TokenType type [@property getter]

returns token type

filename
SourceFile filename [@property getter]

returns file info for source

line
int line [@property getter]

returns 1-based source line number of token start

pos
int pos [@property getter]

returns 1-based source line position of token start

text
dstring text [@property getter]

returns token text

opCode
OpCode opCode [@property getter]

returns opcode ID - for opcode tokens

keyword
Keyword keyword [@property getter]

returns keyword ID - for keyword tokens

isDocumentationComment
bool isDocumentationComment [@property getter]

returns true if this is documentation comment token

isMultilineComment
bool isMultilineComment [@property getter]

returns true if this is multiline

isError
bool isError [@property getter]

returns true if it's invalid token (can be returned in error tolerant mode of tokenizer)

errorMessage
string errorMessage [@property getter]

returns error message if it's invalid token (can be returned in error tolerant mode of tokenizer)

errorCode
int errorCode [@property getter]

returns error code if it's invalid token (can be returned in error tolerant mode of tokenizer)

invalidTokenType
TokenType invalidTokenType [@property getter]

returns type of token parsing of which has been failed - if it's invalid token (can be returned in error tolerant mode of tokenizer)

setPos
void setPos(SourceFile file, int line, int pos)

set start position for token (line is 1-based, pos is 0-based)

setFile
void setFile(SourceFile file)

set source file information for token

setPos
void setPos(int line, int pos)

set start position for token (line is 1-based, pos is 0-based)

Meta