diff options
author | Tristan Gingold | 2014-06-14 17:12:21 +0200 |
---|---|---|
committer | Tristan Gingold | 2014-06-14 17:12:21 +0200 |
commit | e849553d7deea2c6c7d97012043946e1e105783e (patch) | |
tree | 569143d5e997aeaf1419d2e230ff5c9374c12aab | |
parent | b0c65a8dfe7ab810645aa995813d02bf32899cf4 (diff) | |
download | ghdl-e849553d7deea2c6c7d97012043946e1e105783e.tar.gz ghdl-e849553d7deea2c6c7d97012043946e1e105783e.tar.bz2 ghdl-e849553d7deea2c6c7d97012043946e1e105783e.zip |
aggregate: set location on '('
-rw-r--r-- | parse.adb | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -3487,7 +3487,10 @@ package body Parse is Loc : Location_Type; begin Loc := Get_Token_Location; + + -- Skip '(' Scan; + if Current_Token /= Tok_Others then Expr := Parse_Expression; case Current_Token is @@ -3516,11 +3519,7 @@ package body Parse is Expr := Null_Iir; end if; Res := Create_Iir (Iir_Kind_Aggregate); - if Expr /= Null_Iir then - Location_Copy (Res, Expr); - else - Set_Location (Res); - end if; + Set_Location (Res, Loc); Build_Init (Last); loop if Current_Token = Tok_Others then |