irgen

package
v0.0.0-...-402e600 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2017 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Irgen

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

func NewIrgen

func NewIrgen(tree *ast.Ast) *Irgen

func (*Irgen) Generate

func (g *Irgen) Generate() string

type Scope

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

func NewScope

func NewScope() *Scope

func (*Scope) AddFunction

func (s *Scope) AddFunction(key string, function *goory.Function)

AddFunction adds a value to the current scope

func (*Scope) AddVar

func (s *Scope) AddVar(key string, value *instructions.Alloca)

AddVar adds a value to the current scope

func (*Scope) GetFunction

func (s *Scope) GetFunction(key string) (*goory.Function, bool)

GetFunction returns the item and true if the key is in local (or parent scope), otherwise false

func (*Scope) GetLocalFunction

func (s *Scope) GetLocalFunction(key string) (*goory.Function, bool)

GetLocalFunction returns the item and true if the key is in local scope, otherwise false

func (*Scope) GetLocalVar

func (s *Scope) GetLocalVar(key string) (*instructions.Alloca, bool)

GetLocalVar returns the item and true if the key is in local scope, otherwise false

func (*Scope) GetVar

func (s *Scope) GetVar(key string) (*instructions.Alloca, bool)

GetVar returns the item and true if the key is in local (or parent scope), otherwise false

func (*Scope) Push

func (s *Scope) Push() *Scope

Jump to

Keyboard shortcuts

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