Skip to content

Commit

Permalink
Skip let statements after the query
Browse files Browse the repository at this point in the history
  • Loading branch information
zombiezen committed Jun 11, 2024
1 parent 8a721ac commit 60e4228
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pql.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ func (opts *CompileOptions) Compile(source string) (string, error) {
}
expr = stmt
case *parser.LetStatement:
if expr != nil {
// Skip let statements after the query:
// they should not be in scope.
continue
}
ctx := &exprContext{
source: source,
scope: scope,
Expand Down

0 comments on commit 60e4228

Please sign in to comment.