mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-08 18:46:15 +02:00
Add a comment explaining the state machine.
This commit is contained in:
parent
04c36de355
commit
5f5cf9dc7f
@ -56,6 +56,10 @@ fn main() -> anyhow::Result<()> {
|
||||
.with_context(|| format!("Failed to open {:?}", input_filename))?;
|
||||
let parser = Parser::new(&input_contents);
|
||||
|
||||
// Find a specially-formatted comment followed by a code block, and then call `write_output`
|
||||
// with the contents of the code block, to write to a file named by the comment. Code blocks
|
||||
// without matching comments will be ignored, as will comments which are not followed by a code
|
||||
// block.
|
||||
let mut next_filename: Option<String> = None;
|
||||
let mut current_file: Option<File> = None;
|
||||
for event in parser {
|
||||
|
Loading…
x
Reference in New Issue
Block a user