From 7d74d10e4a25b97ae8bcfbae3de62edf63851da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20L=C3=A4ufer?= Date: Fri, 1 Nov 2024 09:51:47 -0400 Subject: [PATCH] wip: new body parser implementation --- wellen/src/vcd.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wellen/src/vcd.rs b/wellen/src/vcd.rs index 2695fe2..03ec088 100644 --- a/wellen/src/vcd.rs +++ b/wellen/src/vcd.rs @@ -1116,6 +1116,19 @@ fn advance_to_first_newline(input: &[u8]) -> (&[u8], usize) { (&[], 0) // no whitespaces found } + +fn read_body_command<'a>(input: &mut impl BufRead, buf: &'a mut Vec, line_count: ) -> Result> { + // start out with an empty buffer + assert!(buf.is_empty()); + + // skip over any preceding whitespace + let start_char = skip_whitespace(input)?; + + +} + + + struct BodyReader<'a, R: BufRead> { input: &'a mut R, // state