Files
elm/interpreter/interpreter.go
2024-01-25 10:57:23 +07:00

37 lines
512 B
Go

package main
import (
"unicode"
"bytes"
"bufio"
"strings"
"strconv"
"os"
"fmt"
"errors"
. "e1lama/elm"
)
func LoadProgramFromBinary(m *Machine, f *os.File) error {
}
func main() {
f, err := os.Open("program.elb")
if err != nil {
fmt.Fprintf(os.Stderr, "[ERR] Couldn't open file: %s\n", err);
os.Exit(1)
}
defer f.Close()
m := Constructor()
err = LoadProgramFromBinary(m, f)
if err != nil {
fmt.Fprintf(os.Stderr, "[ERR] Error reading binary: %s\n", err);
os.Exit(1)
}
m.Run()
}