diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-11-27 16:05:05 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-11-27 16:05:05 +0100 |
commit | 81f1ec1d0b48bb2329a0c781991a7169b4f6b3c8 (patch) | |
tree | 05a200b9840ddc5fa98600d601c0ba0e332ac08b /src/file_comments.ads | |
parent | b7c64a01147ffb7127b6ba94b04aa437f313f3be (diff) | |
download | ghdl-81f1ec1d0b48bb2329a0c781991a7169b4f6b3c8.tar.gz ghdl-81f1ec1d0b48bb2329a0c781991a7169b4f6b3c8.tar.bz2 ghdl-81f1ec1d0b48bb2329a0c781991a7169b4f6b3c8.zip |
file_comments: fix handling of comment on the same line.
Diffstat (limited to 'src/file_comments.ads')
-rw-r--r-- | src/file_comments.ads | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/file_comments.ads b/src/file_comments.ads index 0afc4fcbd..0869ed31b 100644 --- a/src/file_comments.ads +++ b/src/file_comments.ads @@ -35,7 +35,7 @@ package File_Comments is procedure Add_Comment (Start, Last : Source_Ptr; Line_Start : Source_Ptr); - -- A newline (after a comment) has been scanned. + -- A newline *after a comment* has been scanned. -- If this is a blank line, comments before the blank line are attached -- to the previous node. procedure Comment_Newline (Line_Start : Source_Ptr); @@ -117,7 +117,11 @@ private -- If the next comment is on the same line, it will be attached to -- LAST_NODE, and so will be the next comments. - State_Line + State_Line, + + -- Continuation of line. Any comment is attached to the LAST_NODE, + -- until an empty line. + State_Line_Cont ); type Comment_Context is record |