class RuboCop::AST::NodePattern::Parser

def on_error(token, val, _vstack)

Overrides Racc::Parser's method:
def on_error(token, val, _vstack)
  detail = token_to_str(token) || '?'
  raise NodePattern::Invalid, "parse error on value #{val.inspect} (#{detail})"
end