summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Gingold2014-06-14 17:12:21 +0200
committerTristan Gingold2014-06-14 17:12:21 +0200
commite849553d7deea2c6c7d97012043946e1e105783e (patch)
tree569143d5e997aeaf1419d2e230ff5c9374c12aab
parentb0c65a8dfe7ab810645aa995813d02bf32899cf4 (diff)
downloadghdl-e849553d7deea2c6c7d97012043946e1e105783e.tar.gz
ghdl-e849553d7deea2c6c7d97012043946e1e105783e.tar.bz2
ghdl-e849553d7deea2c6c7d97012043946e1e105783e.zip
aggregate: set location on '('
-rw-r--r--parse.adb9
1 files changed, 4 insertions, 5 deletions
diff --git a/parse.adb b/parse.adb
index b1ddc74..109c0bf 100644
--- a/parse.adb
+++ b/parse.adb
@@ -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