Safe Haskell | None |
---|---|
Language | Haskell2010 |
Text.RE.Internal.NamedCaptures
- cp :: QuasiQuoter
- extractNamedCaptures :: String -> Either String ((Int, CaptureNames), String)
- idFormatTokenREOptions :: FormatTokenREOptions
- data Token
- validToken :: Token -> Bool
- formatTokens :: [Token] -> String
- formatTokens' :: FormatTokenREOptions -> [Token] -> String
- formatTokens0 :: [Token] -> String
- scan :: String -> [Token]
Documentation
cp :: QuasiQuoter Source #
quasi quoter for CaptureID ([cp|0|],[cp|y|], etc.)
extractNamedCaptures :: String -> Either String ((Int, CaptureNames), String) Source #
extract the CaptureNames from an RE or return an error diagnostic if the RE is not well formed; also returs the total number of captures in the RE
idFormatTokenREOptions :: FormatTokenREOptions Source #
a configuration that will preserve the parsed regular expression in the output
our RE scanner returns a list of these tokens
validToken :: Token -> Bool Source #
check that a token is well formed
formatTokens :: [Token] -> String Source #
format [Token] into an RE string
formatTokens' :: FormatTokenREOptions -> [Token] -> String Source #
the general Token formatter, generating REs according to the options
formatTokens0 :: [Token] -> String Source #