Documentation ¶
Index ¶
- Constants
- Variables
- type ElementParser
- type FilterElement
- func (e *FilterElement) Equals(other *FilterElement) bool
- func (e *FilterElement) FullFilterStr() string
- func (e *FilterElement) HasSubElems() bool
- func (e *FilterElement) String() string
- func (e *FilterElement) StringCustom(showPtr bool, indent int, singleLine bool) string
- func (e *FilterElement) StringCustomLines(showPtr bool, indent int, singleLine bool) []string
- type ParseMode
Constants ¶
View Source
const ( PARENS = "()" BRACES = "{}" OPEN_DELIMS = "({" CLOSE_DELIMS = ")}" )
Delimiters
View Source
const ( PRE_TEXT_MODE int = iota TEXT_MODE POST_TEXT_MODE QUOTED_TEXT_MODE )
Variables ¶
View Source
var DELIM_PAIRS []string
Set in init
Functions ¶
This section is empty.
Types ¶
type ElementParser ¶
type ElementParser struct {
// contains filtered or unexported fields
}
func NewElementParser ¶
func NewElementParser(filterStr string, startIdx int, lastIdx int) *ElementParser
func NewFullElementParser ¶
func NewFullElementParser(filterStr string) *ElementParser
func (*ElementParser) CheckDelims ¶
func (p *ElementParser) CheckDelims() error
func (*ElementParser) Parse ¶
func (p *ElementParser) Parse() (*FilterElement, error)
type FilterElement ¶
type FilterElement struct { // FilterStr and SubElems are mutually exclusive FilterStr string SubElems []*FilterElement // If not empty string, must be a 2 character string Delims string // Whitespace PreWs string PostWs string }
func NewStrFilterElement ¶
func NewStrFilterElement( fs string, delims string, preWs string, postWs string) *FilterElement
func NewSubElemFilterElement ¶
func NewSubElemFilterElement( ses []*FilterElement, delims string, preWs string, postWs string) *FilterElement
func ParseElement ¶
func ParseElement(filterStr string) (*FilterElement, error)
func (*FilterElement) Equals ¶
func (e *FilterElement) Equals(other *FilterElement) bool
func (*FilterElement) FullFilterStr ¶
func (e *FilterElement) FullFilterStr() string
func (*FilterElement) HasSubElems ¶
func (e *FilterElement) HasSubElems() bool
func (*FilterElement) StringCustom ¶
func (e *FilterElement) StringCustom(showPtr bool, indent int, singleLine bool, ) string
func (*FilterElement) StringCustomLines ¶
func (e *FilterElement) StringCustomLines(showPtr bool, indent int, singleLine bool, ) []string
Click to show internal directories.
Click to hide internal directories.