plush: github.com/gobuffalo/plush/ast Index | Files

package ast

import "github.com/gobuffalo/plush/ast"

Index

Package Files

array_literal.go assign_expression.go ast.go block_statement.go boolean.go call_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

type ArrayLiteral Uses

type ArrayLiteral struct {
    TokenAble
    Elements []Expression
}

func (*ArrayLiteral) String Uses

func (al *ArrayLiteral) String() string

type AssignExpression Uses

type AssignExpression struct {
    TokenAble
    Name  *Identifier
    Value Expression
}

func (*AssignExpression) String Uses

func (ae *AssignExpression) String() string

type BlockStatement Uses

type BlockStatement struct {
    TokenAble
    Statements []Statement
}

BlockStatement is a list of statements grouped in a context surrounded by braces.

func (*BlockStatement) InnerText Uses

func (bs *BlockStatement) InnerText() string

InnerText gets the raw string representation of the block's contents.

func (*BlockStatement) String Uses

func (bs *BlockStatement) String() string

type Boolean Uses

type Boolean struct {
    TokenAble
    Value bool
}

func (*Boolean) String Uses

func (b *Boolean) String() string

type CallExpression Uses

type CallExpression struct {
    TokenAble
    Callee    Expression
    Function  Expression
    Arguments []Expression
    Block     *BlockStatement
    ElseBlock *BlockStatement
}

func (*CallExpression) String Uses

func (ce *CallExpression) String() string

type ElseIfExpression Uses

type ElseIfExpression struct {
    TokenAble
    Condition Expression
    Block     *BlockStatement
}

type Expression Uses

type Expression interface {
    Node
    // contains filtered or unexported methods
}

All expression nodes implement this

type ExpressionStatement Uses

type ExpressionStatement struct {
    TokenAble
    Expression Expression
}

func (*ExpressionStatement) String Uses

func (es *ExpressionStatement) String() string

type FloatLiteral Uses

type FloatLiteral struct {
    TokenAble
    Value float64
}

func (*FloatLiteral) String Uses

func (il *FloatLiteral) String() string

type ForExpression Uses

type ForExpression struct {
    TokenAble
    KeyName   string
    ValueName string
    Block     *BlockStatement
    Iterable  Expression
}

func (*ForExpression) String Uses

func (fe *ForExpression) String() string

type FunctionLiteral Uses

type FunctionLiteral struct {
    TokenAble
    Parameters []*Identifier
    Block      *BlockStatement
}

func (*FunctionLiteral) String Uses

func (fl *FunctionLiteral) String() string

type HTMLLiteral Uses

type HTMLLiteral struct {
    TokenAble
    Value string
}

func (*HTMLLiteral) Printable Uses

func (hl *HTMLLiteral) Printable() bool

func (*HTMLLiteral) String Uses

func (hl *HTMLLiteral) String() string

type HashLiteral Uses

type HashLiteral struct {
    TokenAble
    Order []Expression
    Pairs map[Expression]Expression
}

func (*HashLiteral) String Uses

func (hl *HashLiteral) String() string

type Identifier Uses

type Identifier struct {
    TokenAble
    Callee *Identifier
    Value  string
}

func (*Identifier) String Uses

func (i *Identifier) String() string

type IfExpression Uses

type IfExpression struct {
    TokenAble
    Condition Expression
    Block     *BlockStatement
    ElseIf    []*ElseIfExpression
    ElseBlock *BlockStatement
}

func (*IfExpression) String Uses

func (ie *IfExpression) String() string

type IndexExpression Uses

type IndexExpression struct {
    TokenAble
    Left  Expression
    Index Expression
}

func (*IndexExpression) String Uses

func (ie *IndexExpression) String() string

type InfixExpression Uses

type InfixExpression struct {
    TokenAble
    Left     Expression
    Operator string
    Right    Expression
}

func (*InfixExpression) String Uses

func (oe *InfixExpression) String() string

type IntegerLiteral Uses

type IntegerLiteral struct {
    TokenAble
    Value int
}

func (*IntegerLiteral) String Uses

func (il *IntegerLiteral) String() string

type LetStatement Uses

type LetStatement struct {
    TokenAble
    Name  *Identifier
    Value Expression
}

func (*LetStatement) String Uses

func (ls *LetStatement) String() string

type Node Uses

type Node interface {
    T() token.Token
    TokenLiteral() string
    String() string
}

The base Node interface

type PrefixExpression Uses

type PrefixExpression struct {
    TokenAble
    Operator string
    Right    Expression
}

func (*PrefixExpression) String Uses

func (pe *PrefixExpression) String() string

type Printable Uses

type Printable interface {
    Printable() bool
}

type Program Uses

type Program struct {
    Statements []Statement
}

func (*Program) InnerText Uses

func (p *Program) InnerText() string

InnerText gets the raw string representation of the program's contents.

func (*Program) String Uses

func (p *Program) String() string

func (*Program) TokenLiteral Uses

func (p *Program) TokenLiteral() string

type ReturnStatement Uses

type ReturnStatement struct {
    Type string
    TokenAble
    ReturnValue Expression
}

func (*ReturnStatement) Printable Uses

func (rs *ReturnStatement) Printable() bool

func (*ReturnStatement) String Uses

func (rs *ReturnStatement) String() string

type Statement Uses

type Statement interface {
    Node
    // contains filtered or unexported methods
}

All statement nodes implement this

type StringLiteral Uses

type StringLiteral struct {
    TokenAble
    Value string
}

func (*StringLiteral) String Uses

func (sl *StringLiteral) String() string

type TokenAble Uses

type TokenAble struct {
    token.Token
}

func (TokenAble) T Uses

func (t TokenAble) T() token.Token

func (TokenAble) TokenLiteral Uses

func (t TokenAble) TokenLiteral() string

Package ast imports 4 packages (graph) and is imported by 6 packages. Updated 2019-07-19. Refresh now. Tools for package owners.