aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-01-15 08:01:27 +0100
committerTristan Gingold <tgingold@free.fr>2017-01-15 08:01:27 +0100
commitf6c9bc0e66602c86003f118d8d8e35693d4abcaf (patch)
treea7b9a92a785d9c0ceec7a901a27a5b657374c1e4 /src/ghdldrv
parent26cb40f846c974ccec22bf1165e5b519bba2247c (diff)
downloadghdl-f6c9bc0e66602c86003f118d8d8e35693d4abcaf.tar.gz
ghdl-f6c9bc0e66602c86003f118d8d8e35693d4abcaf.tar.bz2
ghdl-f6c9bc0e66602c86003f118d8d8e35693d4abcaf.zip
Add xref_keyword for PSL keywords that aren't reserved words.
Diffstat (limited to 'src/ghdldrv')
-rw-r--r--src/ghdldrv/ghdlprint.adb13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb
index d228f2d1f..53df620ae 100644
--- a/src/ghdldrv/ghdlprint.adb
+++ b/src/ghdldrv/ghdlprint.adb
@@ -233,22 +233,26 @@ package body Ghdlprint is
Bod : Iir;
Loc : Location_Type;
begin
- Disp_Spaces;
if Flags.Flag_Xref then
Loc := File_Pos_To_Location (File, Bef_Tok);
Ref := Find (Loc);
if Ref = Bad_Xref then
+ Disp_Spaces;
Disp_Text;
Warning_Msg_Sem (Warnid_Missing_Xref, Loc, "cannot find xref");
Missing_Xref := True;
return;
end if;
else
+ Disp_Spaces;
Disp_Text;
return;
end if;
case Get_Xref_Kind (Ref) is
+ when Xref_Keyword =>
+ Disp_Reserved;
when Xref_Decl =>
+ Disp_Spaces;
Put ("<a");
Disp_Anchor (Loc);
Decl := Get_Xref_Node (Ref);
@@ -279,6 +283,7 @@ package body Ghdlprint is
Put ("</a>");
when Xref_Ref
| Xref_End =>
+ Disp_Spaces;
Decl := Get_Xref_Node (Ref);
Loc := Get_Location (Decl);
if Loc /= Location_Nil then
@@ -292,6 +297,7 @@ package body Ghdlprint is
Disp_Text;
end if;
when Xref_Body =>
+ Disp_Spaces;
Put ("<a");
Disp_Anchor (Loc);
Disp_Href (Get_Location (Get_Xref_Node (Ref)));
@@ -1404,6 +1410,8 @@ package body Ghdlprint is
Put (" end ");
when Xref_Body =>
Put (" body ");
+ when Xref_Keyword =>
+ Put (" keyword ");
end case;
New_Line;
end;
@@ -1744,6 +1752,9 @@ package body Ghdlprint is
Emit_Ref (I, 'r');
when Xref_Body =>
Emit_Ref (I, 'b');
+ when Xref_Keyword =>
+ -- Keywords location are not written.
+ null;
end case;
end if;
end loop;