Signed-off-by: Jean Privat <jean@pryen.org>
# Note that the broken status is not propagated to parent or children nodes.
# e.g. a broken expression used as argument does not make the whole call broken.
var is_broken = false is writable
# Note that the broken status is not propagated to parent or children nodes.
# e.g. a broken expression used as argument does not make the whole call broken.
var is_broken = false is writable
+
+ redef fun dump_info(v) do
+ var res = super
+ if is_broken then
+ res += v.red("*broken*")
+ end
+ return res
+ end
# Is the mtype a valid one?
var checked_mtype: Bool = false
# Is the mtype a valid one?
var checked_mtype: Bool = false
+
+ redef fun dump_info(v) do
+ var res = super
+ var mtype = self.mtype
+ if mtype != null then
+ res += v.yellow(":{mtype}")
+ end
+ return res
+ end
end
redef class AVisibility
end
redef class AVisibility
if map == null then is_broken = true
return map == null
end
if map == null then is_broken = true
return map == null
end
+
+ # Information about the callsite to display on a node
+ fun dump_info(v: ASTDump): String do
+ return "{recv}.{mpropdef}{msignature}"
+ end
#
# This attribute is meaning less on expressions not used as attributes.
var vararg_decl: Int = 0
#
# This attribute is meaning less on expressions not used as attributes.
var vararg_decl: Int = 0
+
+ redef fun dump_info(v) do
+ var res = super
+ var mtype = self.mtype
+ if mtype != null then
+ res += v.yellow(":{mtype}")
+ end
+ var ict = self.implicit_cast_to
+ if ict != null then
+ res += v.yellow("(.as({ict}))")
+ end
+ return res
+ end
end
redef class ABlockExpr
end
redef class ABlockExpr
do
v.check_expr_cast(self, self.n_expr, self.n_type)
end
do
v.check_expr_cast(self, self.n_expr, self.n_type)
end
+
+ redef fun dump_info(v) do
+ var res = super
+ var mtype = self.cast_type
+ if mtype != null then
+ res += v.yellow(".as({mtype})")
+ end
+ return res
+ end
+
end
redef class AAsCastExpr
end
redef class AAsCastExpr
fun raw_arguments: Array[AExpr] do return compute_raw_arguments
private fun compute_raw_arguments: Array[AExpr] is abstract
fun raw_arguments: Array[AExpr] do return compute_raw_arguments
private fun compute_raw_arguments: Array[AExpr] is abstract
+
+ redef fun dump_info(v) do
+ var res = super
+ var callsite = self.callsite
+ if callsite != null then
+ res += v.yellow(" call="+callsite.dump_info(v))
+ end
+ return res
+ end
end
redef class ABinopExpr
end
redef class ABinopExpr
+
+ redef fun dump_info(v) do
+ var res = super
+ var callsite = self.callsite
+ if callsite != null then
+ res += v.yellow(" super-init="+callsite.dump_info(v))
+ end
+ var mpropdef = self.mpropdef
+ if mpropdef != null then
+ res += v.yellow(" call-next-method="+mpropdef.to_s)
+ end
+ return res
+ end
var args = n_args.to_a
callsite.check_signature(v, node, args)
end
var args = n_args.to_a
callsite.check_signature(v, node, args)
end
+
+ redef fun dump_info(v) do
+ var res = super
+ var callsite = self.callsite
+ if callsite != null then
+ res += v.yellow(" call="+callsite.dump_info(v))
+ end
+ return res
+ end
attr_type = v.resolve_for(attr_type, recvtype, self.n_expr isa ASelfExpr)
self.attr_type = attr_type
end
attr_type = v.resolve_for(attr_type, recvtype, self.n_expr isa ASelfExpr)
self.attr_type = attr_type
end
+
+ redef fun dump_info(v) do
+ var res = super
+ var mproperty = self.mproperty
+ var attr_type = self.attr_type
+ if mproperty != null then
+ res += v.yellow(" attr={mproperty}:{attr_type or else "BROKEN"}")
+ end
+ return res
+ end
end
redef class AAttrExpr
end
redef class AAttrExpr