Skip to content

Commit

Permalink
parse '{} for string parameter ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcoram authored and arpadbuermen committed Jul 15, 2024
1 parent b2ebaab commit 11e0674
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion openvaf/parser/src/grammar/items.rs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,16 @@ fn constraint(p: &mut Parser) {
m.abandon(p);
return;
}
range_or_expr(p);
if p.eat(T!["'{"]) || p.eat(T!['{']) {
// array range (for string parameters)
expr(p);
while p.eat(T![,]) {
expr(p);
}
p.expect(T!['}']);
} else {
range_or_expr(p);
}
m.complete(p, CONSTRAINT);
}

Expand Down

0 comments on commit 11e0674

Please sign in to comment.