parser

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintPrograms added in v0.0.6

func PrintPrograms(label string, programs []Program)

Types

type DefineStatement

type DefineStatement struct {
	Name string

	Programs int

	Parent Statement
	Depth  int
	// contains filtered or unexported fields
}

func (*DefineStatement) ChangeProgramCount added in v0.0.6

func (es *DefineStatement) ChangeProgramCount(i int)

func (*DefineStatement) Kind

func (es *DefineStatement) Kind() string

func (*DefineStatement) Location added in v0.0.6

func (es *DefineStatement) Location() helpers.Location

func (*DefineStatement) NoStatic added in v0.0.6

func (es *DefineStatement) NoStatic() bool

func (*DefineStatement) SetParent added in v0.0.8

func (es *DefineStatement) SetParent(p Statement)

func (*DefineStatement) String added in v0.0.6

func (es *DefineStatement) String() string

type ExtendStatement

type ExtendStatement struct {
	Template string
	// contains filtered or unexported fields
}

func (*ExtendStatement) ChangeProgramCount added in v0.0.6

func (es *ExtendStatement) ChangeProgramCount(i int)

func (*ExtendStatement) Kind

func (es *ExtendStatement) Kind() string

func (*ExtendStatement) Location added in v0.0.6

func (es *ExtendStatement) Location() helpers.Location

func (*ExtendStatement) NoStatic added in v0.0.6

func (es *ExtendStatement) NoStatic() bool

func (*ExtendStatement) SetParent added in v0.0.8

func (es *ExtendStatement) SetParent(p Statement)

func (*ExtendStatement) String added in v0.0.6

func (es *ExtendStatement) String() string

type ForStatement

type ForStatement struct {
	Iterable  *expression.VM
	KeyName   string
	ValueName string
	Programs  int

	Parent Statement

	Dependencies []string
	// contains filtered or unexported fields
}

func (*ForStatement) ChangeProgramCount added in v0.0.6

func (es *ForStatement) ChangeProgramCount(i int)

func (*ForStatement) Kind

func (es *ForStatement) Kind() string

func (*ForStatement) Location added in v0.0.6

func (es *ForStatement) Location() helpers.Location

func (*ForStatement) NoStatic added in v0.0.6

func (es *ForStatement) NoStatic() bool

func (*ForStatement) SetParent added in v0.0.8

func (es *ForStatement) SetParent(p Statement)

func (*ForStatement) String added in v0.0.6

func (es *ForStatement) String() string

type IfStatement

type IfStatement struct {
	Program *expression.VM

	Programs int

	Parent Statement

	Dependencies []string
	// contains filtered or unexported fields
}

func (*IfStatement) ChangeProgramCount added in v0.0.6

func (vs *IfStatement) ChangeProgramCount(i int)

func (*IfStatement) Kind

func (vs *IfStatement) Kind() string

func (*IfStatement) Location added in v0.0.6

func (vs *IfStatement) Location() helpers.Location

func (*IfStatement) NoStatic added in v0.0.6

func (vs *IfStatement) NoStatic() bool

func (*IfStatement) SetParent added in v0.0.8

func (vs *IfStatement) SetParent(p Statement)

func (*IfStatement) String added in v0.0.6

func (vs *IfStatement) String() string

type PrintStatement added in v0.0.6

type PrintStatement struct {
	Program *expression.VM

	Parent       Statement
	Dependencies []string
	// contains filtered or unexported fields
}

func (*PrintStatement) ChangeProgramCount added in v0.0.6

func (vs *PrintStatement) ChangeProgramCount(i int)

func (*PrintStatement) Kind added in v0.0.6

func (vs *PrintStatement) Kind() string

func (*PrintStatement) Location added in v0.0.6

func (vs *PrintStatement) Location() helpers.Location

func (*PrintStatement) NoStatic added in v0.0.6

func (vs *PrintStatement) NoStatic() bool

func (*PrintStatement) SetParent added in v0.0.8

func (vs *PrintStatement) SetParent(p Statement)

func (*PrintStatement) String added in v0.0.6

func (vs *PrintStatement) String() string

func (*PrintStatement) Tag added in v0.0.6

func (vs *PrintStatement) Tag() *tokenizer.Mustache

type Program added in v0.0.6

type Program interface {
	Kind() string
	String() string
	Location() helpers.Location
	ChangeProgramCount(int)
	SetParent(Statement)
}

func Parse added in v0.0.6

func Parse(elements []tokenizer.Element) ([]Program, error)

type SlotStatement

type SlotStatement struct {
	Name     string
	Programs int

	Depth  int
	Parent Statement
	// contains filtered or unexported fields
}

func (*SlotStatement) ChangeProgramCount added in v0.0.6

func (ss *SlotStatement) ChangeProgramCount(i int)

func (*SlotStatement) Kind

func (ss *SlotStatement) Kind() string

func (*SlotStatement) Location added in v0.0.6

func (ss *SlotStatement) Location() helpers.Location

func (*SlotStatement) NoStatic added in v0.0.6

func (ss *SlotStatement) NoStatic() bool

func (*SlotStatement) SetParent added in v0.0.8

func (ss *SlotStatement) SetParent(p Statement)

func (*SlotStatement) String added in v0.0.6

func (ss *SlotStatement) String() string

type Statement

type Statement interface {
	Kind() string
	NoStatic() bool
	String() string
	ChangeProgramCount(int)
	Location() helpers.Location
	SetParent(Statement)
}

type TemplateStatement

type TemplateStatement struct {
	Template string

	Programs  int
	BodyStart int
	Depth     int
	Parent    Statement
	// contains filtered or unexported fields
}

func (*TemplateStatement) ChangeProgramCount added in v0.0.6

func (es *TemplateStatement) ChangeProgramCount(i int)

func (*TemplateStatement) Kind

func (es *TemplateStatement) Kind() string

func (*TemplateStatement) Location added in v0.0.6

func (es *TemplateStatement) Location() helpers.Location

func (*TemplateStatement) NoStatic added in v0.0.6

func (es *TemplateStatement) NoStatic() bool

func (*TemplateStatement) SetParent added in v0.0.8

func (es *TemplateStatement) SetParent(p Statement)

func (*TemplateStatement) String added in v0.0.6

func (es *TemplateStatement) String() string

type Text added in v0.0.6

type Text struct {
	Content string
	Parent  Statement
}

func (*Text) ChangeProgramCount added in v0.0.8

func (t *Text) ChangeProgramCount(i int)

func (*Text) Kind added in v0.0.6

func (t *Text) Kind() string

func (*Text) Location added in v0.0.6

func (t *Text) Location() helpers.Location

func (*Text) SetParent added in v0.0.8

func (t *Text) SetParent(p Statement)

func (*Text) String added in v0.0.6

func (t *Text) String() string

func (*Text) Tag added in v0.0.6

func (t *Text) Tag() *tokenizer.Mustache

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL