Documentation
¶
Index ¶
- func Walk(node Node, f WalkFn)
- type ArrayAccess
- type BlockStatement
- type Boolean
- type BracketExpression
- type CallExpression
- type CommandSubstitution
- type DollarParenExpression
- type DoubleBracketExpression
- type Expression
- type ExpressionStatement
- type ForLoopStatement
- type FunctionLiteral
- type Identifier
- type IfStatement
- type InfixExpression
- type IntegerLiteral
- type InvalidArrayAccess
- type LetStatement
- type Node
- type PostfixExpression
- type PrefixExpression
- type Program
- type ReturnStatement
- type Shebang
- type SimpleCommand
- type Statement
- type StringLiteral
- type WalkFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArrayAccess ¶
type ArrayAccess struct {
Token token.Token // The '${' token
Left Expression
Index Expression
}
func (*ArrayAccess) String ¶
func (aa *ArrayAccess) String() string
func (*ArrayAccess) TokenLiteral ¶
func (aa *ArrayAccess) TokenLiteral() string
type BlockStatement ¶
type BlockStatement struct {
Token token.Token // the { token or then token
Statements []Statement
}
func (*BlockStatement) String ¶
func (bs *BlockStatement) String() string
func (*BlockStatement) TokenLiteral ¶
func (bs *BlockStatement) TokenLiteral() string
type Boolean ¶
func (*Boolean) TokenLiteral ¶
type BracketExpression ¶
type BracketExpression struct {
Token token.Token // The '[' token
Expressions []Expression
}
func (*BracketExpression) String ¶
func (be *BracketExpression) String() string
func (*BracketExpression) TokenLiteral ¶
func (be *BracketExpression) TokenLiteral() string
type CallExpression ¶
type CallExpression struct {
Token token.Token // The '(' token
Function Expression // Identifier or FunctionLiteral
Arguments []Expression
}
func (*CallExpression) String ¶
func (ce *CallExpression) String() string
func (*CallExpression) TokenLiteral ¶
func (ce *CallExpression) TokenLiteral() string
type CommandSubstitution ¶
type CommandSubstitution struct {
Token token.Token // The ` or $() token
Command Expression
}
func (*CommandSubstitution) String ¶
func (cs *CommandSubstitution) String() string
func (*CommandSubstitution) TokenLiteral ¶
func (cs *CommandSubstitution) TokenLiteral() string
type DollarParenExpression ¶
type DollarParenExpression struct {
Token token.Token // The '$(' token
Command Expression
}
func (*DollarParenExpression) String ¶
func (dpe *DollarParenExpression) String() string
func (*DollarParenExpression) TokenLiteral ¶
func (dpe *DollarParenExpression) TokenLiteral() string
type DoubleBracketExpression ¶
type DoubleBracketExpression struct {
Token token.Token // The '[[' token
Expressions []Expression
}
func (*DoubleBracketExpression) String ¶
func (dbe *DoubleBracketExpression) String() string
func (*DoubleBracketExpression) TokenLiteral ¶
func (dbe *DoubleBracketExpression) TokenLiteral() string
type Expression ¶
type Expression interface {
Node
// contains filtered or unexported methods
}
type ExpressionStatement ¶
type ExpressionStatement struct {
Token token.Token // the first token of the expression
Expression Expression
}
func (*ExpressionStatement) String ¶
func (es *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (es *ExpressionStatement) TokenLiteral() string
type ForLoopStatement ¶
type ForLoopStatement struct {
Token token.Token // The 'for' token
Init Expression
Condition Expression
Post Expression
Body *BlockStatement
}
func (*ForLoopStatement) String ¶
func (fls *ForLoopStatement) String() string
func (*ForLoopStatement) TokenLiteral ¶
func (fls *ForLoopStatement) TokenLiteral() string
type FunctionLiteral ¶
type FunctionLiteral struct {
Token token.Token // The 'fn' token
Parameters []*Identifier
Body *BlockStatement
}
func (*FunctionLiteral) String ¶
func (fl *FunctionLiteral) String() string
func (*FunctionLiteral) TokenLiteral ¶
func (fl *FunctionLiteral) TokenLiteral() string
type Identifier ¶
func (*Identifier) String ¶
func (i *Identifier) String() string
func (*Identifier) TokenLiteral ¶
func (i *Identifier) TokenLiteral() string
type IfStatement ¶
type IfStatement struct {
Token token.Token // The 'if' token
Condition Expression
Consequence *BlockStatement
Alternative *BlockStatement
}
func (*IfStatement) String ¶
func (is *IfStatement) String() string
func (*IfStatement) TokenLiteral ¶
func (is *IfStatement) TokenLiteral() string
type InfixExpression ¶
type InfixExpression struct {
Token token.Token // The operator token, e.g. +
Left Expression
Operator string
Right Expression
}
func (*InfixExpression) String ¶
func (ie *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (ie *InfixExpression) TokenLiteral() string
type IntegerLiteral ¶
func (*IntegerLiteral) String ¶
func (il *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶
func (il *IntegerLiteral) TokenLiteral() string
type InvalidArrayAccess ¶
type InvalidArrayAccess struct {
Token token.Token // The '$' token
Left Expression
Index Expression
}
func (*InvalidArrayAccess) String ¶
func (iaa *InvalidArrayAccess) String() string
func (*InvalidArrayAccess) TokenLiteral ¶
func (iaa *InvalidArrayAccess) TokenLiteral() string
type LetStatement ¶
type LetStatement struct {
Token token.Token // the token.LET token
Name *Identifier
Value Expression
}
func (*LetStatement) String ¶
func (ls *LetStatement) String() string
func (*LetStatement) TokenLiteral ¶
func (ls *LetStatement) TokenLiteral() string
type PostfixExpression ¶
type PostfixExpression struct {
Token token.Token // The operator token, e.g. ++
Left Expression
Operator string
}
func (*PostfixExpression) String ¶
func (pe *PostfixExpression) String() string
func (*PostfixExpression) TokenLiteral ¶
func (pe *PostfixExpression) TokenLiteral() string
type PrefixExpression ¶
type PrefixExpression struct {
Token token.Token // The operator token, e.g. !
Operator string
Right Expression
}
func (*PrefixExpression) String ¶
func (pe *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (pe *PrefixExpression) TokenLiteral() string
type ReturnStatement ¶
type ReturnStatement struct {
Token token.Token // the token.RETURN token
ReturnValue Expression
}
func (*ReturnStatement) String ¶
func (rs *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (rs *ReturnStatement) TokenLiteral() string
type Shebang ¶
func (*Shebang) TokenLiteral ¶
type SimpleCommand ¶
type SimpleCommand struct {
Token token.Token // The first token of the command
Name Expression
Arguments []Expression
}
func (*SimpleCommand) String ¶
func (sc *SimpleCommand) String() string
func (*SimpleCommand) TokenLiteral ¶
func (sc *SimpleCommand) TokenLiteral() string
type StringLiteral ¶
func (*StringLiteral) String ¶
func (sl *StringLiteral) String() string
func (*StringLiteral) TokenLiteral ¶
func (sl *StringLiteral) TokenLiteral() string
Click to show internal directories.
Click to hide internal directories.