private _errExpectedButGot(expected: string, got: Token, additionalInfo?: string) {
const message = localize('contextkey.parser.error.expectedButGot', "Expected: {0}\nReceived: '{1}'.", expected, Scanner.getLexeme(got));
contextkey.ts
const offset = got.offset;
const lexeme = Scanner.getLexeme(got);
this._parsingErrors.push({ message, offset, lexeme, additionalInfo });
return Parser._parseError;
}
private _check(type: TokenType) {