consume method

void consume(
  1. int type
)

Implementation

void consume(int type) {
  if (token?.type != type) {
    fail(expected: Token.typeToString(type));
  }
  next();
}