Skip to content

Commit

Permalink
WFL: Fix lists in where clauses causing a parse error
Browse files Browse the repository at this point in the history
Fixes #1947
  • Loading branch information
CelticMinstrel committed Feb 18, 2018
1 parent cafb650 commit 4d8035e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/formula/formula.cpp
Expand Up @@ -1211,9 +1211,9 @@ static void parse_where_clauses(const tk::token* i1, const tk::token* i2, expr_t
std::string var_name;

while(i1 != i2) {
if(i1->type == tk::TOKEN_LPARENS) {
if(i1->type == tk::TOKEN_LPARENS || i1->type == tk::TOKEN_LSQUARE) {
++parens;
} else if(i1->type == tk::TOKEN_RPARENS) {
} else if(i1->type == tk::TOKEN_RPARENS || i1->type == tk::TOKEN_RSQUARE) {
--parens;
} else if(!parens) {
if(i1->type == tk::TOKEN_COMMA) {
Expand All @@ -1231,7 +1231,7 @@ static void parse_where_clauses(const tk::token* i1, const tk::token* i2, expr_t
if(op_name == "=") {
if(beg->type != tk::TOKEN_IDENTIFIER) {
if(i1 == original_i1_cached) {
throw formula_error("There is 'where <expression' but 'where name=<expression>' was needed",
throw formula_error("There is 'where <expression>' but 'where name=<expression>' was needed",
tokens_to_string(begin, end - 1), *i1->filename, i1->line_number);
} else {
throw formula_error("There is 'where <expression>=<expression>' but 'where name=<expression>' was needed",
Expand Down

0 comments on commit 4d8035e

Please sign in to comment.