mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 22:23:23 +00:00
Support array ranges for identifiers in the Liberty parser.
This change only handles the case `id : id[range] ;`.
This commit is contained in:
parent
ac1033ecd5
commit
23f59e0196
2 changed files with 5 additions and 3 deletions
|
@ -437,6 +437,8 @@ LibertyAst *LibertyParser::parse()
|
|||
tok = lexer(ast->value);
|
||||
if (tok == 'v') {
|
||||
tok = lexer(str);
|
||||
if (tok == '[')
|
||||
tok = parse_vector_range(tok);
|
||||
}
|
||||
while (tok == '+' || tok == '-' || tok == '*' || tok == '/' || tok == '!') {
|
||||
ast->value += tok;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue