This commit is contained in:
Andreas Rumpf 2020-08-27 11:25:20 +02:00 • committed by GitHub
commit ccccd30cf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 47 deletions

View file

@ -367,7 +367,7 @@ func contains*(pattern: CaptureBounds, name: string): bool =
func contains*(pattern: Captures, name: string): bool =
name in CaptureBounds(pattern)
func checkNamedCaptured(pattern: RegexMatch, name: string): void =
func checkNamedCaptured(pattern: RegexMatch, name: string) =
if not (name in pattern.captureBounds):
raise newException(KeyError, "Group '" & name & "' was not captured")