From 75189ba5e262c9323f6a5a2a1c3789fa651761c0 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 4 Jun 2014 16:36:40 -0400 Subject: [PATCH] lib/standard/ropes: Added basic structure for Ropes. Signed-off-by: Lucas Bajolet --- lib/standard/ropes.nit | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/standard/ropes.nit b/lib/standard/ropes.nit index b5697bd..ea7237d 100644 --- 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 + -- 1.7.9.5