Fix resetall wrongly clear define list

This commit is contained in:
dalance 2019-11-22 19:51:20 +09:00
parent 4ba38f42db
commit 7b54b36c8c
2 changed files with 3 additions and 3 deletions

View File

@ -2,6 +2,8 @@
## [Unreleased](https://github.com/dalance/sv-parser/compare/v0.4.3...Unreleased) - ReleaseDate ## [Unreleased](https://github.com/dalance/sv-parser/compare/v0.4.3...Unreleased) - ReleaseDate
* [Fix] \`resetall wrongly clear define list
## [v0.4.3](https://github.com/dalance/sv-parser/compare/v0.4.2...v0.4.3) - 2019-11-15 ## [v0.4.3](https://github.com/dalance/sv-parser/compare/v0.4.2...v0.4.3) - 2019-11-15
* [Added] parse_sv_str/parse_lib_str * [Added] parse_sv_str/parse_lib_str

View File

@ -176,9 +176,7 @@ pub fn preprocess_str<T: AsRef<Path>, U: AsRef<Path>>(
} }
} }
match n { match n {
NodeEvent::Enter(RefNode::ResetallCompilerDirective(_)) if !skip => { NodeEvent::Enter(RefNode::ResetallCompilerDirective(_)) if !skip => {}
defines.clear();
}
NodeEvent::Enter(RefNode::UndefineCompilerDirective(x)) if !skip => { NodeEvent::Enter(RefNode::UndefineCompilerDirective(x)) if !skip => {
let (_, _, ref name) = x.nodes; let (_, _, ref name) = x.nodes;
let id = identifier((&name.nodes.0).into(), &s).unwrap(); let id = identifier((&name.nodes.0).into(), &s).unwrap();