Back to Explore

bd82/regexp-to-ast

GitHub
1 watchersOpen source

Last release:

regexp-to-ast is a JavaScript utility that reads a JavaScript Regular Expression literal (pattern text) and converts it into an Abstract Syntax Tree (AST). It also provides a visitor API (BaseRegExpVisitor) so you can traverse the AST and run custom logic for parsing and inspecting regex structure.

Project status

  • The repository shows long periods without published updates, with the latest tagged update in the provided history being v0.5.0 (2019-12-11) and the last upstream push dated 2023-06-06, so as of 2026-06-09 the source appears quiet or in maintenance mode rather than actively maintained.
  • Apparent update cadence is low and irregular, with several updates clustered in 2018-2019 and then a multi-year gap in the provided update history, plus no evidence of steady ongoing updates after 2019.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v0.5.0

    v0.5.0 introduces location tracking in the generated RegExp AST by adding begin/end offsets to many AST nodes. The repository release notes provided to you are empty, so the functional implications described below are effectively not documented in the release notes themselves.

    BreakingFeatures
  • v0.4.0

    This release (v0.4.0) primarily focuses on performance improvements to the RegExp parser. Release notes were not provided in the publisher release entry, so the changelog and the code diff indicate the substantive change was an internal quantifier parsing optimization to reduce exception-driven backtracking overhead.

  • v0.3.5

    Release v0.3.5 was published on 2018-07-12, but no release notes or changelog details were provided by the publisher. As a result, this release cannot be assessed for developer-impacting changes (API, behavior, migrations, security, or performance) based on the available information.

  • v0.3.4

    Version 0.3.4 makes mostly TypeScript typing and visitor API enhancements. The AST shape is extended by adding a new required boolean field on Set nodes, and the BaseRegExpVisitor type gains an additional visitChildren entry point for traversing node children. No security or runtime behavior changes are explicitly described in the provided release notes (none were provided).

  • v0.3.3

    No publisher release notes were provided for v0.3.3. The code diff shows this release is primarily a TypeScript type and visitor API update, plus version bump metadata.

  • v0.3.2

    Release v0.3.2 primarily updates TypeScript typings. The code diff shows no runtime logic changes, but the BaseRegExpVisitor method signatures in api.d.ts are updated to accept the AST node being visited, and the package internal VERSION/version are bumped.

  • v0.3.1

    The provided release notes for v0.3.1 are empty, so there is no documented guidance on what changed. The code diff shows a small set of mostly metadata and tooling updates, including a corrected VERSION constant, a new TypeScript typings entry in package.json, and CI and release-script adjustments.

  • v0.3.0

    v0.3.0 introduces an AST visitor facility (BaseRegExpVisitor) to traverse the parsed regular expression AST, and it enriches the AST nodes with more explicit typing metadata (notably for flags). The release notes provided are empty, so the code changes below represent unreviewed additions and potential compatibility impacts.

  • v0.2.4

    This release (v0.2.4) updates the regexp-to-AST parser logic around how it detects quantifiers. Code changes include introducing parser state save/restore and changing quantifier detection, and the test suite reflects different parsing behavior for inputs like /a{b}/.

  • v0.2.3

    Release v0.2.3 was published on 2018-06-02, but no release notes or change log details were provided by the publisher. As a result, there is not enough information to identify new features, breaking changes, bug fixes, security updates, or migrations from the release notes alone.