]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
escape the dynamic keyword, and identifiers starting with a digit
authorAli Sabil <ali.sabil@gmail.com>
Tue, 17 Feb 2009 10:02:57 +0000 (10:02 +0000)
committerAli Sabil <asabil@src.gnome.org>
Tue, 17 Feb 2009 10:02:57 +0000 (10:02 +0000)
2009-02-17  Ali Sabil  <ali.sabil@gmail.com>

* vala/valacodewriter.vala: escape the dynamic keyword, and identifiers
starting with a digit

svn path=/trunk/; revision=2447

ChangeLog
vala/valacodewriter.vala

index 88927d6b6d9a76b20f13b86ff85e292b14126ef0..802be13d0cf8616af31454996fefbbbfb70c3930 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-17  Ali Sabil  <ali.sabil@gmail.com>
+
+       * vala/valacodewriter.vala: escape the dynamic keyword, and identifiers
+       starting with a digit
+
 2009-02-17  Ryan Lortie  <desrt@desrt.ca>
 
        * gobject/valaccodebasemodule.vala:
index aef68650a7c878bb174aca972b262e8ad8a8e020..3a8b29871a9f9e5beeb9d33cdc66e7ed1cfd3028 100644 (file)
@@ -1558,10 +1558,10 @@ public class Vala.CodeWriter : CodeVisitor {
        private void write_identifier (string s) {
                if (s == "base" || s == "break" || s == "class" ||
                    s == "construct" || s == "delegate" || s == "delete" ||
-                   s == "do" || s == "foreach" || s == "in" ||
+                   s == "do" || s == "dynamic" || s == "foreach" || s == "in" ||
                    s == "interface" || s == "lock" || s == "namespace" ||
                    s == "new" || s == "out" || s == "ref" ||
-                   s == "signal") {
+                   s == "signal" || s.get_char ().isdigit ()) {
                        stream.putc ('@');
                }
                write_string (s);