mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 16:48:12 +02:00
* keyword check patch from Gerhard Scholz
git-svn-id: trunk@530 -
This commit is contained in:
parent
c0940a617a
commit
8e29f17019
@ -213,7 +213,8 @@ implementation
|
||||
var
|
||||
low,high,mid : longint;
|
||||
begin
|
||||
if not (length(s) in [tokenlenmin..tokenlenmax]) then
|
||||
if not (length(s) in [tokenlenmin..tokenlenmax]) or
|
||||
not (s[1] in ['a'..'z','A'..'Z']) then
|
||||
begin
|
||||
is_keyword:=false;
|
||||
exit;
|
||||
@ -869,9 +870,6 @@ implementation
|
||||
mac.is_used:=true;
|
||||
if (cs_support_macro in aktmoduleswitches) then
|
||||
begin
|
||||
{ key words are never substituted }
|
||||
if is_keyword(hs) then
|
||||
Message(scan_e_keyword_cant_be_a_macro);
|
||||
{ !!!!!! handle macro params, need we this? }
|
||||
current_scanner.skipspace;
|
||||
|
||||
@ -887,6 +885,10 @@ implementation
|
||||
current_scanner.skipspace;
|
||||
end;
|
||||
|
||||
{ key words are never substituted }
|
||||
if is_keyword(hs) then
|
||||
Message(scan_e_keyword_cant_be_a_macro);
|
||||
|
||||
new(macrobuffer);
|
||||
macropos:=0;
|
||||
{ parse macro, brackets are counted so it's possible
|
||||
|
Loading…
Reference in New Issue
Block a user