Background
PR #259 extracted logic from several oversized parser modules into five new focused modules. None of these modules currently carry inline unit tests; coverage relies entirely on integration-level expression-parser tests.
Affected modules
src/parser/ast/expr/sexpr.rs — S-expression rendering for Expr
src/parser/ast/rule/classification.rs — rule-body term classification pipeline
src/parser/expression/pratt/delay.rs — delay-postfix parsing (expr -<N>)
src/parser/expression/pratt/diff.rs — diff-marker postfix helpers
src/parser/expression/pratt/postfix.rs — postfix-operator dispatch chain
Required work
Add #[cfg(test)] modules with focused unit tests to each of the five files above. As a minimum, cover:
sexpr.rs: one test per Expr variant rendered by to_sexpr() asserting the expected S-expression string (pending migration to snapshot testing tracked in #261).
classification.rs: tests for parse_rule_body_term covering assignment splitting, for-loop classification, aggregation detection, duplicate-aggregation error, and the whitespace-only value edge case.
delay.rs: tests for parse_delay_postfix covering a valid delay, a missing delay value, an invalid (non-numeric) delay value, and a missing closing >.
diff.rs: tests for handle_diff_marker (single marker, duplicate marker), apply_pending_diff (pending set, pending absent), validate_diff_not_pending, and validate_no_pending_diff.
postfix.rs: tests for parse_postfix covering function-call, bit-slice, dot-access (field and tuple-index), method-call, diff-marker, and delay postfix forms.
References
Background
PR
#259extracted logic from several oversized parser modules into five new focused modules. None of these modules currently carry inline unit tests; coverage relies entirely on integration-level expression-parser tests.Affected modules
src/parser/ast/expr/sexpr.rs— S-expression rendering forExprsrc/parser/ast/rule/classification.rs— rule-body term classification pipelinesrc/parser/expression/pratt/delay.rs— delay-postfix parsing (expr -<N>)src/parser/expression/pratt/diff.rs— diff-marker postfix helperssrc/parser/expression/pratt/postfix.rs— postfix-operator dispatch chainRequired work
Add
#[cfg(test)]modules with focused unit tests to each of the five files above. As a minimum, cover:sexpr.rs: one test perExprvariant rendered byto_sexpr()asserting the expected S-expression string (pending migration to snapshot testing tracked in#261).classification.rs: tests forparse_rule_body_termcovering assignment splitting, for-loop classification, aggregation detection, duplicate-aggregation error, and the whitespace-only value edge case.delay.rs: tests forparse_delay_postfixcovering a valid delay, a missing delay value, an invalid (non-numeric) delay value, and a missing closing>.diff.rs: tests forhandle_diff_marker(single marker, duplicate marker),apply_pending_diff(pending set, pending absent),validate_diff_not_pending, andvalidate_no_pending_diff.postfix.rs: tests forparse_postfixcovering function-call, bit-slice, dot-access (field and tuple-index), method-call, diff-marker, and delay postfix forms.References
#259: Refactor large parser modules into smaller components under 400 lines (#223) #259#229(docstring coverage),#260(developer guide),#261(snapshot testing forsexpr.rs)@leynos