Documentation
¶
Overview ¶
Package terminal contains basic terminal parsers for text parsing
Index ¶
- func Bool(trueStr string, falseStr string) *parser.NamedFunc
- func Char() *parser.NamedFunc
- func Float() *parser.NamedFunc
- func Integer() *parser.NamedFunc
- func Nil(nilStr string) *parser.NamedFunc
- func Regexp(token string, name string, regexp string, groupIndex int) *parser.NamedFunc
- func Rune(ch rune) *parser.NamedFunc
- func String(allowBackquote bool) *parser.NamedFunc
- func Substring(token string, str string, value interface{}) *parser.NamedFunc
- func Whitespaces(wsMode text.WsMode) parsley.Parser
- func Word(word string, value interface{}) *parser.NamedFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Regexp ¶
Regexp matches the given regular expression The name 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.
func Whitespaces ¶ added in v0.6.0
Whitespaces matches one or more spaces or tabs. If newLine is true it also matches \n and \f characters.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.