接口 Input.Tok
- 封闭类:
Input
@Immutable
public static interface Input.Tok
A
Tok ("tock") is a token, or a comment, or a newline, or a maximal string of blanks. A token Tok
underlies a Input.Token, and each other Tok is attached to a single Token. Tokens and comments
have indices; white space Toks do not.-
方法概要
修饰符和类型方法说明intReturn theTok's0-based column number.intgetIndex()Return theTok's index.TheTok's original text (before processing escapes).intReturn theTok's0-based position.getText()TheTok's text.booleanIs theToka comment?booleanIs theToka javadoc comment?booleanIs theToka newline?booleanIs theToka "//" comment?booleanIs theToka "//" comment?intlength()The length of theTok's original text.
-
方法详细资料
-
getIndex
int getIndex()Return theTok's index.- 返回:
- its index
-
getPosition
int getPosition()Return theTok's0-based position.- 返回:
- its position
-
getColumn
int getColumn()Return theTok's0-based column number.- 返回:
- its column number
-
getText
String getText()TheTok's text. -
getOriginalText
String getOriginalText()TheTok's original text (before processing escapes). -
length
int length()The length of theTok's original text. -
isNewline
boolean isNewline()Is theToka newline? -
isSlashSlashComment
boolean isSlashSlashComment()Is theToka "//" comment? -
isSlashStarComment
boolean isSlashStarComment()Is theToka "//" comment? -
isJavadocComment
boolean isJavadocComment()Is theToka javadoc comment? -
isComment
boolean isComment()Is theToka comment?
-