From 2e692659dfa2f4174237b256c00c8ef1f8b5c7e1 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 26 Nov 2002 22:58:24 +0000 Subject: [PATCH] * fix for tw2178. When a ^ or . follows a procsym then the procsym needs to be called --- compiler/pexpr.pas | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas index c77e266a6c..0e35e0f275 100644 --- a/compiler/pexpr.pas +++ b/compiler/pexpr.pas @@ -640,9 +640,8 @@ implementation end else begin - if token=_LKLAMMER then + if try_to_consume(_LKLAMMER) then begin - consume(_LKLAMMER); para:=parse_paras(false,false); consume(_RKLAMMER); end; @@ -898,7 +897,7 @@ implementation procsym: begin do_proc_call(sym,sym.owner, - getaddr or + (getaddr and not(token in [_CARET,_POINT])) or (assigned(getprocvardef) and ((block_type=bt_const) or ((m_tp_procvar in aktmodeswitches) and @@ -1235,7 +1234,7 @@ implementation assigned(aktprocsym) and (po_classmethod in aktprocdef.procoptions); do_proc_call(srsym,srsymtable, - getaddr or + (getaddr and not(token in [_CARET,_POINT])) or (assigned(getprocvardef) and ((block_type=bt_const) or ((m_tp_procvar in aktmodeswitches) and @@ -1906,19 +1905,23 @@ implementation consume(_KLAMMERAFFE); got_addrn:=true; { support both @ and @() } - if token=_LKLAMMER then + if try_to_consume(_LKLAMMER) then begin - consume(_LKLAMMER); p1:=factor(true); - consume(_RKLAMMER); if token in [_CARET,_POINT,_LECKKLAMMER] then begin again:=true; postfixoperators(p1,again); end; + consume(_RKLAMMER); end else p1:=factor(true); + if token in [_CARET,_POINT,_LECKKLAMMER] then + begin + again:=true; + postfixoperators(p1,again); + end; got_addrn:=false; p1:=caddrnode.create(p1); if assigned(getprocvardef) and @@ -2261,7 +2264,11 @@ implementation end. { $Log$ - Revision 1.92 2002-11-25 17:43:22 peter + Revision 1.93 2002-11-26 22:58:24 peter + * fix for tw2178. When a ^ or . follows a procsym then the procsym + needs to be called + + Revision 1.92 2002/11/25 17:43:22 peter * splitted defbase in defutil,symutil,defcmp * merged isconvertable and is_equal into compare_defs(_ext) * made operator search faster by walking the list only once