regexp-tree icon indicating copy to clipboard operation
regexp-tree copied to clipboard

Consider using non-null value for "empty string"

Open RReverser opened this issue 7 years ago • 0 comments

Right now various productions such as /(?:)/, /1|/, etc. can produce null values in place of sub-expressions when parsed.

It could be useful (as in just "nice") to have instead a separate node type like { type: "Empty" } so that one could always expect node.type to work whenever node is supposed to be an expression without extra check for null.

RReverser avatar Jun 30 '17 00:06 RReverser