changeset 43:a712c530b7cc new_gen

A few fixes - now checking if chars are of a valid type
author Anders Johnsen <skabet@gmail.com>
date Tue, 22 Apr 2008 22:31:39 +0200
parents 4e879f82dd64
children 495188f9078e
files lexer/Lexer.d
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lexer/Lexer.d	Tue Apr 22 22:25:07 2008 +0200
+++ b/lexer/Lexer.d	Tue Apr 22 22:31:39 2008 +0200
@@ -69,7 +69,7 @@
       Get the next token from the source. This method will move the
       internal position forward to the next Token.
 
-      return: A Token - Token.type is equals TokType.EOF if there is
+      return: A Token - Token.type is TokType.EOF if there is
         no more tokens in the file.
       */
     Token next ()
@@ -99,7 +99,7 @@
       Get the next token from the source. This method will NOT move the
       internal position forward, and thereby having no side-effects.
 
-      return: A Token - Token.type is equals TokType.EOF if there is
+      return: A Token - Token.type is TokType.EOF if there is
         no more tokens in the file.
       */
     Token peek ( int skip = 0)
@@ -299,8 +299,8 @@
 
         CharType c = charTable[current];
 
-//        if(c == CharType.INVALID)
-  //          throw error(__LINE__, "Read invalid symbol: '%0'").arg(current);
+        if(c == CharType.INVALID)
+            throw error(__LINE__, "Read invalid symbol: '%0'").arg(current);
 
         return c;