X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Ffilter%2Ffilter-ast.h;h=2b460b401ef669d87a3ab9da67e973a564914e59;hb=b66cbf1731486ab4dc7e0b2e1c3fa05cc5360c19;hp=d7a5674451db2ee8f9872f9134784710b43aba78;hpb=48a4000561343808724f7cb5fa8c131877489ccd;p=lttng-tools.git diff --git a/src/common/filter/filter-ast.h b/src/common/filter/filter-ast.h index d7a567445..2b460b401 100644 --- a/src/common/filter/filter-ast.h +++ b/src/common/filter/filter-ast.h @@ -20,10 +20,6 @@ #include #include -#if defined(__cplusplus) -extern "C" { -#endif - #define printf_debug(fmt, args...) \ do { \ if (filter_parser_debug) \ @@ -93,6 +89,16 @@ enum ast_link_type { AST_LINK_BRACKET, }; +enum ast_expt_type { + AST_EXP_UNKNOWN = 0, + AST_EXP_STRING, + AST_EXP_CONSTANT, + AST_EXP_FLOAT_CONSTANT, + AST_EXP_IDENTIFIER, + AST_EXP_GLOBAL_IDENTIFIER, + AST_EXP_NESTED, +}; + struct filter_node { /* * Parent node is only set on demand by specific visitor. @@ -110,15 +116,7 @@ struct filter_node { struct filter_node *child; } root; struct { - enum { - AST_EXP_UNKNOWN = 0, - AST_EXP_STRING, - AST_EXP_CONSTANT, - AST_EXP_FLOAT_CONSTANT, - AST_EXP_IDENTIFIER, - AST_EXP_GLOBAL_IDENTIFIER, - AST_EXP_NESTED, - } type; + enum ast_expt_type type; enum ast_link_type post_op; /* reverse */ enum ast_link_type pre_op; /* forward */ union { @@ -192,8 +190,4 @@ int filter_visitor_ir_validate_string(struct filter_parser_ctx *ctx); int filter_visitor_ir_normalize_glob_patterns(struct filter_parser_ctx *ctx); int filter_visitor_ir_validate_globbing(struct filter_parser_ctx *ctx); -#if defined(__cplusplus) -} -#endif - #endif /* _FILTER_AST_H */