mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
parse.y: Traverse AST post parsing to detect break/next usage issues
Seemed easiest to do it via the traversal infrastructure as we do not otherwise track enough context/scope when instantiating break or next statements. Might be worth moving this out of src/parse.y, but didn't exactly know where. Or maybe we wait until there's more such trivial validations popping up Fixes #2440
This commit is contained in:
parent
2ed42ef771
commit
850aaaa5a8
15 changed files with 227 additions and 2 deletions
12
src/ScriptValidation.h
Normal file
12
src/ScriptValidation.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
#pragma once
|
||||
|
||||
namespace zeek::detail
|
||||
{
|
||||
|
||||
/**
|
||||
* Run extra validations on the parsed AST after everything is initialized
|
||||
* and report any errors via zeek::reporter->Error().
|
||||
*/
|
||||
void script_validation();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue