compeng

package
v0.0.0-...-e089fa4 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeywordConstants = map[string]bool{
	"true":  true,
	"false": true,
	"null":  true,
	"this":  true,
}
View Source
var Operands = map[uint8]bool{
	'+': true,
	'-': true,
	'*': true,
	'/': true,
	'&': true,
	'|': true,
	'<': true,
	'>': true,
	'=': true,
}
View Source
var UnaryOps = map[uint8]bool{
	'-': true,
	'~': true,
}

Functions

This section is empty.

Types

type CompilationEngine

type CompilationEngine interface {
	CompileClass() string
	CompileClassVarDec()
	CompileSubroutineDec()
	CompileParameterList()
	CompileSubroutineBody()
	CompileVarDec()
	CompileStatements()

	CompileLet()
	CompileIf()
	CompileWhile()
	CompileDo()
	CompileReturn()

	CompileExpression()
	CompileTerm()
}

type JackCompilationEngine

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

func NewJackCompilationEngine

func NewJackCompilationEngine(tokenizer *tokenizer.Tokenizer) *JackCompilationEngine

func (*JackCompilationEngine) CompileClass

func (jCE *JackCompilationEngine) CompileClass() string

func (*JackCompilationEngine) CompileClassVarDec

func (jCE *JackCompilationEngine) CompileClassVarDec()

func (*JackCompilationEngine) CompileDo

func (jCE *JackCompilationEngine) CompileDo()

func (*JackCompilationEngine) CompileExpression

func (jCE *JackCompilationEngine) CompileExpression()

func (*JackCompilationEngine) CompileIf

func (jCE *JackCompilationEngine) CompileIf()

func (*JackCompilationEngine) CompileLet

func (jCE *JackCompilationEngine) CompileLet()

func (*JackCompilationEngine) CompileParameterList

func (jCE *JackCompilationEngine) CompileParameterList()

func (*JackCompilationEngine) CompileReturn

func (jCE *JackCompilationEngine) CompileReturn()

func (*JackCompilationEngine) CompileStatements

func (jCE *JackCompilationEngine) CompileStatements()

func (*JackCompilationEngine) CompileSubroutineBody

func (jCE *JackCompilationEngine) CompileSubroutineBody()

func (*JackCompilationEngine) CompileSubroutineCall

func (jCE *JackCompilationEngine) CompileSubroutineCall()

func (*JackCompilationEngine) CompileSubroutineDec

func (jCE *JackCompilationEngine) CompileSubroutineDec()

func (*JackCompilationEngine) CompileTerm

func (jCE *JackCompilationEngine) CompileTerm()

func (*JackCompilationEngine) CompileVarDec

func (jCE *JackCompilationEngine) CompileVarDec()

func (*JackCompilationEngine) CompileWhile

func (jCE *JackCompilationEngine) CompileWhile()

Jump to

Keyboard shortcuts

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