Documentation
¶
Index ¶
- func ResolveMatchedOps(originalStr string, in []*MatchedOp) string
- type IsCapturingGroup
- type MatchedOp
- type MatchedPath
- type MatchedResults
- func (r *MatchedResults) AddAllPaths(collector *MatchedResults)
- func (r *MatchedResults) AddLocalPaths(collector *MatchedResults, op Op, opTokens []*Token)
- func (r *MatchedResults) AddMatchedPath(matchedPath *MatchedPath)
- func (r *MatchedResults) AddMatchedPathsAfterConsumeComplex(op Op)
- func (r *MatchedResults) AddMatchedPathsAfterSimpleConsume(lengths []int, op Op, allLeastTokens []*Token)
- func (r *MatchedResults) Index(index int) *MatchedPath
- func (r *MatchedResults) IsMatched() bool
- func (r *MatchedResults) MatchedSubstring(originalStr string) string
- func (r *MatchedResults) Size() int
- type Op
- type OpComplex
- type OpPrimitive
- type Relatives
- type RelativesImpl
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveMatchedOps ¶
Types ¶
type IsCapturingGroup ¶
type IsCapturingGroup interface {
IsCapturingGroup()
}
type MatchedOp ¶
type MatchedOp struct {
// contains filtered or unexported fields
}
func NewMatchedOp ¶
type MatchedPath ¶
type MatchedPath struct {
// contains filtered or unexported fields
}
func NewEmptyMatchedPath ¶
func NewEmptyMatchedPath() *MatchedPath
func NewMatchedPathChild ¶
func NewMatchedPathChild(parentOp *MatchedOp, childPath *MatchedPath) *MatchedPath
func NewMatchedPathSimple ¶
func NewMatchedPathSimple(matchedOp *MatchedOp) *MatchedPath
func (*MatchedPath) CapturingGroupArr ¶
func (r *MatchedPath) CapturingGroupArr() [][]*MatchedOp
func (*MatchedPath) Length ¶
func (r *MatchedPath) Length() int
type MatchedResults ¶
type MatchedResults struct {
// contains filtered or unexported fields
}
func NewMatchedResults ¶
func NewMatchedResults() *MatchedResults
func (*MatchedResults) AddAllPaths ¶
func (r *MatchedResults) AddAllPaths(collector *MatchedResults)
func (*MatchedResults) AddLocalPaths ¶
func (r *MatchedResults) AddLocalPaths(collector *MatchedResults, op Op, opTokens []*Token)
func (*MatchedResults) AddMatchedPath ¶
func (r *MatchedResults) AddMatchedPath(matchedPath *MatchedPath)
func (*MatchedResults) AddMatchedPathsAfterConsumeComplex ¶
func (r *MatchedResults) AddMatchedPathsAfterConsumeComplex(op Op)
func (*MatchedResults) AddMatchedPathsAfterSimpleConsume ¶
func (r *MatchedResults) AddMatchedPathsAfterSimpleConsume(lengths []int, op Op, allLeastTokens []*Token)
func (*MatchedResults) Index ¶
func (r *MatchedResults) Index(index int) *MatchedPath
func (*MatchedResults) IsMatched ¶
func (r *MatchedResults) IsMatched() bool
func (*MatchedResults) MatchedSubstring ¶
func (r *MatchedResults) MatchedSubstring(originalStr string) string
func (*MatchedResults) Size ¶
func (r *MatchedResults) Size() int
type OpComplex ¶
type OpComplex interface { Op // ConsumeComplex // returns *MatchedResults, which is matched by op // for example, in usual regexps regexp `(?:ab|abc)` can match in string "abc" by two paths: "ab" & "abc" // here are the same - return all matched paths ConsumeComplex(tokens []*Token) *MatchedResults }
type OpPrimitive ¶
type OpPrimitive interface { Op // ConsumePrimitive // returns array of lengths, which are matched by op // for example, in usual regexps regexp `a+` can match in string "aa" - matched lengths here []int{1,2} // here are the same - return all matched paths (their lengths) // returns nil if not matched ConsumePrimitive(tokens []*Token) []int }
type RelativesImpl ¶
type RelativesImpl struct {
// contains filtered or unexported fields
}
func NewRelativesImpl ¶
func NewRelativesImpl() *RelativesImpl
func (*RelativesImpl) Children ¶
func (r *RelativesImpl) Children() []Op
func (*RelativesImpl) Parent ¶
func (r *RelativesImpl) Parent() Op
func (*RelativesImpl) SetChildren ¶
func (r *RelativesImpl) SetChildren(in []Op)
func (*RelativesImpl) SetParent ¶
func (r *RelativesImpl) SetParent(in Op)
Click to show internal directories.
Click to hide internal directories.