Made the interpreter pass most of the mycology test suite
This commit is contained in:
parent
198efceb1f
commit
da7e7dae2b
13 changed files with 206 additions and 35 deletions
|
@ -4,8 +4,6 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/pkg/term"
|
||||
)
|
||||
|
||||
var defaultInputLastChar *int = nil
|
||||
|
@ -16,13 +14,6 @@ func DefaultCharacterInput() int {
|
|||
defaultInputLastChar = nil
|
||||
return c
|
||||
}
|
||||
t, err := term.Open("/dev/stdin")
|
||||
if err != nil {
|
||||
log.Fatalf("Could not open stdin: %+v", err)
|
||||
}
|
||||
defer t.Close()
|
||||
defer t.Restore()
|
||||
term.RawMode(t)
|
||||
b := make([]byte, 1)
|
||||
i, err := os.Stdin.Read(b)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue