nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f96cec
)
lib/standard/ropes: Added basic structure for Ropes.
author
Lucas Bajolet
<r4pass@hotmail.com>
Wed, 4 Jun 2014 20:36:40 +0000
(16:36 -0400)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Wed, 4 Jun 2014 20:36:40 +0000
(16:36 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
lib/standard/ropes.nit
patch
|
blob
|
history
diff --git
a/lib/standard/ropes.nit
b/lib/standard/ropes.nit
index
b5697bd
..
ea7237d
100644
(file)
--- a/
lib/standard/ropes.nit
+++ b/
lib/standard/ropes.nit
@@
-64,3
+64,15
@@
private class Leaf
end
+# Basic structure, binary tree with a root node.
+#
+# Also shared services by subsequent implementations.
+abstract class Rope
+ super Text
+
+ # Root node, entry point of a Rope.
+ private var root: RopeNode
+
+ redef fun length do return root.length
+end
+