From 086fa6cbe4d04ff4244ccbf3dd30cac68135ef92 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 7 Mar 2014 14:57:24 -0500 Subject: [PATCH] stdlib/strings: Renamed AbstractString to FlatText. Signed-off-by: Lucas Bajolet --- lib/standard/ropes.nit | 8 ++++---- lib/standard/string.nit | 8 ++++---- src/debugger.nit | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/standard/ropes.nit b/lib/standard/ropes.nit index 5470498..708be9a 100644 --- a/lib/standard/ropes.nit +++ b/lib/standard/ropes.nit @@ -45,7 +45,7 @@ abstract class Rope end # Initializes a new Rope with a text embedded in directly - init with_string(str: AbstractString) do + init with_string(str: String) do self.parent_node = new ConcatNode parent_node.as(ConcatNode).right_child = new LeafNode(str) parent_node.as(ConcatNode).update_data @@ -276,7 +276,7 @@ abstract class Rope # Compares the current Rope to another object (either another rope or a String) redef fun == (other) do - if other == null or not (other isa Rope or other isa AbstractString) then return false + if other == null or not (other isa Rope or other isa FlatText) then return false var self_iter = new RopeCharIterator(self) if other isa Rope then if self.length != other.length then return false @@ -286,7 +286,7 @@ abstract class Rope self_iter.next other_iterator.next end - else if other isa AbstractString then + else if other isa FlatText then var pos = 0 if self.length != other.length then return false while self_iter.is_ok do @@ -1039,7 +1039,7 @@ private class LeafNode # Encapsulated string in the leaf node private var _value: String - init(val: AbstractString) + init(val: String) do self._value = val.to_s self.length = val.length diff --git a/lib/standard/string.nit b/lib/standard/string.nit index e4c9fe4..1dcbb31 100644 --- a/lib/standard/string.nit +++ b/lib/standard/string.nit @@ -423,8 +423,8 @@ abstract class Text end -# Common subclass for String and Buffer -abstract class AbstractString +# All kinds of array-based text representations. +abstract class FlatText super Text private var items: NativeString @@ -522,7 +522,7 @@ end # Immutable strings of characters. class String super Comparable - super AbstractString + super FlatText super StringCapable redef type OTHER: String @@ -896,7 +896,7 @@ end # Mutable strings of characters. class FlatBuffer - super AbstractString + super FlatText super Comparable super StringCapable super Buffer diff --git a/src/debugger.nit b/src/debugger.nit index 65725a8..54258df 100644 --- a/src/debugger.nit +++ b/src/debugger.nit @@ -818,7 +818,7 @@ class Debugger # Gets all the identifiers of an instruction (uses the rules of Nit as of Mar 05 2013) # - fun get_identifiers_in_current_instruction(instruction: AbstractString): Array[String] + fun get_identifiers_in_current_instruction(instruction: Text): Array[String] do var result_array = new Array[String] var instruction_buffer = new FlatBuffer @@ -866,7 +866,7 @@ class Debugger # Takes a function call or declaration and strips all but the arguments # - fun get_function_arguments(function: AbstractString): String + fun get_function_arguments(function: Text): String do var buf = new FlatBuffer var trigger_copy = false -- 1.7.9.5