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