Documentation ¶
Overview ¶
This package enables support for Textmate Language Syntax definitions (tmLanguage) and Textmate Colour Schemes (tmTheme).
Index ¶
- type Capture
- type Captures
- type Color
- type Language
- type LanguageParser
- type LanguageProvider
- type MatchObject
- type Named
- type Pattern
- func (p *Pattern) Cache(data string, pos int) (pat *Pattern, ret MatchObject)
- func (p *Pattern) CreateCaptureNodes(data string, pos int, d parser.DataSource, mo MatchObject, parent *parser.Node, ...)
- func (p *Pattern) CreateNode(data string, pos int, d parser.DataSource, mo MatchObject) (ret *parser.Node)
- func (p *Pattern) FirstMatch(data string, pos int) (pat *Pattern, ret MatchObject)
- func (p Pattern) String() (ret string)
- type Regex
- type RootPattern
- type ScopeSetting
- type Settings
- type Theme
- type UUID
- type UnpatchedLanguage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Color ¶
func (*Color) UnmarshalJSON ¶
type LanguageParser ¶
type LanguageParser struct {
// contains filtered or unexported fields
}
func NewLanguageParser ¶
func NewLanguageParser(scope string, data string) (*LanguageParser, error)
func (*LanguageParser) Data ¶
func (d *LanguageParser) Data(a, b int) string
type LanguageProvider ¶
var (
Provider LanguageProvider
)
func (*LanguageProvider) GetLanguage ¶
func (t *LanguageProvider) GetLanguage(id string) (*Language, error)
func (*LanguageProvider) LanguageFromFile ¶
func (t *LanguageProvider) LanguageFromFile(fn string) (*Language, error)
func (*LanguageProvider) LanguageFromScope ¶
func (t *LanguageProvider) LanguageFromScope(id string) (*Language, error)
type MatchObject ¶
type MatchObject []int
type Pattern ¶
type Pattern struct { Named Include string Match Regex Captures Captures Begin Regex BeginCaptures Captures End Regex EndCaptures Captures Patterns []Pattern // contains filtered or unexported fields }
func (*Pattern) Cache ¶
func (p *Pattern) Cache(data string, pos int) (pat *Pattern, ret MatchObject)
func (*Pattern) CreateCaptureNodes ¶
func (p *Pattern) CreateCaptureNodes(data string, pos int, d parser.DataSource, mo MatchObject, parent *parser.Node, capt Captures)
func (*Pattern) CreateNode ¶
func (p *Pattern) CreateNode(data string, pos int, d parser.DataSource, mo MatchObject) (ret *parser.Node)
func (*Pattern) FirstMatch ¶
func (p *Pattern) FirstMatch(data string, pos int) (pat *Pattern, ret MatchObject)
type Regex ¶
type Regex struct {
// contains filtered or unexported fields
}
func (*Regex) UnmarshalJSON ¶
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 ScopeSetting ¶
func (ScopeSetting) String ¶
func (s ScopeSetting) String() (ret string)
type Settings ¶
TODO(q): personally I don't care about the font style attributes
func (*Settings) UnmarshalJSON ¶
type Theme ¶
type Theme struct { GutterSettings Settings Name string Settings []ScopeSetting UUID UUID }
func (*Theme) ClosestMatchingSetting ¶
func (t *Theme) ClosestMatchingSetting(scope string) *ScopeSetting
type UnpatchedLanguage ¶
Click to show internal directories.
Click to hide internal directories.