Clean up handling of incomplete line locations. (#3011)

Building on #3010, the handling of incomplete lines seems like it can be
straightened out. Doing this separately because it seemed better to
demonstrate tests aren't affected by the change.
This commit is contained in:
Jon Ross-Perkins
2023-07-24 23:17:58 +00:00
committed by GitHub
parent a3d52b089d
commit a7c2885728
5 changed files with 51 additions and 49 deletions
+1 -2
View File
@@ -20,8 +20,7 @@ namespace Carbon {
auto ParseTree::Parse(TokenizedBuffer& tokens, DiagnosticConsumer& consumer,
llvm::raw_ostream* vlog_stream) -> ParseTree {
TokenizedBuffer::TokenLocationTranslator translator(
&tokens, /*last_line_lexed_to_column=*/nullptr);
TokenizedBuffer::TokenLocationTranslator translator(&tokens);
TokenDiagnosticEmitter emitter(translator, consumer);
// Delegate to the parser.