summaryrefslogtreecommitdiff
path: root/src/initial_check.ml
diff options
context:
space:
mode:
authorKathy Gray2013-10-09 15:36:10 +0100
committerKathy Gray2013-10-09 15:36:10 +0100
commitcaed2d0e87df23cf18e2b332066e146b2e40f53d (patch)
treeab9d1076e0f5dd388fc858823a3b6c86a2084d89 /src/initial_check.ml
parentf4d8784a03abeeca6e06f906604944dfa88d6686 (diff)
Adding memory writes. Cleaning up the let in the ott file to reflect what actually parses
Diffstat (limited to 'src/initial_check.ml')
-rw-r--r--src/initial_check.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/initial_check.ml b/src/initial_check.ml
index 90b2d240..c36627ec 100644
--- a/src/initial_check.ml
+++ b/src/initial_check.ml
@@ -348,6 +348,10 @@ and to_ast_lexp (k_env : kind Envmap.t) (Parse_ast.E_aux(exp,l) : Parse_ast.exp)
LEXP_aux(
(match exp with
| Parse_ast.E_id(id) -> LEXP_id(to_ast_id id)
+ | Parse_ast.E_app(Parse_ast.E_aux(f,l'),[exp]) ->
+ (match f with
+ | Parse_ast.E_id(id) -> LEXP_memory(to_ast_id id,to_ast_exp k_env exp)
+ | _ -> typ_error l' "memory call on lefthand side of assignment must begin with an id" None None)
| Parse_ast.E_vector_access(vexp,exp) -> LEXP_vector(to_ast_lexp k_env vexp, to_ast_exp k_env exp)
| Parse_ast.E_vector_subrange(vexp,exp1,exp2) -> LEXP_vector_range(to_ast_lexp k_env vexp, to_ast_exp k_env exp1, to_ast_exp k_env exp2)
| Parse_ast.E_field(fexp,id) -> LEXP_field(to_ast_lexp k_env fexp, to_ast_id id)