next commit will introduce AHexIntExpr
Signed-off-by: Jean Privat <jean@pryen.org>
# Make a new Int literal
fun make_int(value: Int): AIntExpr
do
- return new AIntExpr.make(value, mmodule.get_primitive_class("Int").mclass_type)
+ return new ADecIntExpr.make(value, mmodule.get_primitive_class("Int").mclass_type)
end
# Make a new instatiation
end
end
-redef class AIntExpr
+redef class ADecIntExpr
private init make(value: Int, t: MType)
do
self.value = value
redef class AIntExpr
# The value of the literal int once computed.
var value: nullable Int
+end
+
+redef class ADecIntExpr
redef fun accept_literal(v)
do
self.value = self.n_number.text.to_i
readable var _n_kwnull: TKwnull
readable var _n_annotations: nullable AAnnotations = null
end
-class AIntExpr
+class ADecIntExpr
super AExpr
readable var _n_number: TNumber
readable var _n_annotations: nullable AAnnotations = null
# An integer literal
class AIntExpr
super AExpr
+end
+# An integer literal in decimal format
+class ADecIntExpr
+ super AIntExpr
readable writable var _n_number: TNumber
end
# A float literal