This commit is contained in:
2024-08-10 19:48:14 +02:00
parent 459c7f47cd
commit aeec086b95
3 changed files with 36 additions and 44 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ import (
)
func main() {
code := "hello"
ast, state, err := parser.Parse(code, parser.TOP)
code := "int x"
ast, state, err := parser.Parse(code, parser.RULE_SET)
if err != nil {
fmt.Printf("SyntaxErr at %d:%d: %s\n", state.Line, state.Column, err)
return