* resursive macro's fixed in preprocessor

This commit is contained in:
peter 2004-02-26 16:15:45 +00:00
parent fa8ec60ee6
commit 25213e4efb

View File

@ -333,12 +333,24 @@ implementation
var
hs: string;
mac : tmacro;
macrocount,
len : integer;
begin
preproc_substitutedtoken := current_scanner.preproc_pattern;
mac:=tmacro(current_scanner.macros.search(preproc_substitutedtoken));
if assigned(mac) then
result := current_scanner.preproc_pattern;
{ allow macro support in macro's }
macrocount:=0;
repeat
mac:=tmacro(current_scanner.macros.search(result));
if not assigned(mac) then
break;
inc(macrocount);
if macrocount>max_macro_nesting then
begin
Message(scan_w_macro_deep_ten);
break;
end;
if mac.defined and assigned(mac.buftext) then
begin
if mac.buflen>255 then
@ -350,9 +362,9 @@ implementation
len:=mac.buflen;
hs[0]:=char(len);
move(mac.buftext^,hs[1],len);
preproc_substitutedtoken:=upcase(hs);
end;
result:=upcase(hs);
end;
until false;
end;
function read_factor : string;
@ -2968,7 +2980,10 @@ exit_label:
end.
{
$Log$
Revision 1.71 2004-02-25 00:54:47 olle
Revision 1.72 2004-02-26 16:15:45 peter
* resursive macro's fixed in preprocessor
Revision 1.71 2004/02/25 00:54:47 olle
+ mode mac: preproc support for hexadecimal numbers
+ mode mac: preproc support for TRUE, FALSE