parser: Fix line location for implicit named port connections

The implicitly generated identifier for implicit named port connections
gets its file and line information from the optional attributes. If no
attribute list is specified this will just point to the beginning of the
file resulting in incorrect line information.

Use the file and line information from the identifier token instead to fix
this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2023-06-12 08:59:17 -07:00
parent 75cd1a19f0
commit d040804036
1 changed files with 1 additions and 1 deletions

View File

@ -5731,7 +5731,7 @@ port_name
{ named_pexpr_t*tmp = new named_pexpr_t;
tmp->name = lex_strings.make($3);
tmp->parm = new PEIdent(lex_strings.make($3), true);
FILE_NAME(tmp->parm, @1);
FILE_NAME(tmp->parm, @3);
delete[]$3;
delete $1;
$$ = tmp;