summaryrefslogtreecommitdiff
path: root/cparser/Elab.ml
diff options
context:
space:
mode:
Diffstat (limited to 'cparser/Elab.ml')
-rw-r--r--cparser/Elab.ml9
1 files changed, 6 insertions, 3 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml
index 28170a6..2e0c49f 100644
--- a/cparser/Elab.ml
+++ b/cparser/Elab.ml
@@ -254,9 +254,12 @@ exception Wrong_attr_arg
let elab_attr_arg loc env a =
match a with
| VARIABLE s ->
- begin match wrap Env.lookup_ident loc env s with
- | (id, II_ident(sto, ty)) -> AIdent s
- | (id, II_enum v) -> AInt v
+ begin try
+ match Env.lookup_ident env s with
+ | (id, II_ident(sto, ty)) -> AIdent s
+ | (id, II_enum v) -> AInt v
+ with Env.Error _ ->
+ AIdent s
end
| _ ->
let b = !elab_expr_f loc env a in