From 877e9797d7efbc252e77ad05b9c99e18e555b03a Mon Sep 17 00:00:00 2001
From: Tristan Gingold <tgingold@free.fr>
Date: Wed, 23 Nov 2022 07:55:44 +0100
Subject: vhdl-parse: add a comment

---
 src/vhdl/vhdl-parse.adb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb
index d24cde24d..38063b45b 100644
--- a/src/vhdl/vhdl-parse.adb
+++ b/src/vhdl/vhdl-parse.adb
@@ -140,8 +140,10 @@ package body Vhdl.Parse is
    begin
       case Token is
          when Tok_Semi_Colon
-           | Tok_Right_Paren
-           | Tok_Comma =>
+            | Tok_Right_Paren
+            | Tok_Comma =>
+            --  Improve the location of the error: point just after the last
+            --  token so that new lines don't have a bad effect.
             Loc := Get_Prev_Location;
          when others =>
             Loc := Get_Token_Location;
-- 
cgit v1.2.3