package ast
import "github.com/gobuffalo/plush/v5/ast"
Index ¶
- type ArrayLiteral
- type AssignExpression
- type BlockStatement
- type Boolean
- type BreakExpression
- type CallExpression
- type Comparable
- type ContinueExpression
- type ElseIfExpression
- type Expression
- type ExpressionStatement
- type FloatLiteral
- type ForExpression
- type FunctionLiteral
- type HTMLLiteral
- type HashLiteral
- type Identifier
- type IfExpression
- type IndexExpression
- type InfixExpression
- type IntegerLiteral
- type LetStatement
- type Node
- type PrefixExpression
- type Printable
- type Program
- func (p *Program) InnerText() string
- func (p *Program) String() string
- func (p *Program) TokenLiteral() string
- type ReturnStatement
- type Statement
- type StringLiteral
- type TokenAble
Types ¶
type ArrayLiteral ¶
type ArrayLiteral struct { TokenAble Elements []Expression }
func (*ArrayLiteral) String ¶
func (al *ArrayLiteral) String() string
type AssignExpression ¶
type AssignExpression struct { TokenAble Name *Identifier Value Expression }
func (*AssignExpression) String ¶
func (ae *AssignExpression) String() string
type BlockStatement ¶
BlockStatement is a list of statements grouped in a context surrounded by braces.
func (*BlockStatement) InnerText ¶
func (bs *BlockStatement) InnerText() string
InnerText gets the raw string representation of the block's contents.
func (*BlockStatement) String ¶
func (bs *BlockStatement) String() string
type Boolean ¶
func (*Boolean) String ¶
type BreakExpression ¶
type BreakExpression struct { TokenAble }
func (*BreakExpression) String ¶
func (ce *BreakExpression) String() string
type CallExpression ¶
type CallExpression struct { TokenAble Callee Expression ChainCallee Expression Function Expression Arguments []Expression Block *BlockStatement ElseBlock *BlockStatement }
func (*CallExpression) String ¶
func (ce *CallExpression) String() string
type Comparable ¶
type Comparable interface {
// contains filtered or unexported methods
}
type ContinueExpression ¶
type ContinueExpression struct { TokenAble }
func (*ContinueExpression) String ¶
func (ce *ContinueExpression) String() string
type ElseIfExpression ¶
type ElseIfExpression struct { TokenAble Condition Expression Block *BlockStatement }
type Expression ¶
type Expression interface { Node // contains filtered or unexported methods }
All expression nodes implement this
type ExpressionStatement ¶
type ExpressionStatement struct { TokenAble Expression Expression }
func (*ExpressionStatement) String ¶
func (es *ExpressionStatement) String() string
type FloatLiteral ¶
func (*FloatLiteral) String ¶
func (il *FloatLiteral) String() string
type ForExpression ¶
type ForExpression struct { TokenAble KeyName string ValueName string Block *BlockStatement Iterable Expression }
func (*ForExpression) String ¶
func (fe *ForExpression) String() string
type FunctionLiteral ¶
type FunctionLiteral struct { TokenAble Parameters []*Identifier Block *BlockStatement }
func (*FunctionLiteral) String ¶
func (fl *FunctionLiteral) String() string
type HTMLLiteral ¶
func (*HTMLLiteral) Printable ¶
func (hl *HTMLLiteral) Printable() bool
func (*HTMLLiteral) String ¶
func (hl *HTMLLiteral) String() string
type HashLiteral ¶
type HashLiteral struct { TokenAble Order []Expression Pairs map[Expression]Expression }
func (*HashLiteral) String ¶
func (hl *HashLiteral) String() string
type Identifier ¶
type Identifier struct { TokenAble Callee *Identifier Value string OriginalCallee *Identifier // So robot.Avatar.Name the OriginalCallee will be robot }
func (*Identifier) String ¶
func (i *Identifier) String() string
type IfExpression ¶
type IfExpression struct { TokenAble Condition Expression Block *BlockStatement ElseIf []*ElseIfExpression ElseBlock *BlockStatement }
func (*IfExpression) String ¶
func (ie *IfExpression) String() string
type IndexExpression ¶
type IndexExpression struct { TokenAble Left Expression Index Expression Value Expression Callee Expression }
func (*IndexExpression) String ¶
func (ie *IndexExpression) String() string
type InfixExpression ¶
type InfixExpression struct { TokenAble Left Expression Operator string Right Expression }
func (*InfixExpression) String ¶
func (oe *InfixExpression) String() string
type IntegerLiteral ¶
func (*IntegerLiteral) String ¶
func (il *IntegerLiteral) String() string
type LetStatement ¶
type LetStatement struct { TokenAble Name *Identifier Value Expression }
func (*LetStatement) String ¶
func (ls *LetStatement) String() string
type Node ¶
The base Node interface
type PrefixExpression ¶
type PrefixExpression struct { TokenAble Operator string Right Expression }
func (*PrefixExpression) String ¶
func (pe *PrefixExpression) String() string
type Printable ¶
type Printable interface { Printable() bool }
type Program ¶
type Program struct { Statements []Statement }
func (*Program) InnerText ¶
InnerText gets the raw string representation of the program's contents.
func (*Program) String ¶
func (*Program) TokenLiteral ¶
type ReturnStatement ¶
type ReturnStatement struct { Type string TokenAble ReturnValue Expression }
func (*ReturnStatement) Printable ¶
func (rs *ReturnStatement) Printable() bool
func (*ReturnStatement) String ¶
func (rs *ReturnStatement) String() string
type Statement ¶
type Statement interface { Node // contains filtered or unexported methods }
All statement nodes implement this
type StringLiteral ¶
func (*StringLiteral) String ¶
func (sl *StringLiteral) String() string
type TokenAble ¶
func (TokenAble) T ¶
func (TokenAble) TokenLiteral ¶
Source Files ¶
array_literal.go assign_expression.go ast.go block_statement.go boolean.go break_expression.go call_expression.go continue_expression.go expression_statement.go float_literal.go for_expression.go function_literal.go hash_literal.go html_literal.go identifier.go if_expression.go index_expression.go infix_expression.go integer_literal.go let_statement.go prefix_expression.go program.go return_statement.go string_literal.go
- Version
- v5.0.5 (latest)
- Published
- May 23, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 weeks ago –
Tools for package owners.