Branch: Tag:

2002-05-05

2002-05-05 16:31:08 by Martin Stjernholm <mast@lysator.liu.se>

Implemented global.Foo to be able to resolve the module Foo even when there
is a local identifier with that name.

Rev: src/language.yacc:1.277
Rev: src/program.c:1.423
Rev: src/program.h:1.157
Rev: src/testsuite.in:1.510

113:   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.276 2002/05/05 13:03:42 mast Exp $"); + RCSID("$Id: language.yacc,v 1.277 2002/05/05 16:31:06 mast Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif
3258:    copy_shared_string(Pike_compiler->last_identifier, $2->u.sval.u.string);    free_node($2);    } +  | TOK_GLOBAL '.' TOK_IDENTIFIER +  { +  $$ = resolve_identifier ($3->u.sval.u.string); +  if(Pike_compiler->last_identifier) free_string(Pike_compiler->last_identifier); +  copy_shared_string(Pike_compiler->last_identifier, $3->u.sval.u.string); +  free_node ($3); +  }    | idents '.' bad_identifier {}    | idents '.' error {}    ;