par-tchk.adb (TF_Semicolon): Improve error recovery
2007-08-14 Robert Dewar <dewar@adacore.com> * par-tchk.adb (TF_Semicolon): Improve error recovery From-SVN: r127424
This commit is contained in:
parent
7dc5f546f0
commit
852ab9d007
|
@ -696,13 +696,15 @@ package body Tchk is
|
|||
|
||||
T_Semicolon;
|
||||
|
||||
-- Scan out junk on rest of line
|
||||
-- Scan out junk on rest of line. Scan stops on END keyword, since
|
||||
-- that seems to help avoid cascaded errors.
|
||||
|
||||
Save_Scan_State (Scan_State); -- at start of junk tokens
|
||||
|
||||
loop
|
||||
if Prev_Token_Ptr < Current_Line_Start
|
||||
or else Token = Tok_EOF
|
||||
or else Token = Tok_End
|
||||
then
|
||||
Restore_Scan_State (Scan_State); -- to where we were
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue