# * Resolve call and attribute access
# * Check type conformance
private class TypingVisitor
-special AbsSyntaxVisitor
+ super AbsSyntaxVisitor
redef fun visit(n)
do
if n != null then n.accept_typing(self)
# An abstract control structure with feature escapable block
class AAbsControl
-special AExpr
+ super AExpr
# The corresponding escapable block
readable var _escapable: nullable EscapableBlock
end
redef class ADoExpr
-special AAbsControl
+ super AAbsControl
redef fun accept_typing(v)
do
process_control(v, new BreakOnlyEscapableBlock(self), n_label, false)
end
redef class AWhileExpr
-special AAbsControl
+ super AAbsControl
redef fun accept_typing(v)
do
process_control(v, new EscapableBlock(self), n_label, true)
end
redef class ALoopExpr
-special AAbsControl
+ super AAbsControl
redef fun accept_typing(v)
do
process_control(v, new EscapableBlock(self), n_label, true)
end
redef class AForExpr
-special AAbsControl
+ super AAbsControl
var _variable: nullable AutoVariable
redef fun variable do return _variable.as(not null)
end
class ATypeCheckExpr
-special AExpr
+ super AExpr
private fun check_expr_cast(v: TypingVisitor, n_expr: AExpr, n_type: AType)
do
if not v.check_expr(n_expr) then return
end
redef class AIsaExpr
-special ATypeCheckExpr
+ super ATypeCheckExpr
redef fun after_typing(v)
do
check_expr_cast(v, n_expr, n_type)
end
redef class AAsCastExpr
-special ATypeCheckExpr
+ super ATypeCheckExpr
redef fun after_typing(v)
do
check_expr_cast(v, n_expr, n_type)