One more question. With the syntax:

wrapper + 1

I get to the point where I have 2 nodes parsed. p2 is an ordconst node (the 
value “1") and p1 is a load node (wrapper, which is a record). I need to check 
the resultdef for p1 to see if the + operator is overloaded so I can determine 
if the base record or the default property takes precedence.

I think I can use tcallcandidates.create_operator to test this but what do I 
pass for the call param node?

from pexpr.pas:


               p2:=sub_expr(succ(pred_level),flags+[ef_accept_equal],nil);

             case oldt of
               _PLUS :
                 p1:=caddnode.create(addn,p1,p2);
               _MINUS :
                 p1:=caddnode.create(subn,p1,p2);
               _STAR :
                 p1:=caddnode.create(muln,p1,p2);
               _SLASH :
                 p1:=caddnode.create(slashn,p1,p2);
               _EQ:
                 p1:=caddnode.create(equaln,p1,p2);
               _GT :
                 p1:=caddnode.create(gtn,p1,p2);
Regards,
        Ryan Joseph

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to