expect method
Consumes char at the cursor, otherwise throws FormatException.
Implementation
void expect(int char) {
if (!tryConsume(char)) {
throw _error("expected '${String.fromCharCode(char)}'");
}
}
Consumes char at the cursor, otherwise throws FormatException.
void expect(int char) {
if (!tryConsume(char)) {
throw _error("expected '${String.fromCharCode(char)}'");
}
}