mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add lexing for dump-sem-ir-start and end (#5357)
Syntax rationale is on `DumpSemIRRange` to try and record this, since I'm not sure this belongs in the language design. The intent of this is to be able to subset SemIR, which will be done separately in the formatter. --------- Co-authored-by: David Blaikie <dblaikie@gmail.com>
This commit is contained in:
co-authored by
David Blaikie
parent
fb39e3c569
commit
a342e5c117
@@ -236,6 +236,14 @@ auto TokenizedBuffer::Print(llvm::raw_ostream& output_stream,
|
||||
PrintToken(output_stream, token, widths);
|
||||
output_stream << "\n";
|
||||
}
|
||||
|
||||
if (!dump_sem_ir_ranges_.empty()) {
|
||||
output_stream << " dump_sem_ir_ranges:\n";
|
||||
for (auto range : dump_sem_ir_ranges_) {
|
||||
output_stream << " - {start: " << range.start.index
|
||||
<< ", end: " << range.end.index << "}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto TokenizedBuffer::PrintToken(llvm::raw_ostream& output_stream,
|
||||
|
||||
Reference in New Issue
Block a user