From c514c109ab29dcc7884ebf2d557685251f4990ea Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sat, 25 Jan 2020 19:44:29 -0600 Subject: [PATCH] Allow for function-like macros taking no parameters. This was broken by commit 06a3719304. --- Scanner.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Scanner.pas b/Scanner.pas index facb318..82403f9 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -1394,6 +1394,10 @@ if macro^.parameters >= 0 then begin {find the values of the parameters} done := false; end; {if} until done; + if paramCount = 1 then + if macro^.parameters = 0 then + if parms^.tokens = nil then + paramCount := 0; if paramCount <> macro^.parameters then Error(14); if token.kind <> rparench then begin {insist on a closing ')'}