Summary
src/evaluator/types.rs is currently 1,504 lines and handles reading/interpreting byte, short, long, and string types. v0.3.0 will add regex (#39), float/double (#40), date/timestamp (#41), and pascal string (#43) types, which would push this file well past 2,500 lines.
Proposal
Convert evaluator/types.rs into a directory module:
evaluator/types/
├── mod.rs # Public API: read_typed_value() dispatcher, TypeReadError
├── numeric.rs # Byte, short, long reading (existing)
├── string.rs # String reading (existing)
├── quad.rs # 64-bit integer types (#36, v0.2.0)
├── float.rs # Float/double types (#40, v0.3.0)
├── date.rs # Date/timestamp types (#41, v0.3.0)
├── regex.rs # Regex/search types (#39, v0.3.0)
└── pascal.rs # Pascal string type (#43, v0.3.0)
The read_typed_value() function in mod.rs would dispatch to the appropriate submodule based on TypeKind.
Why This Matters
Each new type requires:
- Reading logic (byte interpretation, endianness handling)
- Comparison logic (how values are compared)
- Tests (typically 200-400 lines per type)
Without splitting, types.rs would grow to ~3,500-4,000 lines by v0.3.0 completion.
Timing
This should be done before v0.3.0 work starts. The quad type (#36, v0.2.0) can be added to the existing file since it follows the numeric pattern, but the directory conversion should happen before float/regex/date types are added.
Acceptance Criteria
Summary
src/evaluator/types.rsis currently 1,504 lines and handles reading/interpreting byte, short, long, and string types. v0.3.0 will add regex (#39), float/double (#40), date/timestamp (#41), and pascal string (#43) types, which would push this file well past 2,500 lines.Proposal
Convert
evaluator/types.rsinto a directory module:The
read_typed_value()function inmod.rswould dispatch to the appropriate submodule based onTypeKind.Why This Matters
Each new type requires:
Without splitting,
types.rswould grow to ~3,500-4,000 lines by v0.3.0 completion.Timing
This should be done before v0.3.0 work starts. The quad type (#36, v0.2.0) can be added to the existing file since it follows the numeric pattern, but the directory conversion should happen before float/regex/date types are added.
Acceptance Criteria
evaluator/types.rsconverted toevaluator/types/directory modulenumeric.rsandstring.rsTypeReadErrorandread_typed_value()remain inmod.rs