mirror of https://github.com/buggins/dlangide.git
fix tokenizer
This commit is contained in:
parent
359dffbcce
commit
2c6046bd16
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue