mysticatea/regexpp

RegExpVisitor class is not exported

bd82 opened this issue ยท 2 comments

bd82 commented

Hello and thanks for this library ๐Ÿ‘

It seems the RegExp visitor class is not exported at runtime.
However the documentation seems to imply it is.

regexpp/src/index.ts

Lines 1 to 6 in 4bcab0b

import * as AST from "./ast"
import { RegExpParser } from "./parser"
import { RegExpValidator } from "./validator"
import { RegExpVisitor } from "./visitor"
export { AST, RegExpParser, RegExpValidator }

I need the class itself to be exposed in order to modify the traversal, e.g:

  • Halt the traversal when something has been detected.
  • Avoid traversing certain sub-nodes of the AST.

Cheers.
Shahar.

๐Ÿ‘ would love to see this. In VS Code we cannot import submodules, so I republished a version with this fix for now.

Hi @bd82!

Since this repo is unmaintained, you might want to re-open this issue in the @eslint-community fork https://github.com/eslint-community/regexpp

For more info about why we created this organization, you can read https://eslint.org/blog/2023/03/announcing-eslint-community-org