mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Removing in_hook variable in parser.
I believe that's unnecessary and tests indeed pass just fine without it.
This commit is contained in:
parent
d9bb9e0eb1
commit
6c2ee1ef54
1 changed files with 5 additions and 6 deletions
11
src/parse.y
11
src/parse.y
|
@ -119,7 +119,6 @@ extern const char* g_curr_debug_error;
|
|||
|
||||
#define YYLTYPE yyltype
|
||||
|
||||
static bool in_hook = false;
|
||||
int in_init = 0;
|
||||
int in_record = 0;
|
||||
bool resolving_global_ID = false;
|
||||
|
@ -1373,11 +1372,11 @@ stmt:
|
|||
brofiler.AddStmt($$);
|
||||
}
|
||||
|
||||
| TOK_HOOK { in_hook = true; } hook { in_hook = false; } ';' opt_no_test
|
||||
| TOK_HOOK hook ';' opt_no_test
|
||||
{
|
||||
set_location(@1, @5);
|
||||
$$ = new HookStmt($3);
|
||||
if ( ! $6 )
|
||||
set_location(@1, @4);
|
||||
$$ = new HookStmt($2);
|
||||
if ( ! $4 )
|
||||
brofiler.AddStmt($$);
|
||||
}
|
||||
|
||||
|
@ -1538,7 +1537,7 @@ hook:
|
|||
expr '(' opt_expr_list ')'
|
||||
{
|
||||
set_location(@1, @4);
|
||||
$$ = new CallExpr($1, $3, in_hook);
|
||||
$$ = new CallExpr($1, $3, true);
|
||||
}
|
||||
;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue