DietInput

struct DietInput {
string file;
string code;
size_t index;
int tabSize;
size_t[] indentation;
IndentStyle indentationStyle;
Token last;
Token[] backlog;
bool lastWasNewline;
ErrorContext errors;
}

Members

Functions

expect
bool expect(TokenType type, string match = null, string srcfile = __FILE__, size_t srcline = __LINE__)

Does a peek and advances a token and adds an error if it doesn't match.

match
bool match(TokenType type, string match = null)

Does a peek and advances a token.

peek
bool peek(TokenType type, string match = null)

Checks if the current token matches type & optional match.

Meta