X-Git-Url: http://nitlanguage.org diff --git a/src/literal.nit b/src/literal.nit index 9ea79f0..0395299 100644 --- a/src/literal.nit +++ b/src/literal.nit @@ -65,12 +65,22 @@ end 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 end end +redef class AHexIntExpr + redef fun accept_literal(v) + do + self.value = self.n_hex_number.text.substring_from(2).to_hex + end +end + redef class AFloatExpr # The value of the literal float once computed. var value: nullable Float