requireNext method

Token requireNext(
  1. int type
)

Implementation

Token requireNext(int type) {
  if (token!.type != type) {
    fail(expected: Token.typeToString(type));
  }
  return next();
}