internal

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Elem

type Elem struct {
	Val  ast.Expr
	Type types.Type
	CVal constant.Value
	Src  ast.Node
}

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

A Stack represents a FILO container.

func NewStack

func NewStack() (p *Stack)

NewStack creates a Stack instance.

func (*Stack) Get

func (p *Stack) Get(idx int) *Elem

Get returns the value at specified index.

func (*Stack) GetArgs

func (p *Stack) GetArgs(arity int) []*Elem

GetArgs returns all arguments of a function.

func (*Stack) Init

func (p *Stack) Init()

Init initializes this Stack object.

func (*Stack) Len

func (p *Stack) Len() int

Len returns count of stack elements.

func (*Stack) Pop

func (p *Stack) Pop() *Elem

Pop pops a value from this stack.

func (*Stack) PopN

func (p *Stack) PopN(n int)

PopN pops n elements.

func (*Stack) Push

func (p *Stack) Push(v *Elem)

Push pushes a value into this stack.

func (*Stack) Ret

func (p *Stack) Ret(arity int, results ...*Elem)

Ret pops n values from this stack, and then pushes results.

func (*Stack) Set

func (p *Stack) Set(idx int, v *Elem)

Set returns the value at specified index.

func (*Stack) SetLen

func (p *Stack) SetLen(base int)

SetLen sets count of stack elements.

Directories

Path Synopsis
foo
app
go
format
Package format implements standard formatting of Go source.
Package format implements standard formatting of Go source.
printer
Package printer implements printing of AST nodes.
Package printer implements printing of AST nodes.

Jump to

Keyboard shortcuts

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