Merge: More keep going
[nit.git] / lib / sax / helpers / attributes_impl.nit
index 97f16d8..64691cd 100644 (file)
@@ -31,9 +31,9 @@ class AttributesImpl
        super Attributes
 
        private var data = new Array[String]
-       redef var length: Int = 0
+       redef var length = 0
 
-       redef fun uri(index: Int): nullable String do
+       redef fun uri(index) do
                if index >= 0 and index < length then
                        return data[index * 5]
                else
@@ -41,7 +41,7 @@ class AttributesImpl
                end
        end
 
-       redef fun local_name(index: Int): nullable String do
+       redef fun local_name(index) do
                if index >= 0 and index < length then
                        return data[index * 5 + 1]
                else
@@ -49,7 +49,7 @@ class AttributesImpl
                end
        end
 
-       redef fun qname(index: Int): nullable String do
+       redef fun qname(index) do
                if index >= 0 and index < length then
                        return data[index * 5 + 2]
                else
@@ -85,13 +85,13 @@ class AttributesImpl
        # are not available.
        #
        # SEE: `length`
-       redef fun type_of(index): nullable String do
+       redef fun type_of(index) do
                if index isa Int then
                        if index >= 0 and index < length then
                                return data[index * 5 + 3]
                        end
                else if index isa String and "" != index then
-                       var i: Int = 0
+                       var i = 0
 
                        while i < data.length do
                                if data[i + 2] == index then
@@ -124,13 +124,13 @@ class AttributesImpl
        # are not available.
        #
        # SEE: `length`
-       redef fun value_of(index): nullable String do
+       redef fun value_of(index) do
                if index isa Int then
                        if index >= 0 and index < length then
                                return data[index * 5 + 4]
                        end
                else if index isa String and "" != index then
-                       var i: Int = 0
+                       var i = 0
 
                        while i < data.length do
                                if data[i + 2] == index then
@@ -157,8 +157,8 @@ class AttributesImpl
        #
        # The index of the attribute, or -1 if it does not
        # appear in the list.
-       redef fun index_ns(uri: String, local_name: String): Int do
-               var i: Int = 0
+       redef fun index_ns(uri, local_name) do
+               var i = 0
 
                if "" != local_name then
                        while i < data.length do
@@ -184,8 +184,8 @@ class AttributesImpl
        #
        # The index of the attribute, or -1 if it does not
        # appear in the list.
-       redef fun index_of(qname: String): Int do
-               var i: Int = 0
+       redef fun index_of(qname) do
+               var i = 0
 
                if "" != qname then
                        while i < data.length do
@@ -218,8 +218,8 @@ class AttributesImpl
        # The attribute type as a string, or `null` if the
        # attribute is not in the list or if Namespace
        # processing is not being performed.
-       redef fun type_ns(uri: String, local_name: String): nullable String do
-               var i: Int = 0
+       redef fun type_ns(uri, local_name) do
+               var i = 0
 
                if "" != local_name then
                        while i < data.length do
@@ -252,8 +252,8 @@ class AttributesImpl
        # The attribute value as a string, or `null` if the
        # attribute is not in the list or if Namespace
        # processing is not being performed.
-       redef fun value_ns(uri: String, local_name: String): nullable String do
-               var i: Int = 0
+       redef fun value_ns(uri, local_name) do
+               var i = 0
 
                if "" != local_name then
                        while i < data.length do
@@ -281,7 +281,7 @@ class AttributesImpl
        #
        # * `atts`: attributes to copy.
        fun attributes=(atts: Attributes) do
-               var i: Int = 0
+               var i = 0
 
                clear
                length = atts.length