js-regex icon indicating copy to clipboard operation
js-regex copied to clipboard

Inheritance structure allows for invalid operations

Open wyantb opened this issue 9 years ago • 0 comments

Example: .any().literals('abc').capture().end() - those parens won't do anyone good if they're found in a character set.

https://github.com/wyantb/js-regex/commit/e36ccf700f53558111e55f7de8a5cb1614d5f47c is a trivial reproduction of the problem, but there's bound to be a lot more - can endSeq be called on a macro, what methods can be called from root nodes, etc.

wyantb avatar Apr 19 '15 23:04 wyantb