Interface QuestReader

All Known Implementing Classes:
SimpleReader

public interface QuestReader
向动作解析器公开的游标 API。
  • 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

      <T> ParsedAction<T> nextAction()
    • nextAction

      <T> ParsedAction<T> nextAction(String namespace)
    • nextValue

      default <T> ParsedAction<T> nextValue()
      读取动作参数;仅未注册的参数词元可作为字面量,动作内部的解析错误仍会抛出。
    • expect

      void expect(String value)
    • source

      default String source(int begin, int end)
      返回 [begin, end) 范围的原始脚本文本;不支持读取源码的读取器抛出 UnsupportedOperationException。
    • nextInt

      default int nextInt()
    • nextLong

      default long nextLong()
    • nextDouble

      default double nextDouble()
    • next

      default <T> T next(ArgType<T> argType)
    • nextParsedAction

      default ParsedAction<?> nextParsedAction()
    • nextParsedAction

      default ParsedAction<?> nextParsedAction(String namespace)