now all calls to next_word and curr_word should be macros where possible
This commit is contained in:
parent
c53c9684e6
commit
def4b26005
|
@ -40,8 +40,11 @@ Here's a command to test on a malformed VCD:
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
- [ ] remove Result<..> from reader
|
||||||
- [ ] be explicit with imports, remove exports as possible
|
- [ ] be explicit with imports, remove exports as possible
|
||||||
once FastWave is known to be fairly stable.
|
once FastWave is known to be fairly stable.
|
||||||
|
- [ ] do a read through all the code
|
||||||
|
- make contents of src/types.rs all public
|
||||||
- [ ] macro for getting line number when propagating errors
|
- [ ] macro for getting line number when propagating errors
|
||||||
- [ ] search for any ok_or's
|
- [ ] search for any ok_or's
|
||||||
- [ ] search for any unwraps or any direct vectors indexing
|
- [ ] search for any unwraps or any direct vectors indexing
|
||||||
|
|
|
@ -223,13 +223,7 @@ pub(super) fn parse_metadata(word_reader: &mut WordReader) -> Result<Metadata, S
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
// check for another word in the file
|
// check for another word in the file
|
||||||
let (word, _) = word_reader.next_word().ok_or(()).map_err(|_| {
|
let (word, _) = next_word!(word_reader)?;
|
||||||
format!(
|
|
||||||
"Error near {}:{}. Did not expect to reach end of file here.",
|
|
||||||
file!(),
|
|
||||||
line!()
|
|
||||||
)
|
|
||||||
})?;
|
|
||||||
|
|
||||||
let ParseResult { matched, residual } = tag(word, "$");
|
let ParseResult { matched, residual } = tag(word, "$");
|
||||||
match matched {
|
match matched {
|
||||||
|
|
Loading…
Reference in a new issue