Branch: Tag:

1998-06-06

1998-06-06 03:27:26 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

new functions: is_call_to and node_may_overload

Rev: src/las.c:1.63
Rev: src/las.h:1.15

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: las.c,v 1.62 1998/05/12 23:51:26 hubbe Exp $"); + RCSID("$Id: las.c,v 1.63 1998/06/06 03:27:25 hubbe Exp $");      #include "language.h"   #include "interpret.h"
956:    }   }    + int node_may_overload(node *n, int lfun) + { +  if(!n) return 0; +  if(!n->type) return 1; +  return type_may_overload(n->type->str, lfun); + } +    node **last_cmd(node **a)   {    node **n;
1001:   }      node **my_get_arg(node **a,int n) { return low_get_arg(a,&n); } - /* static node **first_arg(node **a) { return my_get_arg(a,0); } */ +     -  + node **is_call_to(node *n, c_fun f) + { +  switch(n->token) +  { +  case F_APPLY: +  if(CAR(n) && +  CAR(n)->token == F_CONSTANT && +  CAR(n)->u.sval.type == T_FUNCTION && +  CAR(n)->u.sval.subtype == FUNCTION_BUILTIN && +  CAR(n)->u.sval.u.efun->function == f) +  return & CDR(n); +  } +  return 0; + } +  +    static void low_print_tree(node *foo,int needlval)   {    if(!foo) return;