Skip to content
Snippets Groups Projects
Commit 6b3d7bd7 authored by Thomas Wood's avatar Thomas Wood
Browse files

Comment exp_type_is_constant

parent a1b2bedb
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ let show_list sep l = ...@@ -27,6 +27,7 @@ let show_list sep l =
let is_sbool x = List.mem x ["true" ; "false"] let is_sbool x = List.mem x ["true" ; "false"]
(* Given an expression, check whether it is a primitive type or a constructed type *)
let exp_type_is_constant exp = let exp_type_is_constant exp =
List.exists (Ctype.matches exp.exp_env exp.exp_type) List.exists (Ctype.matches exp.exp_env exp.exp_type)
[Predef.type_bool; Predef.type_int; Predef.type_char; Predef.type_string; Predef.type_float] [Predef.type_bool; Predef.type_int; Predef.type_char; Predef.type_string; Predef.type_float]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment