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

source-academy / py-slang / 23419444526
59%

Build:
DEFAULT BRANCH: main
Ran 23 Mar 2026 02:57AM UTC
Jobs 1
Files 34
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

23 Mar 2026 02:56AM UTC coverage: 41.678% (+6.8%) from 34.925%
23419444526

push

github

web-flow
feat: replace hand-written parser with Nearley grammar (#104)

* feat: replace hand-written parser with Nearley grammar

Rewrites the Python parser using the Nearley parser generator with
Moo-based lexer. Adds indentation-aware tokenization, subsumes
validators into resolver, and includes comprehensive parser tests.

* chore: add yarn.lock and remove package-lock.json

Upstream CI uses Yarn with --frozen-lockfile. Generate yarn.lock
for the new nearley/moo dependencies and remove the npm lockfile.

* fix: resolve eslint errors and apply prettier formatting

Adds eslint-disable to generated files (ast-types, python-grammar),
fixes explicit-any types in parser-adapter and token-bridge, removes
unused imports.

* docs: clarify traverse.ts is a standalone utility, not the production path

Updates docstrings to accurately describe the instanceof-based traversal
(not visitor pattern) and warns that runValidators does not pass Environment,
making scope-aware validators like no-reassignment silently no-op.
The main pipeline uses Resolver's inline validation instead.

* fix: add Starred handling to traverseAST, remove broken runValidators export

traverseAST now recurses into ExprNS.Starred children. The standalone
runValidators is removed from public exports — it cannot pass Environment,
silently breaking scope-aware validators like no-reassignment. Use the
Resolver's inline validation pipeline instead.

* fix: allow embedded quotes in triple-quoted string literals

* fix: map hex/octal/binary tokens to BIGINT to match legacy tokenizer

* fix: extend no-reassignment validator to catch AnnAssign

* fix: traverse assignment targets in traverseAST utility

* fix: make compile-grammar idempotent to prevent duplicate @ts-nocheck

Also regenerates python-grammar.ts with current nearleyc output.

* style: format analysis.test.ts to pass prettier

* refactor: rename Moo tokens and rewrite Nearley grammar with spec-aligned names

- Rename lexer tokens: identifier→name... (continued)

276 of 1014 branches covered (27.22%)

Branch coverage included in aggregate %.

560 of 621 new or added lines in 24 files covered. (90.18%)

1214 of 2561 relevant lines covered (47.4%)

52.68 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
93.88
17.44% src/ast-types.ts
1
86.84
src/parser/parser-adapter.ts
1
92.59
src/validator/sublanguages.ts
4
33.33
src/validator/features/no-lambda.ts
12
88.51
src/parser/lexer.ts
13
71.97
src/parser/python-grammar.ts
29
24.39
src/validator/traverse.ts
Jobs
ID Job ID Ran Files Coverage
1 23419444526.1 23 Mar 2026 02:57AM UTC 34
41.68
GitHub Action Run
Source Files on build 23419444526
  • Tree
  • List 34
  • Changed 10
  • Source Changed 8
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #23419444526
  • ccdeccb5 on github
  • Prev Build on main (#23332448403)
  • Next Build on main (#23471464995)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc