end
end
+redef class AWithExpr
+ # The break escape mark associated with the 'with'
+ var break_mark: nullable EscapeMark
+
+ redef fun accept_scope_visitor(v)
+ do
+ v.scopes.unshift(new Scope)
+
+ var escapemark = v.make_escape_mark(n_label, true)
+ self.break_mark = escapemark
+
+ v.enter_visit(n_expr)
+ v.enter_visit_block(n_block, escapemark)
+
+ v.shift_scope
+ end
+end
+
redef class AVarFormExpr
# The associated variable
var variable: nullable Variable
#debug("var {variable}: {mtype}")
+ self.mtype = mtype
self.is_typed = true
end
end
end
end
+redef class AWithExpr
+ var method_start: nullable CallSite
+ var method_finish: nullable CallSite
+
+ redef fun accept_typing(v: TypeVisitor)
+ do
+ var mtype = v.visit_expr(n_expr)
+ if mtype == null then return
+
+ method_start = v.get_method(self, mtype, "start", n_expr isa ASelfExpr)
+ method_finish = v.get_method(self, mtype, "finish", n_expr isa ASelfExpr)
+
+ v.visit_stmt(n_block)
+ self.mtype = n_block.mtype
+ self.is_typed = true
+ end
+end
+
redef class AAssertExpr
redef fun accept_typing(v)
do