Files
wyst/main.go
T
2024-08-10 16:49:47 +02:00

20 lines
320 B
Go

package main
import (
"fmt"
"github.com/wyst-lang/wyst/parser"
)
func main() {
code := "hello"
ast, state, err := parser.Parse(code, parser.TOP)
if err != nil {
fmt.Printf("SyntaxErr at %d:%d: %s\n", state.Line, state.Column, err)
return
}
for i := 0; i < len(ast); i++ {
fmt.Printf("%s\n", ast[i])
}
}