Add ability to use escaped strings, at least for quotes
This commit is contained in:
parent
c82ee71b4d
commit
bc69e7efa4
@ -89,7 +89,9 @@ class Wordifier {
|
|||||||
let acc = '';
|
let acc = '';
|
||||||
acc += this.reader.readUntil(c => c == endChar);
|
acc += this.reader.readUntil(c => c == endChar);
|
||||||
while (acc.endsWith('\\') || !this.reader.hasNext()) {
|
while (acc.endsWith('\\') || !this.reader.hasNext()) {
|
||||||
acc += this.reader.readUntil(c => c != endChar);
|
acc = acc.substr(0, acc.length - 1);
|
||||||
|
this.reader.next(); // endChar
|
||||||
|
acc += endChar + this.reader.readUntil(c => c == endChar);
|
||||||
}
|
}
|
||||||
this.reader.next(); // throw away closing char
|
this.reader.next(); // throw away closing char
|
||||||
this.tokens.push('"' + acc);
|
this.tokens.push('"' + acc);
|
||||||
|
Loading…
Reference in New Issue
Block a user