Documentation ¶
Overview ¶
Package matcher implements a matcher component, that can determine whether or not a rune is part of a custom character class.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type M ¶
type M struct {
// contains filtered or unexported fields
}
M is the definition of a character class, which can tell whether a rune is part of that character definition or not.
func Merge ¶
Merge creates a new matcher, that accepts runes that are matched by one or more of the given matchers.
func New ¶
func New(desc string, rt *unicode.RangeTable) M
New creates a new matcher from a given match function.
func RuneWithDesc ¶
RuneWithDesc creates a matcher that matches only the given rune. The description is the string representation of this matcher. This is useful when dealing with whitespace characters.
Click to show internal directories.
Click to hide internal directories.