Skip to content

Commit

Permalink
remove AST.json file
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Al-Refai committed Apr 19, 2024
1 parent c907554 commit 3ab8856
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"encoding/json"
"fmt"
"os"

Expand All @@ -19,11 +18,11 @@ func main() {
tokens := lex.LoadFileReader(file)
ast := lexer.NewAST(tokens)
program := ast.ProduceAST()
program_ast, err := json.Marshal(program)
if err != nil {
panic(err)
}
os.WriteFile("AST.json", program_ast, 0777)
// program_ast, err := json.Marshal(program)
// if err != nil {
// panic(err)
// }
// os.WriteFile("AST.json", program_ast, 0777)
interpreter := runtime.NewInterpreter(program)
interpreter.Run()
}
Expand Down

0 comments on commit 3ab8856

Please sign in to comment.