• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dblock / excalc-rs / 35987320194
98%

Build:
DEFAULT BRANCH: master
Ran 24 Sep 2026 10:28AM UTC
Jobs 1
Files 14
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Sep 2026 10:27AM UTC coverage: 99.723% (+0.02%) from 99.707%
35987320194

push

github

dblock
Implement variable assignment (:=)

Adds statement-level variable assignment: `name := expr` evaluates
expr and binds it to name, visible to later statements in the same
input. A full input can now be a `;`- or newline-separated sequence
of statements (assignments and/or plain expressions); the value of
the last statement is the result (an assignment's value is the value
assigned).

Assignment is deliberately a statement, not an expression — it can't
be nested inside a larger expression or chained (`x := y := 5`),
keeping `:=` unambiguous and orthogonal to `=`'s equality meaning.
`pi`/`e` remain reserved and can't be reassigned (a new
CalcError::ReservedIdentifier). Variables don't persist across
separate CLI invocations or MCP tool calls — each `evaluate()` call
still starts from a fresh Context.

- lexer.rs: new Assign (':=') and Semi (';' or newline) tokens;
  newlines are no longer plain whitespace.
- ast.rs: new Stmt enum (Assign/Expr) and Program = Vec<Stmt>.
- parser.rs: parse_program() parses a full program; parse_statement()
  disambiguates 'name :=' via 2-token lookahead.
- eval.rs: eval_program() runs statements against a mutable Context.
- lib.rs: evaluate() now parses/evaluates a program instead of a
  single expression.

Documents the feature in README.md (new Variables section + testable
examples), DESIGN.md (grammar's new statement layer, updated =/?
deviation note), docs/functions/logic.md, and CHANGELOG.md. Full test
suite (207 tests), fmt, and clippy all clean; new code has no
uncovered lines per cargo llvm-cov.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

178 of 178 new or added lines in 4 files covered. (100.0%)

3236 of 3245 relevant lines covered (99.72%)

63000.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 35987320194.1 24 Sep 2026 10:28AM UTC 14
99.72
GitHub Action Run
Source Files on build 35987320194
  • Tree
  • List 14
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35987320194
  • f6120d6e on github
  • Prev Build on master (#35986595107)
  • Next Build on master (#35987838768)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc