Class SourceToken
java.lang.Object
net.emustudio.emulib.plugin.compiler.SourceToken
- All Implemented Interfaces:
Token
-
Field Summary
Fields inherited from interface Token
BLOCK_END, BLOCK_START, COMMENT, EOF, ERROR, IDENTIFIER, INCLUDE_PATH, LABEL, LITERAL, OPERATOR, PREPROCESSOR, REGISTER, RESERVED, SEPARATOR, SYMBOL_DEFINITION, WHITESPACE -
Constructor Summary
ConstructorsConstructorDescriptionSourceToken(int type, int offset, String text) SourceToken(int type, int offset, String text, String name, String referencedFile) -
Method Summary
Modifier and TypeMethodDescriptionintGet 0-based starting offset in UTF-16 code units (Java String indices).Referenced source file path, or null when the token is not an include path.Symbol spelling, excluding punctuation, or null when this token has no symbol metadata.getText()Get token value.intgetType()Get token type.
-
Constructor Details
-
SourceToken
-
SourceToken
-
-
Method Details
-
getType
-
getOffset
-
getText
-
getSymbolName
Description copied from interface:TokenSymbol spelling, excluding punctuation, or null when this token has no symbol metadata.- Specified by:
getSymbolNamein interfaceToken
-
getReferencedFile
Description copied from interface:TokenReferenced source file path, or null when the token is not an include path.- Specified by:
getReferencedFilein interfaceToken
-