Branch: Tag:

1998-04-10

1998-04-10 04:35:20 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

recursive module references now generates errors

Rev: src/ChangeLog:1.144
Rev: src/language.yacc:1.71
Rev: src/las.c:1.58

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: las.c,v 1.57 1998/04/09 20:38:28 hubbe Exp $"); + RCSID("$Id: las.c,v 1.58 1998/04/10 04:35:20 hubbe Exp $");      #include "language.h"   #include "interpret.h"
27:   #include "pike_macros.h"   #include "peep.h"   #include "builtin_functions.h" + #include "cyclic.h"      #define LASDEBUG   
704:    break;       default: +  { +  DECLARE_CYCLIC(); +  if(BEGIN_CYCLIC(sp[-1].u.refs, id)) +  { +  my_yyerror("Recursive module dependency in '%s'.",id->str); +  pop_stack(); +  push_int(0); +  }else{ +  SET_CYCLIC_RET(1);    ref_push_string(id);    f_index(2);   
713:    {    my_yyerror("Index '%s' not present in module.",id->str);    } +  END_CYCLIC();    }    } -  +  } +  }    UNSETJMP(tmp);    ret=mkconstantsvaluenode(sp-1);    pop_stack();