consumeName method

void consumeName(
  1. String name
)

Implementation

void consumeName(String name) {
  if (token?.type != Token.NAME || token?.text != name) {
    fail(expected: name);
  }
  next();
}