Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data CaptureID
- type CaptureNames = HashMap CaptureName CaptureOrdinal
- noCaptureNames :: CaptureNames
- newtype CaptureName = CaptureName {
- getCaptureName :: Text
- newtype CaptureOrdinal = CaptureOrdinal {}
- findCaptureID :: CaptureID -> CaptureNames -> Int
Documentation
CaptureID identifies captures, either by number (e.g., [cp|1|]) or name (e.g., [cp|foo|]).
type CaptureNames = HashMap CaptureName CaptureOrdinal Source
the dictionary for named captures stored in compiled regular expressions associates
noCaptureNames :: CaptureNames Source
an empty CaptureNames
dictionary
newtype CaptureName Source
a CaptureName
is just the text of the name
CaptureName | |
|
Eq CaptureName | |
Ord CaptureName | |
Show CaptureName | |
Hashable CaptureName |
newtype CaptureOrdinal Source
a CaptureOrdinal
is just the number of the capture, starting
with 0 for the whole of the text matched, then in leftmost,
outermost
findCaptureID :: CaptureID -> CaptureNames -> Int Source
look up a CaptureID
in the CaptureNames
dictionary