Add addl support for rules reader/compiler subclasses

To support subclasses that may extend the falco rules format, add
additional error/warning/item types for an extension item.

When subclasses report errors and warnings, they can use these
codes/item types in context objects and still provide an exact
line/column context.

Also make some previously static functions in rules reader protected
methods so they can be used in sub-classes.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
Mark Stemm
2024-01-11 13:02:10 -08:00
committed by poiana
parent eed5b906a8
commit ce5a50cbb5
5 changed files with 31 additions and 8 deletions

View File

@@ -58,7 +58,8 @@ namespace rule_loader
RULE_OUTPUT,
RULE_OUTPUT_EXPRESSION,
RULE_PRIORITY,
OVERRIDE
OVERRIDE,
EXTENSION_ITEM
};
static const std::string& item_type_as_string(enum item_type it);