Implemented commands until helloworld works \o/
This commit is contained in:
parent
f86b5724e5
commit
198efceb1f
10 changed files with 244 additions and 45 deletions
|
@ -16,14 +16,14 @@ func NewInterpreter(f *field.Field, p *pointer.Pointer) *Interpreter {
|
|||
|
||||
func (i *Interpreter) Run() int {
|
||||
for i.p != nil {
|
||||
if v := i.Step(); v != nil {
|
||||
if v := i.step(); v != nil {
|
||||
return *v
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (i *Interpreter) Step() *int {
|
||||
func (i *Interpreter) step() *int {
|
||||
var prev *pointer.Pointer = nil
|
||||
for p := i.p; p != nil; p = p.Next {
|
||||
done, v := p.Exec(i.f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue