Permalink
Browse files

[enhance] compiler, qmlAstCons: Added restricted_bypass with label

  • Loading branch information...
1 parent 930f97b commit 2922816a187ee7ac5791da7f0a38e5165dd6cd77 @BourgerieQuentin BourgerieQuentin committed Aug 6, 2012
Showing with 5 additions and 2 deletions.
  1. +3 −1 compiler/libqmlcompil/qmlAstCons.ml
  2. +2 −1 compiler/libqmlcompil/qmlAstCons.mli
@@ -1,5 +1,5 @@
(*
- Copyright © 2011 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of Opa.
@@ -981,6 +981,8 @@ struct
let dot ?(label=Annot.next_label nopos) e f = Q.Dot (label, e, f)
let extendrecord ?(label=Annot.next_label nopos) f e n = Q.ExtendRecord (label, f, e, n)
let bypass ?(label=Annot.next_label nopos) s = Q.Bypass (label, s)
+ let restricted_bypass ?label ~pass s =
+ directive (`restricted_bypass pass) [bypass ?label s] []
let coerce ?(label=Annot.next_label nopos) e t = Q.Coerce (label, e, t)
end
@@ -1,5 +1,5 @@
(*
- Copyright © 2011 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of Opa.
@@ -500,6 +500,7 @@ sig
val dot : ?label:Annot.label -> QmlAst.expr -> string -> QmlAst.expr
val extendrecord : ?label:Annot.label -> string -> QmlAst.expr -> QmlAst.expr -> QmlAst.expr
val bypass : ?label:Annot.label -> BslKey.t -> QmlAst.expr
+ val restricted_bypass : ?label:Annot.label -> pass:string -> BslKey.t -> QmlAst.expr
val coerce : ?label:Annot.label -> QmlAst.expr -> QmlAst.ty -> QmlAst.expr
end

0 comments on commit 2922816

Please sign in to comment.