VARIABLE
This commit is contained in:
11
words.go
11
words.go
@@ -10,11 +10,12 @@ type Dictionary map[string]Word
|
||||
|
||||
// A Word defines a subroutine
|
||||
type Word struct {
|
||||
Name string
|
||||
Impl func(string) error
|
||||
Source []string
|
||||
Immediate bool
|
||||
BranchCheck bool
|
||||
Name string // Name of our word/variable
|
||||
Impl func(string) error // built-in implementation of the word
|
||||
Source []string // source, if user-defined
|
||||
Variable int // if this is a variable, the memory address
|
||||
Immediate bool // is this word immediate?
|
||||
BranchCheck bool // is this word part of IF/ELSE/THEN?
|
||||
}
|
||||
|
||||
// AddWord inserts a new word into the dictonary, overwriting any existing word by that name
|
||||
|
Reference in New Issue
Block a user