aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-09-03 07:54:52 +0200
committerTristan Gingold <tgingold@free.fr>2021-09-03 08:06:29 +0200
commit1487ffaa14b36c1bc363a4684c42bd58c523cfbd (patch)
treec13a29f645d73425f86c7b62d55faec40dfb285a /src/vhdl
parentc6945eadb8062dc8ff77f66d58974b45abae3563 (diff)
downloadghdl-1487ffaa14b36c1bc363a4684c42bd58c523cfbd.tar.gz
ghdl-1487ffaa14b36c1bc363a4684c42bd58c523cfbd.tar.bz2
ghdl-1487ffaa14b36c1bc363a4684c42bd58c523cfbd.zip
vhdl-scanner.adb: add comments
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/vhdl-scanner.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-scanner.adb b/src/vhdl/vhdl-scanner.adb
index 603e4652b..76e6fe5fd 100644
--- a/src/vhdl/vhdl-scanner.adb
+++ b/src/vhdl/vhdl-scanner.adb
@@ -2011,6 +2011,8 @@ package body Vhdl.Scanner is
when '*' =>
if Source (Pos + 1) = '/' then
if Pos > Current_Context.Token_Pos then
+ -- There are characters before the end of comment, so
+ -- first return them.
Current_Token := Tok_Block_Comment_Text;
else
Pos := Pos + 2;
@@ -2022,6 +2024,8 @@ package body Vhdl.Scanner is
end if;
when CR =>
if Pos > Current_Context.Token_Pos then
+ -- There are characters before the CR, so
+ -- first return them.
Current_Token := Tok_Block_Comment_Text;
else
Scan_CR_Newline;
@@ -2030,6 +2034,8 @@ package body Vhdl.Scanner is
return;
when LF =>
if Pos > Current_Context.Token_Pos then
+ -- There are characters before the LF, so
+ -- first return them.
Current_Token := Tok_Block_Comment_Text;
else
Scan_LF_Newline;