Skip to content

docs: clarify comments for readers new to the codebase - #3

Merged
sovrin merged 2 commits into
masterfrom
sovrin/clarify-comments
Oct 19, 2026
Merged

sovrin merged 2 commits into
masterfrom
sovrin/clarify-comments

Conversation

@sovrin

@sovrin sovrin commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Rewrites code comments that only made sense to someone who knew the earlier slice-based design.

  • parser, memoize, many, run, label, grammar, choice: JSDoc now describes the current offset-based behaviour (e.g. "reads input from index and never slices it" → what a parser receives and returns)
  • chainLeft: the "(right-to-left for same precedence)" note was wrong; it now says 1-2-3 is evaluated as (1-2)-3
  • inner: replaces the circular "like inner of braced" description
  • grammar.test.ts: drops a stale // [6, ''] comment from the old output format
  • README.md and doc/api/ regenerated from the JSDoc

No code changes. Tests and lint pass.

🤖 Generated with Claude Code

sovrin and others added 2 commits October 19, 2026 19:46
Rewrite JSDoc that only made sense with knowledge of the earlier
slice-based design (parser, memoize, many, run, label, grammar, choice),
fix the wrong associativity note on chainLeft and the circular one on
inner, and drop a stale output-format comment in grammar.test.ts.
README.md and doc/api are regenerated from the JSDoc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ents

# Conflicts:
#	doc/api/combinators.md
#	src/core/run.ts
@sovrin
sovrin merged commit f1e4395 into master Oct 19, 2026
4 checks passed
@sovrin
sovrin deleted the sovrin/clarify-comments branch October 19, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant