Added function to return the number of subexpressions in the group

master
Aadhavan Srinivasan 24 hours ago
parent fcdb23524a
commit 206fea34cd

@ -18,6 +18,12 @@ type Reg struct {
numGroups int
}
// numSubexp eturns the number of sub-expressions in the given [Reg]. This is equivalent
// to the number of capturing groups.
func (r Reg) NumSubexp() int {
return r.numGroups
}
const concatRune rune = 0xF0001
// Flags for shuntingYard - control its behavior

Loading…
Cancel
Save