match2 method

Token match2(
  1. Set<String> lexemes
)

same with match, with plural types provided.

Implementation

Token match2(Set<String> lexemes) {
  if (!lexemes.contains(curTok.lexeme)) {
    final err = HTError.unexpectedToken(lexemes.toString(), curTok.lexeme,
        filename: currrentFileName,
        line: curTok.line,
        column: curTok.column,
        offset: curTok.offset,
        length: curTok.length);
    errors.add(err);
  }

  return advance();
}