stdlib/strings: Moved Buffer to FlatBuffer, Buffer is now abstract.
[nit.git] / src / nitx.nit
index c073793..456a5eb 100644 (file)
@@ -17,7 +17,6 @@ module nitx
 
 import model_utils
 import modelize_property
-import frontend
 
 # Main class of the nit index tool
 # NitIndex build the model using the toolcontext argument
@@ -265,7 +264,7 @@ end
 # Code Analysis
 
 redef class ToolContext
-       private var nitx_phase: NitxPhase = new NitxPhase(self, [typing_phase])
+       private var nitx_phase: NitxPhase = new NitxPhase(self, [modelize_property_phase])
 end
 
 # Compiler phase for nitx
@@ -355,7 +354,7 @@ private class PagerMatchesRenderer
 end
 
 private class Pager
-       var content = new Buffer
+       var content = new FlatBuffer
        var indent = 0
        fun add(text: String) do
                add_indent
@@ -465,7 +464,7 @@ redef class MClass
        # return the generic signature of the class
        #       [E, F]
        private fun signature: String do
-               var res = new Buffer
+               var res = new FlatBuffer
                if arity > 0 then
                        res.append("[")
                        for i in [0..intro.parameter_names.length[ do
@@ -481,7 +480,7 @@ redef class MClass
        # class name is displayed with colors depending on visibility
        #       abstract interface Foo[E]
        private fun prototype: String do
-               var res = new Buffer
+               var res = new FlatBuffer
                res.append("{kind} ")
                if visibility.to_s == "public" then res.append("{name}{signature}".bold.green)
                if visibility.to_s == "private" then res.append("{name}{signature}".bold.red)
@@ -577,7 +576,7 @@ redef class MClassDef
        end
 
        fun to_console: String do
-               var res = new Buffer
+               var res = new FlatBuffer
                if not is_intro then res.append("redef ")
                res.append(mclass.prototype)
                return res.to_s
@@ -709,7 +708,7 @@ end
 
 redef class MMethodDef
        redef fun to_console do
-               var res = new Buffer
+               var res = new FlatBuffer
                if not is_intro then res.append("redef ")
                if not mproperty.is_init then res.append("fun ")
                res.append(mproperty.to_console.bold)
@@ -724,7 +723,7 @@ end
 
 redef class MVirtualTypeDef
        redef fun to_console do
-               var res = new Buffer
+               var res = new FlatBuffer
                res.append("type ")
                res.append(mproperty.to_console.bold)
                res.append(": {bound.to_console}")
@@ -734,7 +733,7 @@ end
 
 redef class MAttributeDef
        redef fun to_console do
-               var res = new Buffer
+               var res = new FlatBuffer
                res.append("var ")
                res.append(mproperty.to_console.bold)
                res.append(": {static_mtype.to_console}")
@@ -744,7 +743,7 @@ end
 
 redef class MSignature
        redef fun to_console do
-               var res = new Buffer
+               var res = new FlatBuffer
                if not mparameters.is_empty then
                        res.append("(")
                        for i in [0..mparameters.length[ do
@@ -762,7 +761,7 @@ end
 
 redef class MParameter
        fun to_console: String do
-               var res = new Buffer
+               var res = new FlatBuffer
                res.append("{name}: {mtype.to_console}")
                if is_vararg then res.append("...")
                return res.to_s
@@ -779,7 +778,7 @@ end
 
 redef class MGenericType
        redef fun to_console do
-               var res = new Buffer
+               var res = new FlatBuffer
                res.append("{mclass.name}[")
                for i in [0..arguments.length[ do
                        res.append(arguments[i].to_console)
@@ -862,7 +861,7 @@ redef class String
 
        private fun escape: String
        do
-               var b = new Buffer
+               var b = new FlatBuffer
                for c in self.chars do
                        if c == '\n' then
                                b.append("\\n")