[BACK]Return to awkgram.y CVS log [TXT][DIR] Up to [local] / src / usr.bin / awk

Diff for /src/usr.bin/awk/awkgram.y between version 1.11 and 1.12

version 1.11, 2020/06/10 21:02:33 version 1.12, 2020/06/10 21:03:56
Line 33 
Line 33 
   
 Node    *beginloc = 0;  Node    *beginloc = 0;
 Node    *endloc = 0;  Node    *endloc = 0;
 int     infunc  = 0;    /* = 1 if in arglist or body of func */  bool    infunc  = false;        /* = true if in arglist or body of func */
 int     inloop  = 0;    /* = 1 if in while, for, do */  int     inloop  = 0;    /* >= 1 if in while, for, do; can't be bool, since loops can next */
 char    *curfname = 0;  /* current function name */  char    *curfname = 0;  /* current function name */
 Node    *arglist = 0;   /* list of args for current function */  Node    *arglist = 0;   /* list of args for current function */
 %}  %}
Line 183 
Line 183 
                 { beginloc = linkum(beginloc, $3); $$ = 0; }                  { beginloc = linkum(beginloc, $3); $$ = 0; }
         | XEND lbrace stmtlist '}'          | XEND lbrace stmtlist '}'
                 { endloc = linkum(endloc, $3); $$ = 0; }                  { endloc = linkum(endloc, $3); $$ = 0; }
         | FUNC funcname '(' varlist rparen {infunc++;} lbrace stmtlist '}'          | FUNC funcname '(' varlist rparen {infunc = true;} lbrace stmtlist '}'
                 { infunc--; curfname=0; defn((Cell *)$2, $4, $8); $$ = 0; }                  { infunc = false; curfname=0; defn((Cell *)$2, $4, $8); $$ = 0; }
         ;          ;
   
 pa_stats:  pa_stats:

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12