JSDOC/TokenReader.vala
[gnome.introspection-doc-generator] / JSDOC / TokenReader.vala
index ebc19b0..df9e402 100644 (file)
@@ -14,7 +14,7 @@ namespace JSDOC {
 
     public class TokenArray: Object {
         
-        Gee.ArrayList<Token> tokens;
+        public Gee.ArrayList<Token> tokens;
         
         public TokenArray()
         {
@@ -27,7 +27,7 @@ namespace JSDOC {
             }
             return null;
         }
-        public Token? lastSym = function() {
+        public Token? lastSym () {
             for (var i = this.tokens.length-1; i >= 0; i--) {
                 if (!(this.tokens.get(i).is("WHIT") || this.tokens.get(i).is("COMM")))  {
                     return this.tokens.get(i);
@@ -35,6 +35,9 @@ namespace JSDOC {
             }
             return null;
         }
+        public void push (Token t) {
+            this.tokens.add(t);
+        }
     }
 
 
@@ -99,7 +102,9 @@ namespace JSDOC {
                 if (this.read_word(stream, tokens))      continue;
                 
                 // if execution reaches here then an error has happened
-                tokens.push(new Token(stream.next(), "TOKN", "UNKNOWN_TOKEN", this.line));
+                tokens.push(
+                        new Token(stream.next(), "TOKN", "UNKNOWN_TOKEN", this.line)
+                );
             }