Interface QuestReader
- All Known Implementing Classes:
SimpleReader
public interface QuestReader
向动作解析器公开的游标 API。
-
Method Summary
Modifier and TypeMethodDescriptionvoidintgetIndex()intgetMark()boolean下一个词元前的空白或注释是否跨越源码行。booleanhasNext()voidmark()default <T> T<T> ParsedAction<T> <T> ParsedAction<T> nextAction(String namespace) default doubledefault intnextInt()default longnextLong()default ParsedAction<?> default ParsedAction<?> nextParsedAction(String namespace) default <T> ParsedAction<T> 读取动作参数;仅未注册的参数词元可作为字面量,动作内部的解析错误仍会抛出。charpeek()charpeek(int offset) voidreset()voidsetIndex(int index) default Stringsource(int begin, int end) 返回 [begin, end) 范围的原始脚本文本;不支持读取源码的读取器抛出 UnsupportedOperationException。
-
Method Details
-
peek
char peek() -
peek
char peek(int offset) -
getIndex
int getIndex() -
setIndex
void setIndex(int index) -
getMark
int getMark() -
hasNext
boolean hasNext() -
hasLineBreakBeforeNextToken
boolean hasLineBreakBeforeNextToken()下一个词元前的空白或注释是否跨越源码行。 -
nextToken
String nextToken() -
mark
void mark() -
reset
void reset() -
nextAction
-
nextAction
-
nextValue
读取动作参数;仅未注册的参数词元可作为字面量,动作内部的解析错误仍会抛出。 -
expect
-
source
返回 [begin, end) 范围的原始脚本文本;不支持读取源码的读取器抛出 UnsupportedOperationException。 -
nextInt
default int nextInt() -
nextLong
default long nextLong() -
nextDouble
default double nextDouble() -
next
-
nextParsedAction
-
nextParsedAction
-