Skip to content

Commit

Permalink
Merge branch 'master' into filters.assign.create
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Dec 15, 2023
2 parents 9822a50 + b16edfd commit 8c5cfe3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/workshop/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
- python=3.11
- pdal=2.5.6
- pdal=2.6.2
- python-pdal
- gdal
- untwine
Expand Down
2 changes: 1 addition & 1 deletion filters/private/expr/AssignParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool AssignParser::where(AssignStatement& expr)
std::string ident = Utils::toupper(curToken().sval());
if (ident != "WHERE")
{
setError("Expected keyword 'WHERE' to precede condition assignment.");
setError("Expected keyword 'WHERE'. Found identifier '" + curToken().sval() + "'.");
return false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions filters/private/expr/AssignStatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ Utils::StatusWithReason AssignStatement::prepare(PointLayoutPtr layout)
{
auto status = m_identExpr.prepare(layout);
if (!status)
return {-1, m_identExpr.error()};
return status;

status = m_valueExpr.prepare(layout);
if (!status)
return {-1, m_identExpr.error()};
return status;

return m_conditionalExpr.prepare(layout);
}
Expand Down
6 changes: 3 additions & 3 deletions filters/private/expr/Lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Token Lexer::top(char c)
tok = letter();
break;
default:
tok = Token(TokenType::Error, m_tokPos, m_pos, "Syntax error.");
tok = Token(TokenType::Error, m_tokPos, m_pos, std::string(1, c));
break;
}
return tok;
Expand Down Expand Up @@ -222,10 +222,10 @@ Token Lexer::letter()
if (!std::isalnum(c) && c != '_')
{
putChar();
return Token(TokenType::Identifier, m_tokPos, m_pos,
return Token(TokenType::Identifier, m_tokPos, m_pos,
m_buf.substr(m_tokPos, m_pos - m_tokPos));
}
}
}
}

} // namespace expr
Expand Down

0 comments on commit 8c5cfe3

Please sign in to comment.