Skip to content

Commit f373ea2

Browse files
committed
Fixed end of quote bug #34
1 parent 40d9f27 commit f373ea2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tokenizer/tokenizer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ export class Tokenizer {
157157
}
158158

159159
this.tokenText += script[this._cursor];
160-
if (this._cursor + 1 >= script.length) break;
160+
if (this._cursor + 1 >= script.length) {
161+
throw new Error(`Line ${this._startLine}: End of string missing.`);
162+
}
161163
}
162164

163165
//start column needs to take into account a begining quote, not just a string

0 commit comments

Comments
 (0)