package parser
import "github.com/eknkc/amber/parser"
Index ¶
- Constants
- type Assignment
- type Attribute
- type Block
- type Comment
- type Condition
- type Doctype
- type Each
- type Mixin
- type MixinCall
- type NamedBlock
- type Node
- type Parser
- func ByteParser(input []byte) (*Parser, error)
- func FileParser(filename string) (*Parser, error)
- func StringParser(input string) (*Parser, error)
- func VirtualFileParser(filename string, fs http.FileSystem) (*Parser, error)
- func (p *Parser) Parse() *Block
- func (p *Parser) SetFilename(filename string)
- func (p *Parser) SetVirtualFilesystem(fs http.FileSystem)
- type SourcePosition
- type Tag
- type Text
Constants ¶
const ( NamedBlockDefault = iota NamedBlockAppend NamedBlockPrepend )
Types ¶
type Assignment ¶
type Assignment struct { SourcePosition X string Expression string }
type Attribute ¶
type Attribute struct { SourcePosition Name string Value string IsRaw bool Condition string }
type Block ¶
type Block struct { SourcePosition Children []Node }
func (*Block) CanInline ¶
type Comment ¶
type Comment struct { SourcePosition Value string Block *Block Silent bool }
type Condition ¶
type Condition struct { SourcePosition Positive *Block Negative *Block Expression string }
type Doctype ¶
type Doctype struct { SourcePosition Value string }
func (*Doctype) String ¶
type Each ¶
type Each struct { SourcePosition X string Y string Expression string Block *Block }
type Mixin ¶
type Mixin struct { SourcePosition Block *Block Name string Args []string }
type MixinCall ¶
type MixinCall struct { SourcePosition Name string Args []string }
type NamedBlock ¶
type Node ¶
type Node interface { Pos() SourcePosition }
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func ByteParser ¶
func FileParser ¶
func StringParser ¶
func VirtualFileParser ¶
func VirtualFileParser(filename string, fs http.FileSystem) (*Parser, error)
func (*Parser) Parse ¶
func (*Parser) SetFilename ¶
func (*Parser) SetVirtualFilesystem ¶
func (p *Parser) SetVirtualFilesystem(fs http.FileSystem)
type SourcePosition ¶
func (*SourcePosition) Pos ¶
func (s *SourcePosition) Pos() SourcePosition
type Tag ¶
type Tag struct { SourcePosition Block *Block Name string IsInterpolated bool Attributes []Attribute }
func (*Tag) IsRawText ¶
func (*Tag) IsSelfClosing ¶
type Text ¶
type Text struct { SourcePosition Value string Raw bool }
Source Files ¶
- Version
- v0.0.0-20171010120322-cdade1c07385 (latest)
- Published
- Oct 10, 2017
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 3 weeks ago –
Tools for package owners.