ast

package
v0.0.0-...-635c4a0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VOID = iota
	LIST
	INT
	BOOL
	STRING
	IDENTIFIER
	CALL
)

Variables

This section is empty.

Functions

func Equal

func Equal(a, b Element) bool

Types

type Bool

type Bool bool

func False

func False() Bool

func True

func True() Bool

func (Bool) Type

func (Bool) Type() Type

type Call

type Call struct {
	Name       Identifier
	Parameters List
}

func (Call) String

func (c Call) String() string

func (Call) Type

func (c Call) Type() Type

type Element

type Element interface {
	Type() Type
}

All AST elements implement the Element interface

type Identifier

type Identifier string

func (Identifier) Type

func (i Identifier) Type() Type

type Int

type Int int

func (Int) Type

func (i Int) Type() Type

type List

type List []Element

func (*List) AddElement

func (l *List) AddElement(e Element)

func (List) String

func (l List) String() string

func (List) StringIndent

func (l List) StringIndent(depth int) string

func (List) Type

func (l List) Type() Type

type String

type String string

func (String) String

func (s String) String() string

func (String) Type

func (s String) Type() Type

type Type

type Type int

type Void

type Void int

func NewVoid

func NewVoid() Void

func (Void) Type

func (v Void) Type() Type

Jump to

Keyboard shortcuts

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