mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 12:21:06 +01:00
Bracket the tokenized buffer output. (#2446)
This makes TokenizedBuffer more consistent with ParseTree and SemanticsIR, which also wrap with [] to produce a sequence value. It also makes it possible in driver.cpp to just prefix the line with a name, so it ends up with: var_name: [ (content) ] Noticed this due to bracketing comments on #2443 and trying to think of better answers. With this, we can also say that the [] bracket a variable.
This commit is contained in:
@@ -171,7 +171,7 @@ auto Driver::RunDumpSubcommand(DiagnosticConsumer& consumer,
|
||||
tokenized_source.Print(output_stream_);
|
||||
return !tokenized_source.has_errors();
|
||||
}
|
||||
CARBON_VLOG() << tokenized_source;
|
||||
CARBON_VLOG() << "tokenized_buffer: " << tokenized_source;
|
||||
|
||||
CARBON_VLOG() << "*** ParseTree::Parse ***\n";
|
||||
auto parse_tree = ParseTree::Parse(tokenized_source, consumer, vlog_stream_);
|
||||
@@ -181,7 +181,7 @@ auto Driver::RunDumpSubcommand(DiagnosticConsumer& consumer,
|
||||
parse_tree.Print(output_stream_, parse_tree_preorder);
|
||||
return !tokenized_source.has_errors() && !parse_tree.has_errors();
|
||||
}
|
||||
CARBON_VLOG() << parse_tree;
|
||||
CARBON_VLOG() << "parse_tree: " << parse_tree;
|
||||
|
||||
const SemanticsIR builtin_ir = SemanticsIR::MakeBuiltinIR();
|
||||
CARBON_VLOG() << "*** SemanticsIR::MakeFromParseTree ***\n";
|
||||
@@ -194,7 +194,7 @@ auto Driver::RunDumpSubcommand(DiagnosticConsumer& consumer,
|
||||
// TODO: Return false when SemanticsIR has errors (not supported right now).
|
||||
return !tokenized_source.has_errors() && !parse_tree.has_errors();
|
||||
}
|
||||
CARBON_VLOG() << semantics_ir;
|
||||
CARBON_VLOG() << "semantics_ir: " << semantics_ir;
|
||||
|
||||
llvm_unreachable("should handle all dump modes");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user