Documentation
¶
Index ¶
- Constants
- func CompileCCode(filename string) (string, error)
- func Execute(code, filename string, debug bool)
- func GenerateCCode(source []byte) (string, error)
- func GetCCode(source []byte) bytes.Buffer
- func NewGlobalPointer() *int
- func NewGlobalRegister() *int
- func RunCCode(filename string) error
- type GlobalMemory
- type GlobalVariables
- type MemoryVariable
Constants ¶
View Source
const MEM_SIZE int = 30000
Variables ¶
This section is empty.
Functions ¶
func CompileCCode ¶
func GenerateCCode ¶
func NewGlobalPointer ¶
func NewGlobalPointer() *int
NewGlobalPointer creates a new instance of a global pointer.
func NewGlobalRegister ¶
func NewGlobalRegister() *int
NewGlobalRegister creates a new instance of a global register.
Types ¶
type GlobalMemory ¶
type GlobalMemory struct {
Memory []int
}
GlobalMemory represents the global memory in the program.
func NewGlobalMemory ¶
func NewGlobalMemory() *GlobalMemory
NewGlobalMemory creates a new instance of GlobalMemory.
type GlobalVariables ¶
type GlobalVariables struct {
Variables map[string]MemoryVariable
}
GlobalVariables represents the global variables in the program.
func NewGlobalVariables ¶
func NewGlobalVariables() *GlobalVariables
NewGlobalVariables creates a new instance of GlobalVariables.
type MemoryVariable ¶
MemoryVariable represents a memory variable with a start index and length.
Click to show internal directories.
Click to hide internal directories.