[Ada] Improve error recovery
authorArnaud Charlet <charlet@adacore.com>
Fri, 13 Nov 2020 14:56:14 +0000 (09:56 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 30 Nov 2020 14:16:19 +0000 (09:16 -0500)
gcc/ada/

* par-ch6.adb (P_Formal_Part): Remove extra call to Scan.
* par-tchk.adb: Minor reformatting.

gcc/ada/par-ch6.adb
gcc/ada/par-tchk.adb

index c8f4d87f045486aef4636a3feda6b47a8eadf14d..0fcd23ab914c4823c42182a7654643035fa4cd1f 100644 (file)
@@ -1650,7 +1650,6 @@ package body Ch6 is
 
          elsif Token = Tok_Comma then
             T_Semicolon;
-            Scan; -- past comma
 
          --  Special check for omitted separator
 
index 65ff45aa0e6fcf6262ca90ba46bd59ade45db8f4..7a3ed5c1839dac68ab0619c5d32906e809156346 100644 (file)
@@ -436,7 +436,6 @@ package body Tchk is
 
    procedure T_Semicolon is
    begin
-
       if Token = Tok_Semicolon then
          Scan;