artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs
This commit is contained in:
@ -0,0 +1,11 @@
|
||||
# DECISIONS — shared (append-only)
|
||||
|
||||
## 2026-06-15 — Token.value for non-numeric tokens
|
||||
|
||||
Decision: `Token.value` is `None` for operator/paren/EOF tokens, and `int` or `float` for NUMBER tokens.
|
||||
Rationale: Parser phases only need the numeric value; operator/paren tokens carry no useful payload beyond their kind.
|
||||
|
||||
## 2026-06-15 — Float parsing strategy
|
||||
|
||||
Decision: Use Python's built-in `float()` for converting float literals. Detect float vs int by presence of `.` in the matched string.
|
||||
Rationale: Handles edge cases like `.5` and `10.` correctly via stdlib, avoids manual parsing bugs.
|
||||
Reference in New Issue
Block a user