Skip to content

docs: update for new API#178

Merged
ianlewis merged 1 commit intomainfrom
173-update-lexer-parser-docs
Jan 25, 2026
Merged

docs: update for new API#178
ianlewis merged 1 commit intomainfrom
173-update-lexer-parser-docs

Conversation

@ianlewis
Copy link
Copy Markdown
Owner

@ianlewis ianlewis commented Jan 25, 2026

Description:

Update documentation to reflect the new CustomLexer and Parser APIs.

Related Issues:

Fixes #173

Checklist:

  • Review the CONTRIBUTING.md documentation.
  • Add a reference to a related issue in the repository.
  • Add a description of the changes proposed in the pull request.
  • Add unit tests if applicable.
  • Update documentation if applicable.
  • Add a note in the CHANGELOG.md if applicable.

@ianlewis ianlewis linked an issue Jan 25, 2026 that may be closed by this pull request
@ianlewis ianlewis requested a review from Copilot January 25, 2026 08:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the documentation to reflect changes in the CustomLexer and Parser APIs, specifically the removal of the context.Context parameter from state interface methods in favor of passing context through dedicated context objects (CustomLexerContext and ParserContext).

Changes:

  • Updated interface method signatures to remove context.Context parameters from LexState.Run() and ParseState.Run()
  • Revised documentation to clarify that context objects are passed to state methods
  • Reorganized documentation sections, moving lexer invocation examples before CustomLexer details

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
parser.go Removed ctx parameter name from ParseState.Run() interface method
lexparse.go Updated function comment to mention concurrent token feeding
custom.go Removed ctx parameter name from LexState.Run() interface method
README.md Updated all documentation and code examples to reflect new API signatures and context object usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Ian Lewis <ian@ianlewis.org>
@ianlewis ianlewis force-pushed the 173-update-lexer-parser-docs branch from 3f80c46 to 96723fa Compare January 25, 2026 08:18
@ianlewis ianlewis merged commit 6f24327 into main Jan 25, 2026
24 checks passed
@ianlewis ianlewis deleted the 173-update-lexer-parser-docs branch January 25, 2026 08:26
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.

[feature] Refactor lexer and parser API

2 participants