Merge: Beef up OrderedTree API
[nit.git] / contrib / pep8analysis / src / location.nit
index b3e8458..634b695 100644 (file)
@@ -26,7 +26,7 @@ class SourceFile
        var string: String
 
        # Create a new sourcefile using a filename and a stream
-       init(filename: String, stream: IStream)
+       init(filename: String, stream: Reader)
        do
                self.filename = filename
                string = stream.read_all
@@ -165,7 +165,7 @@ class Location
        # * `"0;32"` for green
        fun colored_line(color: String): String
        do
-               var esc = 27.ascii
+               var esc = 27.code_point
                var def = "{esc}[0m"
                var col = "{esc}[{color}m"
 
@@ -193,7 +193,7 @@ class Location
                        lmid = ""
                        lend = ""
                end
-               var indent = new Buffer
+               var indent = new FlatBuffer
                for j in [line_start..line_start+l.column_start-1[ do
                        if string[j] == '\t' then
                                indent.add '\t'