Lines Matching defs:emitError

35 FormatToken FormatLexer::emitError(SMLoc loc, const Twine &msg) {
42 FormatToken FormatLexer::emitError(const char *loc, const Twine &msg) {
43 return emitError(SMLoc::getFromPointer(loc), msg);
93 return emitError(tokStart, "unexpected character");
146 return emitError(curPtr - 1, "unexpected end of file in literal");
151 return emitError(curPtr - 1, "expected variable name");
167 return emitError(curPtr - 1, "unexpected end of file in string");
238 return emitError(curToken.getLoc(),
248 return emitError(
257 return emitError(tok.getLoc(), "expected literal, but got '" + value + "'");
266 (void)emitError(loc, "expected valid literal but got '" + value +
279 return emitError(
323 return emitError(loc,
339 return emitError(curToken.getLoc(),
374 return emitError(loc, "optional group has no anchor element");
392 return emitError(loc, "first parsable element of an optional group must be "
403 return emitError(loc, "'custom' is only valid as a top-level directive");
441 return emitError(loc, "'ref' is only valid within a `custom` directive");
484 StringRef value, function_ref<void(Twine)> emitError) {
486 if (emitError)
487 emitError("keywords cannot be empty");
491 if (emitError)
492 emitError("valid keyword starts with a letter or '_'");
498 if (emitError)
499 emitError(
507 function_ref<void(Twine)> emitError) {
509 if (emitError)
510 emitError("literal can't be empty");
521 if (emitError)
522 emitError("single character literal must be a letter or one of '" + bare +
533 return canFormatStringAsKeyword(value, emitError);