Documentation ¶
Index ¶
- type Language
- type Parser
- type Pattern
- func (p *Pattern) Cache(data string, pos int) (pat *Pattern, ret textmate.MatchObject)
- func (p *Pattern) CreateCaptureNodes(data string, pos int, d parser.DataSource, mo textmate.MatchObject, ...)
- func (p *Pattern) CreateNode(data string, pos int, d parser.DataSource, mo textmate.MatchObject) (ret *parser.Node)
- func (p *Pattern) FirstMatch(data string, pos int) (pat *Pattern, ret textmate.MatchObject)
- func (p Pattern) String() (ret string)
- type Provider
- type RootPattern
- type UnpatchedLanguage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Language ¶
type Language struct {
UnpatchedLanguage
}
For loading tmLanguage files https://manual.macromates.com/en/language_grammars
func (*Language) UnmarshalJSON ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
implements parser.Parser + parser.DataSource
type Pattern ¶
type Pattern struct { textmate.Named Include string Match textmate.Regex Captures textmate.Captures Begin textmate.Regex BeginCaptures textmate.Captures End textmate.Regex EndCaptures textmate.Captures Patterns []Pattern // contains filtered or unexported fields }
func (*Pattern) Cache ¶
Finds what does this pattern match also caches the match for the next uses. Searches in order Match, Begin, Include, sub patterns.
func (*Pattern) CreateCaptureNodes ¶
func (p *Pattern) CreateCaptureNodes(data string, pos int, d parser.DataSource, mo textmate.MatchObject, parent *parser.Node, capt textmate.Captures)
Creates a node for each capture also takse care of parent child relationship
func (*Pattern) CreateNode ¶
func (p *Pattern) CreateNode(data string, pos int, d parser.DataSource, mo textmate.MatchObject) (ret *parser.Node)
Creates a root node for the pattern then creates a node for each capture and appends them as child of root node
func (*Pattern) FirstMatch ¶
Finds the first sub pattern that has match for data after pos
type RootPattern ¶
type RootPattern struct {
Pattern
}
func (*RootPattern) String ¶
func (r *RootPattern) String() (ret string)
func (*RootPattern) UnmarshalJSON ¶
func (r *RootPattern) UnmarshalJSON(data []byte) error
type UnpatchedLanguage ¶
Click to show internal directories.
Click to hide internal directories.