zeek/src/ScriptValidation.h
Benjamin Bannier f5a76c1aed Reformat Zeek in Spicy style
This largely copies over Spicy's `.clang-format` configuration file. The
one place where we deviate is header include order since Zeek depends on
headers being included in a certain order.
2023-10-30 09:40:55 +01:00

23 lines
654 B
C++

// See the file "COPYING" in the main distribution directory for copyright.
#pragma once
namespace zeek::detail {
class Stmt;
/**
* Run extra validations on the parsed AST after everything is initialized
* and report any errors via deprecation warnings or zeek::reporter->Error().
*/
void script_validation();
/**
* Returns true if the given script statement (body) is valid. The
* second argument indicates whether the statement is the body of a hook.
*
* Unlike script_validation(), does not report any errors, just returns
* whether they are present.
*/
bool script_is_valid(const Stmt* s, bool is_in_hook);
} // namespace zeek::detail