JSDOC/TokenReader.vala
authorAlan Knowles <alan@roojs.com>
Tue, 27 Oct 2015 09:17:32 +0000 (17:17 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 27 Oct 2015 09:17:32 +0000 (17:17 +0800)
JSDOC/Lang.vala.c
JSDOC/TextStream.vala.c
JSDOC/TokenReader.vala.c
JSDOC/TokenStream.vala.c
JSDOC/Token.vala.c

JSDOC/TokenReader.vala

index 0ed9c0a..afa405b 100644 (file)
@@ -277,7 +277,7 @@ namespace JSDOC {
         {
             string found = "";
             
-            while (!stream.lookEOF() && Lang.punc(found + (string)stream.look()).length > 0) {
+            while (!stream.lookEOF() && Lang.punc(found + stream.look().to_string()).length > 0) {
                 found += stream.next();
             }
             
@@ -415,7 +415,7 @@ namespace JSDOC {
                 (stream.look() == '<' && stream.look(1) == '!' && stream.look(2) == '-' && stream.look(3) == '-' && (""!=(found=stream.next(4))))
             ) {
                 var line = this.line;
-                while (!stream.lookEOF() && !Lang.isNewline((string)stream.look())) {
+                while (!stream.lookEOF() && !Lang.isNewline(stream.look().to_string())) {
                     found += stream.next();
                 }
                 //if (!stream.lookEOF()) { // what? << eat the EOL?
@@ -443,10 +443,10 @@ namespace JSDOC {
             
             while (!stream.lookEOF()) {
                 if (stream.look() == '\\') {
-                    if (Lang.isNewline((string)stream.look(1))) {
+                    if (Lang.isNewline(stream.look(1).to_string())) {
                         do {
                             stream.next();
-                        } while (!stream.lookEOF() && Lang.isNewline((string)stream.look()));
+                        } while (!stream.lookEOF() && Lang.isNewline(stream.look().to_string()));
                         str += "\\\n";
                     }
                     else {
@@ -505,7 +505,7 @@ namespace JSDOC {
             
             var found = "";
             
-            while (!stream.lookEOF() && Lang.isNumber(found+(string)stream.look())){
+            while (!stream.lookEOF() && Lang.isNumber(found+stream.look().to_string())){
                 found += stream.next();
             }
             
@@ -529,7 +529,7 @@ namespace JSDOC {
             var found = stream.next(2);
             
             while (!stream.lookEOF()) {
-                if (Lang.isHexDec(found) && !Lang.isHexDec(found+(string)stream.look())) { // done
+                if (Lang.isHexDec(found) && !Lang.isHexDec(found+stream.look().to_string())) { // done
                     tokens.push(new Token(found, "NUMB", "HEX_DEC", this.line));
                     return true;
                 }
@@ -570,7 +570,7 @@ namespace JSDOC {
                     if (stream.look() == '/') {
                         regex += stream.next();
                         
-                        while (GLib.Regex.match_simple("[gmi]", (string)stream.look())) {
+                        while (GLib.Regex.match_simple("[gmi]", stream.look().to_string())) {
                             regex += stream.next();
                         }