The expr.rs file/module became longer and longer with every PR, code was not discoverable at all.
After observing, that the only function used on the outside of the module was expr::extract_expr, I refactored
the entire module to a self-contained and hopefully a lot more structured package.
The public (pub(super)) interface of the entire expr module is now:
expr::extract_expr and
expr::extract_exprs.
That is all, outsiders need to know and see. Inside the module, the same structure was applied: logical units were split off in
separate files that expose only 1-3 pub(super) methods; hiding all the details.
This new structure should make it far more easy to discover, where something is done and also will
maybe even pave the way for using traits for extraction instead of a huge pattern match (see also #114).
Otherwise, the PR does not change or add any functionality.
The
expr.rs
file/module became longer and longer with every PR, code was not discoverable at all. After observing, that the only function used on the outside of the module wasexpr::extract_expr
, I refactored the entire module to a self-contained and hopefully a lot more structured package.The public (
pub(super)
) interface of the entireexpr
module is now:expr::extract_expr
andexpr::extract_exprs
.That is all, outsiders need to know and see. Inside the module, the same structure was applied: logical units were split off in separate files that expose only 1-3
pub(super)
methods; hiding all the details.This new structure should make it far more easy to discover, where something is done and also will maybe even pave the way for using traits for extraction instead of a huge pattern match (see also #114).
Otherwise, the PR does not change or add any functionality.