[SCM] Lisaac compiler branch, master+stable, updated. lisaac-0.12-606-gf445725

Mildred Ki'Lya silkensedai at online.fr
Mon Mar 1 00:35:02 UTC 2010


The following commit has been merged in the master+stable branch:
commit e918deae71d53d3bc517f1e1c1c996e1e7c7b481
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date:   Fri Sep 4 14:55:48 2009 +0200

    implemented BOOLEAN.to_abstract_string and OBJECT.print now uses to_abstract_string instead of to_string

diff --git a/lib/standard/boolean/boolean.li b/lib/standard/boolean/boolean.li
index 968d70d..44b65bd 100644
--- a/lib/standard/boolean/boolean.li
+++ b/lib/standard/boolean/boolean.li
@@ -106,13 +106,15 @@ Section Public
   //
   // Convertion
   //
-  
-  - to_string:STRING <- 
+
+  - to_string:STRING <-
   ( + result:STRING;
-    
+
     deferred;
     result
   );
+
+  - to_abstract_string:ABSTRACT_STRING <- "BOOLEAN";
   
   - to_integer:INTEGER <- 
   ( + result:INTEGER;
@@ -128,15 +130,4 @@ Section Public
     result
   );
   
-  - append_in str:STRING <- str.append to_string;
-
-  //
-  // Output.
-  //
-  
-  - print <-
-  (
-    deferred;
-  );
-
-
+  - append_in str:STRING <- str.append to_abstract_string;
diff --git a/lib/standard/boolean/false.li b/lib/standard/boolean/false.li
index 078c39e..6228273 100644
--- a/lib/standard/boolean/false.li
+++ b/lib/standard/boolean/false.li
@@ -116,16 +116,10 @@ Section Public
   //
   
   - to_string:STRING       <- "0".to_string;
+
+  - to_abstract_string:ABSTRACT_STRING <- "FALSE";
   
   - to_integer:INTEGER     <- 0;
   
   - to_character:CHARACTER <- '0';
-  
-  //
-  // Output.
-  //
-  
-  - print <-
-  (
-    "FALSE".print;
-  );
+
diff --git a/lib/standard/boolean/true.li b/lib/standard/boolean/true.li
index 592bce9..08cd6e5 100644
--- a/lib/standard/boolean/true.li
+++ b/lib/standard/boolean/true.li
@@ -107,22 +107,10 @@ Section Public
   //
   
   - to_string:STRING       <- "1".to_string; // BSBS: A revoir ...
+
+  - to_abstract_string:ABSTRACT_STRING <- "TRUE";
   
   - to_integer:INTEGER     <- 1;
   
   - to_character:CHARACTER <- '1';
 
-  //
-  // Output.
-  //
-
-  - print <-
-  (
-    "TRUE".print;
-  );
-
-
-
-
-
-
diff --git a/lib/standard/kernel/object.li b/lib/standard/kernel/object.li
index 3b5a624..2966524 100644
--- a/lib/standard/kernel/object.li
+++ b/lib/standard/kernel/object.li
@@ -169,13 +169,12 @@ Section Public
 
   - to_string :STRING <- to_pointer.to_string;
 
-  - print <- to_string.print;
+  - to_abstract_string :ABSTRACT_STRING <- to_string;
 
-  - println <-
-  (
-    to_string.println;
-  );
+  - print <- to_abstract_string.print;
 
+  - println <- to_abstract_string.println;
+  
   - dynamic_type:SELF <- SELF;
 
   - same_dynamic_type other:OBJECT :BOOLEAN <-

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list