# HG changeset patch # User Anders Johnsen # Date 1208896299 -7200 # Node ID a712c530b7cc7ed724a24e439b37cf10fefd15ef # Parent 4e879f82dd64835505df16f483192d991aa80f8f A few fixes - now checking if chars are of a valid type diff -r 4e879f82dd64 -r a712c530b7cc lexer/Lexer.d --- 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;