Merge pull request #39230 from ntfshard/expression_string_singlequote

Fix for Expression class: string inside an expression can't be single quoted
This commit is contained in:
Rémi Verschelde 2020-06-11 09:37:35 +02:00 committed by GitHub
commit 7217a7edbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -896,6 +896,7 @@ Error Expression::_get_token(Token &r_token) {
return OK;
}
case '\'':
case '"': {
String str;
while (true) {
@ -905,7 +906,8 @@ Error Expression::_get_token(Token &r_token) {
_set_error("Unterminated String");
r_token.type = TK_ERROR;
return ERR_PARSE_ERROR;
} else if (ch == '"') {
} else if (ch == cchar) {
// cchar contain a corresponding quote symbol
break;
} else if (ch == '\\') {
//escaped characters...