compiler

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compiler

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

func New

func New(l *lexer.Lexer) *Compiler

func (*Compiler) Compile

func (c *Compiler) Compile()

Compile process the stream of tokens from the lexer and builds up the bytecode program.

func (*Compiler) Dump

func (c *Compiler) Dump()

Dump process the stream of tokens from the lexer and shows the structure of the program.

func (*Compiler) Output

func (c *Compiler) Output() []byte

Output returns the bytecodes of the compiled program.

func (*Compiler) Write

func (c *Compiler) Write(output string)

Write outputs our generated bytecode to the named file.

Jump to

Keyboard shortcuts

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