amber: github.com/eknkc/amber/parser Index | Files

package parser

import "github.com/eknkc/amber/parser"

Index

Package Files

nodes.go parser.go scanner.go

Constants

const (
    NamedBlockDefault = iota
    NamedBlockAppend
    NamedBlockPrepend
)

type Assignment Uses

type Assignment struct {
    SourcePosition
    X          string
    Expression string
}

type Attribute Uses

type Attribute struct {
    SourcePosition
    Name      string
    Value     string
    IsRaw     bool
    Condition string
}

type Block Uses

type Block struct {
    SourcePosition
    Children []Node
}

func (*Block) CanInline Uses

func (b *Block) CanInline() bool

type Comment Uses

type Comment struct {
    SourcePosition
    Value  string
    Block  *Block
    Silent bool
}

type Condition Uses

type Condition struct {
    SourcePosition
    Positive   *Block
    Negative   *Block
    Expression string
}

type Doctype Uses

type Doctype struct {
    SourcePosition
    Value string
}

func (*Doctype) String Uses

func (d *Doctype) String() string

type Each Uses

type Each struct {
    SourcePosition
    X          string
    Y          string
    Expression string
    Block      *Block
}

type Mixin Uses

type Mixin struct {
    SourcePosition
    Block *Block
    Name  string
    Args  []string
}

type MixinCall Uses

type MixinCall struct {
    SourcePosition
    Name string
    Args []string
}

type NamedBlock Uses

type NamedBlock struct {
    Block
    Name     string
    Modifier int
}

type Node Uses

type Node interface {
    Pos() SourcePosition
}

type Parser Uses

type Parser struct {
    // contains filtered or unexported fields
}

func ByteParser Uses

func ByteParser(input []byte) (*Parser, error)

func FileParser Uses

func FileParser(filename string) (*Parser, error)

func StringParser Uses

func StringParser(input string) (*Parser, error)

func VirtualFileParser Uses

func VirtualFileParser(filename string, fs http.FileSystem) (*Parser, error)

func (*Parser) Parse Uses

func (p *Parser) Parse() *Block

func (*Parser) SetFilename Uses

func (p *Parser) SetFilename(filename string)

func (*Parser) SetVirtualFilesystem Uses

func (p *Parser) SetVirtualFilesystem(fs http.FileSystem)

type SourcePosition Uses

type SourcePosition struct {
    LineNum     int
    ColNum      int
    TokenLength int
    Filename    string
}

func (*SourcePosition) Pos Uses

func (s *SourcePosition) Pos() SourcePosition

type Tag Uses

type Tag struct {
    SourcePosition
    Block          *Block
    Name           string
    IsInterpolated bool
    Attributes     []Attribute
}

func (*Tag) IsRawText Uses

func (t *Tag) IsRawText() bool

func (*Tag) IsSelfClosing Uses

func (t *Tag) IsSelfClosing() bool

type Text Uses

type Text struct {
    SourcePosition
    Value string
    Raw   bool
}

Package parser imports 10 packages (graph) and is imported by 5 packages. Updated 2017-07-18. Refresh now. Tools for package owners.