ast

package
v0.0.0-...-df9e6b6 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStatement

type BlockStatement struct {
	Token      token.Token
	Statements []Statement
}

BlockStatement :

func (*BlockStatement) String

func (bs *BlockStatement) String() string

String :

func (*BlockStatement) TokenLiteral

func (bs *BlockStatement) TokenLiteral() string

TokenLiteral :

type CallExpression

type CallExpression struct {
	Token     token.Token
	Procedure Expression
	Arguments []Expression
}

CallExpression :

func (*CallExpression) String

func (ce *CallExpression) String() string

String :

func (*CallExpression) TokenLiteral

func (ce *CallExpression) TokenLiteral() string

TokenLiteral :

type CommentLiteral

type CommentLiteral struct {
	Token    token.Token
	Comments []string
}

CommentLiteral :

func (*CommentLiteral) String

func (cl *CommentLiteral) String() string

String :

func (*CommentLiteral) TokenLiteral

func (cl *CommentLiteral) TokenLiteral() string

TokenLiteral :

type ConditionalExpression

type ConditionalExpression struct {
	Token       token.Token
	Condition   Expression
	Consequence *BlockStatement
	Alternative *BlockStatement
}

ConditionalExpression :

func (*ConditionalExpression) String

func (ce *ConditionalExpression) String() string

String :

func (*ConditionalExpression) TokenLiteral

func (ce *ConditionalExpression) TokenLiteral() string

TokenLiteral :

type ConstStatement

type ConstStatement struct {
	Token token.Token
	Type  token.Token
	Name  *Identifier
	Value Expression
}

ConstStatement :

func (*ConstStatement) String

func (cs *ConstStatement) String() string

String :

func (*ConstStatement) TokenLiteral

func (cs *ConstStatement) TokenLiteral() string

TokenLiteral :

type Expression

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

Expression :

type ExpressionStatement

type ExpressionStatement struct {
	// The first token of the expression
	Token      token.Token
	Expression Expression
}

ExpressionStatement :

func (*ExpressionStatement) String

func (es *ExpressionStatement) String() string

String :

func (*ExpressionStatement) TokenLiteral

func (es *ExpressionStatement) TokenLiteral() string

TokenLiteral :

type ForLiteral

type ForLiteral struct {
	Token    token.Token
	Variable string
	Desired  string
}

ForLiteral :

func (*ForLiteral) String

func (fl *ForLiteral) String() string

String :

func (*ForLiteral) TokenLiteral

func (fl *ForLiteral) TokenLiteral() string

TokenLiteral :

type Identifier

type Identifier struct {
	Token token.Token
	Type  token.Token
	Value string
}

Identifier :

func (*Identifier) String

func (i *Identifier) String() string

String :

func (*Identifier) TokenLiteral

func (i *Identifier) TokenLiteral() string

TokenLiteral :

type InfixExpression

type InfixExpression struct {
	Token    token.Token
	Left     Expression
	Operator string
	Right    Expression
}

InfixExpression :

func (*InfixExpression) String

func (ie *InfixExpression) String() string

String :

func (*InfixExpression) TokenLiteral

func (ie *InfixExpression) TokenLiteral() string

TokenLiteral :

type IntegerLiteral

type IntegerLiteral struct {
	Token token.Token
	Value int64
}

IntegerLiteral :

func (*IntegerLiteral) String

func (il *IntegerLiteral) String() string

String :

func (*IntegerLiteral) TokenLiteral

func (il *IntegerLiteral) TokenLiteral() string

TokenLiteral :

type Node

type Node interface {
	TokenLiteral() string
	String() string
}

Node :

type PrefixExpression

type PrefixExpression struct {
	Token    token.Token
	Operator string
	Right    Expression
}

PrefixExpression :

func (*PrefixExpression) String

func (pe *PrefixExpression) String() string

String :

func (*PrefixExpression) TokenLiteral

func (pe *PrefixExpression) TokenLiteral() string

TokenLiteral :

type ProcedureLiteral

type ProcedureLiteral struct {
	Token      token.Token
	Name       string
	Parameters []*Identifier
	Body       *BlockStatement
}

ProcedureLiteral :

func (*ProcedureLiteral) String

func (pl *ProcedureLiteral) String() string

String :

func (*ProcedureLiteral) TokenLiteral

func (pl *ProcedureLiteral) TokenLiteral() string

TokenLiteral :

type Program

type Program struct {
	Statements []Statement
}

Program :

func (*Program) String

func (p *Program) String() string

String :

func (*Program) TokenLiteral

func (p *Program) TokenLiteral() string

TokenLiteral :

type ProgramLiteral

type ProgramLiteral struct {
	Token token.Token
	Name  string
}

ProgramLiteral :

func (*ProgramLiteral) String

func (pl *ProgramLiteral) String() string

String :

func (*ProgramLiteral) TokenLiteral

func (pl *ProgramLiteral) TokenLiteral() string

TokenLiteral :

type RealLiteral

type RealLiteral struct {
	Token token.Token
	Value float64
}

RealLiteral :

func (*RealLiteral) String

func (rl *RealLiteral) String() string

String :

func (*RealLiteral) TokenLiteral

func (rl *RealLiteral) TokenLiteral() string

TokenLiteral :

type Statement

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

Statement :

type VarStatement

type VarStatement struct {
	Token token.Token
	Type  token.Token
	Name  *Identifier
	Value Expression
}

VarStatement :

func (*VarStatement) String

func (vs *VarStatement) String() string

String :

func (*VarStatement) TokenLiteral

func (vs *VarStatement) TokenLiteral() string

TokenLiteral :

type WhileLiteral

type WhileLiteral struct {
	Token     token.Token
	Condition Expression
}

WhileLiteral :

func (*WhileLiteral) String

func (wl *WhileLiteral) String() string

String :

func (*WhileLiteral) TokenLiteral

func (wl *WhileLiteral) TokenLiteral() string

TokenLiteral :

Jump to

Keyboard shortcuts

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