mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-20 19:32:05 +00:00
libparse: fix space ANDs
This commit is contained in:
parent
e960428587
commit
21e68ec9be
1 changed files with 3 additions and 1 deletions
|
@ -240,7 +240,7 @@ LibertyExpression LibertyExpression::parse(Lexer &s, int min_prio) {
|
||||||
|
|
||||||
if (isspace(c)) {
|
if (isspace(c)) {
|
||||||
// Rewind past this space and any further spaces
|
// Rewind past this space and any further spaces
|
||||||
while (isspace(c) && !s.empty()) {
|
while (isspace(c)) {
|
||||||
if (s.empty())
|
if (s.empty())
|
||||||
return lhs;
|
return lhs;
|
||||||
s.next();
|
s.next();
|
||||||
|
@ -257,6 +257,8 @@ LibertyExpression LibertyExpression::parse(Lexer &s, int min_prio) {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto rhs = parse(s, 4);
|
auto rhs = parse(s, 4);
|
||||||
|
if (rhs.kind == EMPTY)
|
||||||
|
continue;
|
||||||
auto n = LibertyExpression{};
|
auto n = LibertyExpression{};
|
||||||
n.kind = Kind::AND;
|
n.kind = Kind::AND;
|
||||||
n.children.push_back(lhs);
|
n.children.push_back(lhs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue