Skip to content

Parser: WHERE clause should support OR operator #4

@semanticintent

Description

@semanticintent

Summary

The WHERE clause supports AND chaining (fixed in v0.2.1, issue #1), but does not yet support OR.

Current behaviour

FORAGE "Example"
WHERE sector = "technology"
  OR sector = "healthcare"       -- ❌ parse error

OR is not recognised in ConditionList.

Expected behaviour

FORAGE "Example"
WHERE sector = "technology"
  OR sector = "healthcare"       -- ✅ parsed

Grammar reference

In src/parser/grammar.pegjs, ConditionList only chains via AND. Adding OR support (with appropriate precedence — AND binds tighter than OR) would complete the logical operator set.

Priority

Lower priority than WHEN AND (#3) since no published cases have needed OR yet, but worth tracking for completeness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions