forked from ground/ground
Parser string and character fix
This commit is contained in:
16
src/main.cpp
16
src/main.cpp
@@ -1583,14 +1583,22 @@ vector<vector<string>> lexer(string in) {
|
|||||||
switch (i) {
|
switch (i) {
|
||||||
case '"':
|
case '"':
|
||||||
if (!isComment) {
|
if (!isComment) {
|
||||||
procString = !procString;
|
if (procChar) {
|
||||||
buf.push_back(i);
|
buf.push_back(i);
|
||||||
|
} else {
|
||||||
|
procString = !procString;
|
||||||
|
buf.push_back(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '\'':
|
case '\'':
|
||||||
if (!isComment) {
|
if (!isComment) {
|
||||||
procChar = !procChar;
|
if (procString) {
|
||||||
buf.push_back(i);
|
buf.push_back(i);
|
||||||
|
} else {
|
||||||
|
procChar = !procChar;
|
||||||
|
buf.push_back(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '\n':
|
case '\n':
|
||||||
|
Reference in New Issue
Block a user