2 * filter-visitor-ir-check-binary-op-nesting.c
4 * LTTng filter IR check binary op nesting
6 * Copyright 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 * SPDX-License-Identifier: LGPL-2.1-only
18 #include "filter-ast.h"
19 #include "filter-parser.h"
20 #include "filter-ir.h"
22 #include <common/compat/errno.h>
23 #include <common/macros.h>
26 int check_bin_op_nesting_recursive(struct ir_op
*node
, int nesting
)
31 fprintf(stderr
, "[error] %s: unknown op type\n", __func__
);
35 return check_bin_op_nesting_recursive(node
->u
.root
.child
,
40 return check_bin_op_nesting_recursive(node
->u
.unary
.child
,
46 ret
= check_bin_op_nesting_recursive(node
->u
.binary
.left
,
50 return check_bin_op_nesting_recursive(node
->u
.binary
.right
,
57 ret
= check_bin_op_nesting_recursive(node
->u
.logical
.left
,
61 return check_bin_op_nesting_recursive(node
->u
.logical
.right
,
68 int filter_visitor_ir_check_binary_op_nesting(struct filter_parser_ctx
*ctx
)
70 return check_bin_op_nesting_recursive(ctx
->ir_root
, 0);
This page took 0.03172 seconds and 4 git commands to generate.