diff options
Diffstat (limited to 'frontend/ast_util.ml')
-rw-r--r-- | frontend/ast_util.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/frontend/ast_util.ml b/frontend/ast_util.ml index d229f2f..d687d95 100644 --- a/frontend/ast_util.ml +++ b/frontend/ast_util.ml @@ -43,7 +43,8 @@ let extract_const_decls = let rec extract_instances p e = match fst e with | AST_idconst _ | AST_identifier _ | AST_int_const _ | AST_real_const _ | AST_bool_const _ -> [] - | AST_unary (_, e') | AST_pre (e', _) | AST_not e' -> extract_instances p e' + | AST_unary (_, e') | AST_pre (e', _) + | AST_not e' | AST_cast(e', _) -> extract_instances p e' | AST_binary(_, e1, e2) | AST_binary_rel (_, e1, e2) | AST_binary_bool (_, e1, e2) | AST_arrow(e1, e2) -> extract_instances p e1 @ extract_instances p e2 @@ -62,7 +63,7 @@ let rec extract_instances p e = match fst e with let rec extract_pre e = match fst e with | AST_identifier _ | AST_idconst _ | AST_int_const _ | AST_real_const _ | AST_bool_const _ -> [] - | AST_unary (_, e') | AST_not e' -> extract_pre e' + | AST_unary (_, e') | AST_not e' | AST_cast(e', _) -> extract_pre e' | AST_binary(_, e1, e2) | AST_binary_rel (_, e1, e2) | AST_binary_bool (_, e1, e2) | AST_arrow(e1, e2) -> extract_pre e1 @ extract_pre e2 |