Made the interpreter pass most of the mycology test suite

This commit is contained in:
Julien Dessaux 2021-09-24 01:26:49 +02:00
parent 198efceb1f
commit da7e7dae2b
13 changed files with 206 additions and 35 deletions

View file

@ -23,6 +23,9 @@ func (s *Stack) Clear() {
func (s *Stack) Duplicate() {
if s.height > 0 {
s.Push(s.data[s.height-1])
} else {
s.Push(0)
s.Push(0)
}
}