ast

package
v0.0.0-...-ba3f13d Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Atom

type Atom interface {
	SExpression
	TokenLiteral() string
}

type ConsCell

type ConsCell struct {
	CarField SExpression
	CdrField SExpression
}

func (*ConsCell) Car

func (cc *ConsCell) Car() SExpression

func (*ConsCell) Cdr

func (cc *ConsCell) Cdr() SExpression

func (*ConsCell) String

func (cc *ConsCell) String() string

type IntegerLiteral

type IntegerLiteral struct {
	Token token.Token
	Value int64
}

func (*IntegerLiteral) String

func (il *IntegerLiteral) String() string

func (*IntegerLiteral) TokenLiteral

func (il *IntegerLiteral) TokenLiteral() string

type List

type List interface {
	SExpression
	Car() SExpression
	Cdr() SExpression
}

type ModifierFun

type ModifierFun func(SExpression) SExpression

type Nil

type Nil struct {
	Token token.Token
}

func (*Nil) Car

func (n *Nil) Car() SExpression

func (*Nil) Cdr

func (n *Nil) Cdr() SExpression

func (*Nil) String

func (n *Nil) String() string

func (*Nil) TokenLiteral

func (n *Nil) TokenLiteral() string

type PrefixAtom

type PrefixAtom struct {
	Token    token.Token
	Operator string
	Right    SExpression
}

func (*PrefixAtom) String

func (pa *PrefixAtom) String() string

func (*PrefixAtom) TokenLiteral

func (pa *PrefixAtom) TokenLiteral() string

type Program

type Program struct {
	Expressions []SExpression
}

func (*Program) String

func (p *Program) String() string

type SExpression

type SExpression interface {
	String() string
}

func ModifyByMacro

func ModifyByMacro(sexp SExpression, modifier ModifierFun, macroNames []string) SExpression

func ModifyByUnquote

func ModifyByUnquote(sexp SExpression, modifier ModifierFun) SExpression

type SpecialForm

type SpecialForm struct {
	Token token.Token
	Value string
}

func (*SpecialForm) String

func (s *SpecialForm) String() string

func (*SpecialForm) TokenLiteral

func (s *SpecialForm) TokenLiteral() string

type Symbol

type Symbol struct {
	Token token.Token
	Value string
}

func (*Symbol) String

func (s *Symbol) String() string

func (*Symbol) TokenLiteral

func (s *Symbol) TokenLiteral() string

type True

type True struct {
	Token token.Token
}

func (*True) String

func (t *True) String() string

func (*True) TokenLiteral

func (t *True) TokenLiteral() string

Jump to

Keyboard shortcuts

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