]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
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 727e9b74558ec38d79e542362b044e70fa9e37f9..245de6e946ad53c97b5a8ab72f5e25d01bd548c6 100644 (file)
@@ -1,3 +1,7 @@
+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
index 8b39b45354b9bd3ceffddbcd7293e1fa19d835a1..56514a8beb90a8128dd246ec3716f187ab948395 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;
+       }
 }