Fix begin_keywords "1364-2001-noconfig" #28
This commit is contained in:
parent
483cd7a20e
commit
a60246e8b7
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## [Unreleased](https://github.com/dalance/sv-parser/compare/v0.9.0...Unreleased) - ReleaseDate
|
## [Unreleased](https://github.com/dalance/sv-parser/compare/v0.9.0...Unreleased) - ReleaseDate
|
||||||
|
|
||||||
|
* [Fixed] begin_keywords "1364-2001-noconfig" failure [#28](https://github.com/dalance/sv-parser/issues/28)
|
||||||
* [Changed] update nom to 6.0.0
|
* [Changed] update nom to 6.0.0
|
||||||
|
|
||||||
## [v0.9.0](https://github.com/dalance/sv-parser/compare/v0.8.3...v0.9.0) - 2020-11-11
|
## [v0.9.0](https://github.com/dalance/sv-parser/compare/v0.8.3...v0.9.0) - 2020-11-11
|
||||||
|
@ -849,14 +849,14 @@ pub(crate) fn version_specifier(s: Span) -> IResult<Span, VersionSpecifier> {
|
|||||||
begin_keywords("1364-2005");
|
begin_keywords("1364-2005");
|
||||||
x
|
x
|
||||||
}),
|
}),
|
||||||
map(keyword("1364-2001"), |x| {
|
|
||||||
begin_keywords("1364-2001");
|
|
||||||
x
|
|
||||||
}),
|
|
||||||
map(keyword("1364-2001-noconfig"), |x| {
|
map(keyword("1364-2001-noconfig"), |x| {
|
||||||
begin_keywords("1364-2001-noconfig");
|
begin_keywords("1364-2001-noconfig");
|
||||||
x
|
x
|
||||||
}),
|
}),
|
||||||
|
map(keyword("1364-2001"), |x| {
|
||||||
|
begin_keywords("1364-2001");
|
||||||
|
x
|
||||||
|
}),
|
||||||
map(keyword("1364-1995"), |x| {
|
map(keyword("1364-1995"), |x| {
|
||||||
begin_keywords("1364-1995");
|
begin_keywords("1364-1995");
|
||||||
x
|
x
|
||||||
|
@ -428,6 +428,15 @@ mod unit {
|
|||||||
r##"module a; always begin a = b.c'(0); end endmodule"##,
|
r##"module a; always begin a = b.c'(0); end endmodule"##,
|
||||||
Ok((_, _))
|
Ok((_, _))
|
||||||
);
|
);
|
||||||
|
test!(
|
||||||
|
source_text,
|
||||||
|
r##"`begin_keywords "1364-2001-noconfig" // use IEEE Std 1364-2001 Verilog keywords
|
||||||
|
module m2;
|
||||||
|
reg [63:0] logic; // OK: "logic" is not a keyword in 1364-2001
|
||||||
|
endmodule
|
||||||
|
`end_keywords"##,
|
||||||
|
Ok((_, _))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user