Documentation
¶
Index ¶
- type CompileOptions
- type Config
- type Data
- type Fet
- func (fet *Fet) CheckConfig() error
- func (fet *Fet) Compile(tpl string, writeFile bool) (string, []string, error)
- func (fet *Fet) CompileAll() (*sync.Map, error)
- func (fet *Fet) Display(tpl string, data interface{}, output io.Writer) (err error)
- func (fet *Fet) Fetch(tpl string, data interface{}) (result string, err error)
- func (fet *Fet) GetCompileFiles(dorf string) ([]string, error)
- func (fet *Fet) NeedIgnore(dorf string) bool
- func (fet *Fet) RealCmplPath(tpl string) string
- func (fet *Fet) RealTmplPath(tpl string) string
- func (fet *Fet) ShortTmplPath(tpl string) string
- type ImportNode
- type Imports
- type Indexs
- type MatchTagFn
- type Mode
- type Node
- type NodeList
- type NodeSets
- type Params
- type Position
- type Prop
- type Props
- type Quote
- type Runes
- type Type
- type ValidateFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompileOptions ¶
type CompileOptions struct {
File string
ParentNS string
LocalNS string
ParentScopes []string
LocalScopes *[]string
Includes *[]string
IncludeChains *Imports
Extends *[]string
Captures *map[string]string
ParseOptions *generator.ParseOptions
}
CompileOptions struct
type Fet ¶
type Fet struct {
*Config
Params
CompileDir string
TemplateDir string
// contains filtered or unexported fields
}
Fet struct
func (*Fet) CheckConfig ¶
*
- fet.CheckConfig
- ---------------------------
- check if a config is ok
- ---------------------------
func (*Fet) Compile ¶
*
- fet.Compile
- ---------------------------
- compile one template file
- ---------------------------
func (*Fet) CompileAll ¶
*
- fet.CompileAll
- ---------------------------
- compile all the files
- ---------------------------
func (*Fet) GetCompileFiles ¶
GetCompileFiles get need compiled files
func (*Fet) NeedIgnore ¶
NeedIgnore check the file or directory should be ignored.
func (*Fet) RealCmplPath ¶
RealCmplPath get the template file path
func (*Fet) RealTmplPath ¶
RealTmplPath get the template file path
func (*Fet) ShortTmplPath ¶ added in v0.1.6
ShortTemplPath
type ImportNode ¶ added in v0.1.10
type ImportNode struct {
Value string
Prevs []*ImportNode
}
ImportNode every node will lookup it's prevs so nexts are not necessary
func (*ImportNode) LookupCircle ¶ added in v0.1.10
func (importNode *ImportNode) LookupCircle(search *ImportNode, chains []*ImportNode) []string
type Imports ¶ added in v0.1.10
type Imports struct {
Nodes map[string]*ImportNode
}
type MatchTagFn ¶
MatchTagFn func
type Node ¶
type Node struct {
IsClosed bool
ContentIndex int
Name string
Content string
Pwd string
GlobalScopes []string
LocalScopes []string
Parent *Node
Pair *Node
Type Type
Props *Props
Features []*Node
Childs []*Node
Current *Node
Quotes []*Quote
Context *Runes
Fet *Fet
Data *map[string][]string
Indexs
*Position
}
Node struct
Click to show internal directories.
Click to hide internal directories.