Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export interface Quantifier extends NodeBase {
max: number // can be Number.POSITIVE_INFINITY
greedy: boolean
element: QuantifiableElement
quantifier: string
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,12 @@ class RegExpParserState {
parent: parentNode,
start,
end,
raw: this.source.slice(start, end),
raw: prevNode.raw + this.source.slice(start, end),
min,
max,
greedy,
element: prevNode as QuantifiableElement,
quantifier: this.source.slice(start, end),
}
elements.push(node)
prevNode.parent = node
Expand Down