Пример #1
0
  @Override
  protected AstNode matchWorker(ParsingState parsingState) {
    Token nextToken = parsingState.peekTokenIfExists(parsingState.lexerIndex, this);

    AstNode astNode = new AstNode(null, "exclusiveTillMatcher", nextToken);
    while (nothingMatch(parsingState)) {
      Token token = parsingState.popToken(this);
      astNode.addChild(new AstNode(token));
    }

    return astNode;
  }