Commit 839de535 by Robert Dewar Committed by Arnaud Charlet

get_scos.adb (Skip_EOL): Fix error of mishandling end of line after complex condition.

2009-07-23  Robert Dewar  <dewar@adacore.com>

	* get_scos.adb (Skip_EOL): Fix error of mishandling end of line after
	complex condition.

From-SVN: r149975
parent 81d93365
2009-07-23 Robert Dewar <dewar@adacore.com>
* get_scos.adb (Skip_EOL): Fix error of mishandling end of line after
complex condition.
2009-07-23 Gary Dismukes <dismukes@adacore.com> 2009-07-23 Gary Dismukes <dismukes@adacore.com>
* sem_ch6.adb (Check_Return_Subtype_Indication): Replace type equality * sem_ch6.adb (Check_Return_Subtype_Indication): Replace type equality
......
...@@ -56,7 +56,7 @@ procedure Get_SCOs is ...@@ -56,7 +56,7 @@ procedure Get_SCOs is
procedure Skip_EOL; procedure Skip_EOL;
-- Called with the current character about to be read being LF or CR. Skips -- Called with the current character about to be read being LF or CR. Skips
-- past LR/CR characters until either a non-CR/LF character is found, or -- past CR/LF characters until either a non-CR/LF character is found, or
-- the end of file is encountered. -- the end of file is encountered.
procedure Skip_Spaces; procedure Skip_Spaces;
...@@ -274,6 +274,7 @@ begin ...@@ -274,6 +274,7 @@ begin
while C /= CR and then C /= LF loop while C /= CR and then C /= LF loop
if C = 'c' or else C = 't' or else C = 'f' then if C = 'c' or else C = 't' or else C = 'f' then
Cond := C; Cond := C;
Skipc;
Get_Sloc_Range (Loc1, Loc2); Get_Sloc_Range (Loc1, Loc2);
Add_SCO Add_SCO
(C2 => Cond, (C2 => Cond,
...@@ -286,6 +287,7 @@ begin ...@@ -286,6 +287,7 @@ begin
C = '&' or else C = '&' or else
C = '|' C = '|'
then then
Skipc;
Add_SCO (C1 => C, Last => False); Add_SCO (C1 => C, Last => False);
elsif C = ' ' then elsif C = ' ' then
...@@ -295,7 +297,7 @@ begin ...@@ -295,7 +297,7 @@ begin
raise Data_Error; raise Data_Error;
end if; end if;
C := Getc; C := Nextc;
end loop; end loop;
-- Reset Last indication to True for last entry -- Reset Last indication to True for last entry
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment