Class SimpleReader
java.lang.Object
me.kzheart.klib.script.kether.core.AbstractStringReader
me.kzheart.klib.script.kether.core.SimpleReader
- All Implemented Interfaces:
QuestReader
通过
QuestRegistry 解析动作词元。-
Field Summary
FieldsFields inherited from class me.kzheart.klib.script.kether.core.AbstractStringReader
content, index, mark -
Constructor Summary
ConstructorsConstructorDescriptionSimpleReader(QuestService<?> service, BlockReader reader, List<String> namespace) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNamespace(String value) 之后解析的语句也在该命名空间中查找(import 语句)。protected voidvoidQuestService<?> boolean下一个词元前的空白或注释是否跨越源码行。<T> ParsedAction<T> <T> ParsedAction<T> nextAction(String selectedNamespace) protected ParsedAction<?> <T> ParsedAction<T> 读取动作参数;仅未注册的参数词元可作为字面量,动作内部的解析错误仍会抛出。voidremoveNamespace(String value) 不再在该命名空间中查找(release 语句)。source(int begin, int end) 返回 [begin, end) 范围的原始脚本文本;不支持读取源码的读取器抛出 UnsupportedOperationException。protected <T> ParsedAction<T> wrap(QuestAction<T> action) Methods inherited from class me.kzheart.klib.script.kether.core.AbstractStringReader
failExpect, getContent, getIndex, getMark, getRemain, hasNext, mark, peek, peek, reset, setIndex, skip, skipBlankMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.kzheart.klib.script.kether.core.QuestReader
getIndex, getMark, hasNext, mark, next, nextDouble, nextInt, nextLong, nextParsedAction, nextParsedAction, peek, peek, reset, setIndex
-
Field Details
-
namespace
-
service
-
blockParser
-
-
Constructor Details
-
SimpleReader
-
-
Method Details
-
source
Description copied from interface:QuestReader返回 [begin, end) 范围的原始脚本文本;不支持读取源码的读取器抛出 UnsupportedOperationException。- Specified by:
sourcein interfaceQuestReader
-
nextToken
- Specified by:
nextTokenin interfaceQuestReader- Overrides:
nextTokenin classAbstractStringReader
-
hasLineBreakBeforeNextToken
public boolean hasLineBreakBeforeNextToken()Description copied from interface:QuestReader下一个词元前的空白或注释是否跨越源码行。- Specified by:
hasLineBreakBeforeNextTokenin interfaceQuestReader
-
nextTokenBlock
-
nextAnonAction
-
nextAction
- Specified by:
nextActionin interfaceQuestReader
-
nextAction
- Specified by:
nextActionin interfaceQuestReader
-
nextValue
Description copied from interface:QuestReader读取动作参数;仅未注册的参数词元可作为字面量,动作内部的解析错误仍会抛出。- Specified by:
nextValuein interfaceQuestReader
-
beforeParse
protected void beforeParse() -
wrap
-
expect
- Specified by:
expectin interfaceQuestReader- Overrides:
expectin classAbstractStringReader
-
getNamespace
-
addNamespace
之后解析的语句也在该命名空间中查找(import 语句)。 -
removeNamespace
不再在该命名空间中查找(release 语句)。 -
getService
-
getBlockParser
-