add to_string method
authorJürg Billeter <j@bitron.ch>
Sun, 25 Feb 2007 17:43:38 +0000 (17:43 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sun, 25 Feb 2007 17:43:38 +0000 (17:43 +0000)
2007-02-25  Jürg Billeter  <j@bitron.ch>

* vala/valacodenode.vala: add to_string method

svn path=/trunk/; revision=195

vala/ChangeLog
vala/vala/valacodenode.vala

index 727e9b7..245de6e 100644 (file)
@@ -1,5 +1,9 @@
 2007-02-25  Jürg Billeter  <j@bitron.ch>
 
+       * vala/valacodenode.vala: add to_string method
+
+2007-02-25  Jürg Billeter  <j@bitron.ch>
+
        * vapi/glib-2.0.vala: improve GSource support
 
 2007-02-22  Raffaele Sandrini  <rasa@gmx.ch>
index 8b39b45..56514a8 100644 (file)
@@ -102,4 +102,16 @@ public abstract class Vala.CodeNode {
        }
        
        private CCodeNode _ccodenode;
+
+       /**
+        * Returns a string that represents this code node.
+        *
+        * @return a string representation
+        */
+       public ref string to_string () {
+               if (source_reference != null) {
+                       return source_reference.to_string ();
+               }
+               return null;
+       }
 }