writer

package
v0.0.0-...-e5299a4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssemblyWriter

type AssemblyWriter interface {
	WriteArithmetic(command string, comparisonsCount *int)
	WritePushPop(command parser.CommandType, segment string, index int)
	CloseAssemblyFile()
}

func NewHackAssemblyWriter

func NewHackAssemblyWriter(filename string) AssemblyWriter

type HackAssemblyWriter

type HackAssemblyWriter struct {
	Filename     string
	AssemblyFile os.File
}

func (*HackAssemblyWriter) CloseAssemblyFile

func (w *HackAssemblyWriter) CloseAssemblyFile()

func (*HackAssemblyWriter) WriteArithmetic

func (w *HackAssemblyWriter) WriteArithmetic(command string, comparisonsCount *int)

func (*HackAssemblyWriter) WritePushPop

func (w *HackAssemblyWriter) WritePushPop(command parser.CommandType, segment string, index int)

Jump to

Keyboard shortcuts

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