mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-23 20:59:19 +02:00
Report correct error positions inside macros (at least more often).
This commit is contained in:
parent
12f0ccbb01
commit
224f62a843
@ -2564,7 +2564,6 @@ type
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
mac.defined:=true;
|
mac.defined:=true;
|
||||||
mac.fileinfo:=current_tokenpos;
|
|
||||||
mac.is_compiler_var:=false;
|
mac.is_compiler_var:=false;
|
||||||
{ delete old definition }
|
{ delete old definition }
|
||||||
mac.free_buftext;
|
mac.free_buftext;
|
||||||
@ -2591,6 +2590,9 @@ type
|
|||||||
if is_keyword(hs) then
|
if is_keyword(hs) then
|
||||||
Message(scan_e_keyword_cant_be_a_macro);
|
Message(scan_e_keyword_cant_be_a_macro);
|
||||||
|
|
||||||
|
current_scanner.gettokenpos;
|
||||||
|
mac.fileinfo:=current_tokenpos;
|
||||||
|
|
||||||
macropos:=0;
|
macropos:=0;
|
||||||
{ parse macro, brackets are counted so it's possible
|
{ parse macro, brackets are counted so it's possible
|
||||||
to have a $ifdef etc. in the macro }
|
to have a $ifdef etc. in the macro }
|
||||||
|
Loading…
Reference in New Issue
Block a user