+ if not self isa AIntegerExpr then return null
+ return self.value.as(not null).to_i
+ end
+end
+
+redef class AIntegerExpr
+ # The value of the literal int once computed.
+ var value: nullable Numeric
+
+ redef fun accept_literal(v) do
+ value = n_integer.text.to_num
+ if value == null then
+ v.toolcontext.error(hot_location, "Error: invalid literal `{n_integer.text}`")
+ end