ast

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: LGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AST

type AST struct {
	*BaseNode
	Visitors []*Visitor
	Imports  []*Import
}

type BaseNode

type BaseNode struct {
	Location common.Location
}

func (*BaseNode) Start

func (bn *BaseNode) Start() common.Location

type BinaryOperation

type BinaryOperation struct {
	*BaseNode
	Left     Expression
	Right    Expression
	Operator string
}

func (*BinaryOperation) String

func (bo *BinaryOperation) String() string

type BoolLiteral

type BoolLiteral struct {
	*BaseNode
	Value bool
}

func (*BoolLiteral) String

func (bl *BoolLiteral) String() string

type CallSelector

type CallSelector struct {
	*BaseNode
}

func (*CallSelector) String

func (cs *CallSelector) String() string

type EchoNode

type EchoNode struct {
	*BaseNode
	Silent
	Expression Expression
}

type Expression

type Expression interface {
	Node
	String() string
}

type FieldSelector

type FieldSelector struct {
	*BaseNode
	Name string
}

func (*FieldSelector) String

func (fs *FieldSelector) String() string

type Filter

type Filter struct {
	*BaseNode
	Name       string
	Expression Expression
}

func (*Filter) String

func (f *Filter) String() string

type FloatLiteral

type FloatLiteral struct {
	*BaseNode
	Value float64
}

func (*FloatLiteral) String

func (fl *FloatLiteral) String() string

type ForNode

type ForNode struct {
	*BaseNode
	Key        string
	Value      string
	Expression Expression
	Nodes      []Node
	First      bool
	Last       bool
	Even       bool

	SilentFor Silent
	SilentEnd Silent
}

type IfNode

type IfNode struct {
	*BaseNode
	Expression Expression
	IfNodes    []Node
	ElseNodes  []Node

	SilentIf   Silent
	SilentElse Silent
	SilentEnd  Silent
}

type Import

type Import struct {
	Name       string
	AST        *AST
	Parameters []*Parameter
}

type IndentNode

type IndentNode struct {
	*BaseNode
	Expression Expression
	Nodes      []Node

	SilentIndent Silent
	SilentEnd    Silent
}

type IndexSelector

type IndexSelector struct {
	*BaseNode
	Expression Expression
}

func (*IndexSelector) String

func (i *IndexSelector) String() string

type IntLiteral

type IntLiteral struct {
	*BaseNode
	Value int64
}

func (*IntLiteral) String

func (il *IntLiteral) String() string

type NoExpression

type NoExpression struct {
	*BaseNode
}

func (*NoExpression) String

func (n *NoExpression) String() string

type Node

type Node interface {
	Start() common.Location
}

type NotOperation

type NotOperation struct {
	*BaseNode
	Expression Expression
}

func (*NotOperation) String

func (no *NotOperation) String() string

type Parameter

type Parameter struct {
	*BaseNode
	Name  string
	Value Expression
}

type Selector

type Selector interface {
	Expression
}

type SelectorChain

type SelectorChain struct {
	*BaseNode
	Selectors []Selector
}

func (*SelectorChain) String

func (cs *SelectorChain) String() string

type Silent

type Silent struct {
	Before bool
	After  bool
}

Silent will tell if whitespace before and after a node should be removed

type SliceSelector

type SliceSelector struct {
	*BaseNode
	From Expression
	To   Expression
}

func (*SliceSelector) String

func (s *SliceSelector) String() string

type StringLiteral

type StringLiteral struct {
	*BaseNode
	Value string
}

func (*StringLiteral) String

func (sl *StringLiteral) String() string

type Template

type Template struct {
	Name              string
	Nodes             []Node
	DefaultParameters []*Parameter
}

type TextNode

type TextNode struct {
	*BaseNode
	Text string
}

type VarExists

type VarExists struct {
	*BaseNode
	Name string
}

func (*VarExists) String

func (ve *VarExists) String() string

type VariableSelector

type VariableSelector struct {
	*BaseNode
	Name string
}

func (*VariableSelector) String

func (vs *VariableSelector) String() string

type VisitNode

type VisitNode struct {
	*BaseNode
	Visitor string
	Package string
	Silent
	Expression Expression
	Parameters []*Parameter
}

type Visitor

type Visitor struct {
	Name      string
	Templates []*Template
}

Jump to

Keyboard shortcuts

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