Skip to content

Commit 23faa2d

Browse files
author
Markus
committed
refactor(workflows): fold engine_lark into engine and reject word operators as paths
Move the Lark expression engine directly into engine.py now that engine_current.py is gone, and remove the temporary engine-swap boundary test. Exclude the reserved word operators (and, or, not, in) from the first segment of PATH so they never lex as variable names when an operand is expected, and include Lark's VisitError in _PARSE_ERRORS so int()/float() conversion errors in _BuildAst.number surface as ValueError. Assisted-by: Pi Coding Agent (model: gemini-4-argon, supervised)
1 parent 7be9225 commit 23faa2d

6 files changed

Lines changed: 642 additions & 730 deletions

File tree

‎src/specify_cli/workflows/expressions/__init__.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
This package is split by responsibility:
88
99
- ``namespace``/``filters``/``operators``/``template`` — shared leaves;
10-
- ``engine_lark`` — the Lark (LALR) evaluator behind the contract;
11-
- ``engine`` — the selection point (the one line that swaps the engine);
10+
- ``engine`` — the Lark (LALR) expression parser and evaluator;
1211
- ``api`` — the public evaluation entry points;
1312
- ``diagnostics`` — condition validation and remediation.
1413

0 commit comments

Comments
 (0)