pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:105:   %left TOK_LSH TOK_RSH   %left '+' '-'   %left '*' '%' '/'   %right TOK_NOT '~'   %nonassoc TOK_INC TOK_DEC      %{   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.264 2001/11/29 17:02:34 grubba Exp $"); + RCSID("$Id: language.yacc,v 1.265 2001/12/06 10:01:17 grubba Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif      #include "interpret.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "las.h"   #include "interpret.h"
pike.git/src/language.yacc:3841:    int e,depth=0;    struct compiler_frame *f=Pike_compiler->compiler_frame;       while(1)    {    for(e=f->current_number_of_locals-1;e>=0;e--)    {    if(f->variable[e].name==str)    {    struct compiler_frame *q=Pike_compiler->compiler_frame; -  if(f == q && f->variable[e].def) { -  /*fprintf(stderr, "Found prior definition of \"%s\"\n", str->str); */ -  return copy_node(f->variable[e].def); -  } +        while(q!=f)    {    q->lexical_scope|=SCOPE_SCOPED;    q=q->previous;    }       if(depth)    q->lexical_scope|=SCOPE_SCOPE_USED;       if(q->min_number_of_locals < e+1)    q->min_number_of_locals = e+1; -  +  +  if(f->variable[e].def) { +  /*fprintf(stderr, "Found prior definition of \"%s\"\n", str->str); */ +  return copy_node(f->variable[e].def); +  } +     return mklocalnode(e,depth);    }    }    if(!(f->lexical_scope & SCOPE_LOCAL)) return 0;    depth++;    f=f->previous;    }   }      static void safe_inc_enum(void)