ast

package
v0.0.0-...-b7900ae Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstStatement

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

func (*ConstStatement) TokenLiteral

func (cs *ConstStatement) TokenLiteral() string

type Expression

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

type Identifier

type Identifier struct {
	Token token.Token // the token.IDENT token
	Value string
}

func (*Identifier) TokenLiteral

func (i *Identifier) TokenLiteral() string

type LetStatement

type LetStatement struct {
	Token token.Token // the token.LET token
	Type  *Identifier
	Name  *Identifier
	Value Expression
}

func (*LetStatement) TokenLiteral

func (ls *LetStatement) TokenLiteral() string

type Node

type Node interface {
	TokenLiteral() string
}

type Program

type Program struct {
	Statements []Statement
}

func (*Program) TokenLiteral

func (p *Program) TokenLiteral() string

type ReturnStatement

type ReturnStatement struct {
	Token       token.Token // the 'return' token
	ReturnValue Expression
}

func (*ReturnStatement) TokenLiteral

func (rs *ReturnStatement) TokenLiteral() string

type Statement

type Statement interface {
	Node
}

Jump to

Keyboard shortcuts

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