mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 16:21:04 +01:00
Create Error type (#1137)
Co-authored-by: Geoff Romer <gromer@google.com> Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
committed by
GitHub
co-authored by
Geoff Romer
Chandler Carruth
parent
31fa2608d4
commit
c546c81d07
@@ -314,10 +314,11 @@ string_literal \"([^\\\"\n\v\f\r]|\\.)*\"
|
||||
break;
|
||||
}
|
||||
}
|
||||
llvm::Expected<std::string> block_string = Carbon::ParseBlockStringLiteral(s);
|
||||
if (!block_string) {
|
||||
Carbon::ErrorOr<std::string> block_string =
|
||||
Carbon::ParseBlockStringLiteral(s);
|
||||
if (!block_string.ok()) {
|
||||
FATAL_SYNTAX_ERROR(context)
|
||||
<< "Invalid block string: " << toString(block_string.takeError());
|
||||
<< "Invalid block string: " << block_string.error();
|
||||
}
|
||||
return ARG_TOKEN(string_literal, *block_string);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user