Skip to content

Commit

Permalink
Fix typo in pegs.nim (#23143)
Browse files Browse the repository at this point in the history
wether -> whether
  • Loading branch information
eltociear authored Dec 30, 2023
1 parent fd253a0 commit b921631
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pure/pegs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -314,21 +314,21 @@ func capture*(a: Peg = Peg(kind: pkEmpty)): Peg {.rtl, extern: "npegsCapture".}
func backref*(index: range[1..MaxSubpatterns], reverse: bool = false): Peg {.
rtl, extern: "npegs$1".} =
## constructs a back reference of the given `index`. `index` starts counting
## from 1. `reverse` specifies wether indexing starts from the end of the
## from 1. `reverse` specifies whether indexing starts from the end of the
## capture list.
result = Peg(kind: pkBackRef, index: (if reverse: -index else: index - 1))

func backrefIgnoreCase*(index: range[1..MaxSubpatterns], reverse: bool = false): Peg {.
rtl, extern: "npegs$1".} =
## constructs a back reference of the given `index`. `index` starts counting
## from 1. `reverse` specifies wether indexing starts from the end of the
## from 1. `reverse` specifies whether indexing starts from the end of the
## capture list. Ignores case for matching.
result = Peg(kind: pkBackRefIgnoreCase, index: (if reverse: -index else: index - 1))

func backrefIgnoreStyle*(index: range[1..MaxSubpatterns], reverse: bool = false): Peg {.
rtl, extern: "npegs$1".} =
## constructs a back reference of the given `index`. `index` starts counting
## from 1. `reverse` specifies wether indexing starts from the end of the
## from 1. `reverse` specifies whether indexing starts from the end of the
## capture list. Ignores style for matching.
result = Peg(kind: pkBackRefIgnoreStyle, index: (if reverse: -index else: index - 1))

Expand Down

0 comments on commit b921631

Please sign in to comment.