fix tokenizer

This commit is contained in:
Vadim Lopatin 2015-01-22 18:16:00 +03:00
parent 359dffbcce
commit 2c6046bd16
2 changed files with 2 additions and 5 deletions

View File

@ -1431,6 +1431,7 @@ class Tokenizer
_pos = 0; _pos = 0;
_prevLineLength = 0; _prevLineLength = 0;
_lineText = null; _lineText = null;
nextLine();
} }
this(string code, string filename = "") { this(string code, string filename = "") {
@ -1459,11 +1460,7 @@ class Tokenizer
} }
protected dchar nextChar() { protected dchar nextChar() {
if (_lineText is null) { if (_pos >= _len) {
if (!nextLine()) {
return EOF_CHAR;
}
} else if (_pos >= _len) {
if (!nextLine()) { if (!nextLine()) {
return EOF_CHAR; return EOF_CHAR;
} }