Branch: Tag:

1998-01-20

1998-01-20 02:30:39 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

fixed so that anonymous classes work again

Rev: src/compilation.h:1.5
Rev: src/language.yacc:1.53
Rev: src/program.c:1.52
Rev: src/program.h:1.25
Rev: src/testsuite.in:1.67

162:   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.52 1998/01/19 18:38:45 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.53 1998/01/20 02:30:35 hubbe Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif
921:    f=dooptcode(name,    mknode(F_ARG_LIST,$4,mknode(F_RETURN,mkintnode(0),0)),    type, -  0); +  ID_PRIVATE);    }    free_string(name);    free_string(type);
935:    | error { yyerrok; }    ;    - class: modifiers F_CLASS F_IDENTIFIER + class: modifiers F_CLASS optional_identifier    { -  +  if(!$3) +  { +  char buffer[42]; +  sprintf(buffer,"__class_%ld",local_class_counter++); +  $3=make_shared_string(buffer); +  $1|=ID_PRIVATE; +  }    if(compiler_pass==1)    {    low_start_new_program(0, $3, $1);