Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn the Lexer, Parser & Composer into generators #253

Merged
merged 3 commits into from Apr 11, 2021
Merged

Turn the Lexer, Parser & Composer into generators #253

merged 3 commits into from Apr 11, 2021

Commits on Apr 3, 2021

  1. feat!: Turn the lexer into a generator

    BREAKING CHANGE: The `push` argument of `new Lexer()` is dropped, and
    instead its `lex()` method is now a Generator<string> that allows for
    the lexemes to be iterated.
    eemeli committed Apr 3, 2021
    Copy the full SHA
    7526509 View commit details
    Browse the repository at this point in the history
  2. feat!: Turn the parser into a generator

    BREAKING CHANGE: The `push` argument of `new Parser()` is dropped, and
    instead its `parse()`, `next()` and `end()` methods are now generators
    that allow for the parsed tokens to be iterated.
    eemeli committed Apr 3, 2021
    Copy the full SHA
    7169dce View commit details
    Browse the repository at this point in the history
  3. feat!: Turn the composer into a generator

    Adds a convenience method `composer.compose(tokens)`.
    
    BREAKING CHANGE: The `push` argument of `new Composer()` is dropped, and
    instead its `next()` and `end()` methods are now generators that allow
    for the parsed documents to be iterated.
    eemeli committed Apr 3, 2021
    Copy the full SHA
    1755d2f View commit details
    Browse the repository at this point in the history