summaryrefslogtreecommitdiff
path: root/src/ast_util.ml
diff options
context:
space:
mode:
authorThomas Bauereiss2017-10-13 17:01:59 +0100
committerThomas Bauereiss2017-10-13 17:23:39 +0100
commit4043f496ff8dae7fa2bc2b4da4e02d2d9942e66d (patch)
tree963176f812aa7ceb98d0dd8ad6fde02fb670d238 /src/ast_util.ml
parentc9f3f109d9854deceb67ca8604ae227127fe6c73 (diff)
Fix some bugs that surfaced in the ASL export
- Bitvector pattern rewriting had stopped working due to a line of code being lost in some merge. - Fix a bug in early return rewriting that caused returns getting pulled out of if-statements to disappear. - There were some variable name clashes with keywords because doc_lem_id was not always called. - Ast_util.is_number failed to check for "int" and "nat" built-in types, causing pattern matching on natural number literals to fail.
Diffstat (limited to 'src/ast_util.ml')
-rw-r--r--src/ast_util.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ast_util.ml b/src/ast_util.ml
index e6217526..daaf5725 100644
--- a/src/ast_util.ml
+++ b/src/ast_util.ml
@@ -655,6 +655,8 @@ let rec lexp_to_exp (LEXP_aux (lexp_aux, annot) as le) =
let rec is_number (Typ_aux (t,_)) =
match t with
+ | Typ_id (Id_aux (Id "int", _))
+ | Typ_id (Id_aux (Id "nat", _))
| Typ_app (Id_aux (Id "range", _),_)
| Typ_app (Id_aux (Id "implicit", _),_)
| Typ_app (Id_aux (Id "atom", _),_) -> true