Documentation
¶
Overview ¶
Package terminal contains basic terminal parsers for text parsing
Index ¶
- func Bool() parser.Func
- func Char() parser.Func
- func Float() parser.Func
- func Integer() parser.Func
- func Regexp(desc string, regexp string, includeWhitespaces bool, groupIndex int, ...) parser.Func
- func Rune(char rune, token string) parser.Func
- func String() parser.Func
- func Word(word string, token string, value interface{}) parser.Func
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Regexp ¶
func Regexp(desc string, regexp string, includeWhitespaces bool, groupIndex int, token string) parser.Func
Regexp matches the given regular expression The desc variable is used for error messages, so it should be descriptive and make sense in the sentence "was expecting %s". The includeWhitespaces variable should be true if the reader is by default ignoring the whitespaces but you need to match those as well. If you are using capturing groups you can select which group to use as a value with the groupIdex variable.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.