src: cleanup importations
[nit.git] / src / literal.nit
index 92f137b..ef4851b 100644 (file)
@@ -17,8 +17,6 @@
 # Parsing of literal values in the abstract syntax tree.
 module literal
 
-import parser
-import toolcontext
 import phase
 
 redef class ToolContext
@@ -74,6 +72,13 @@ redef class ADecIntExpr
        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