Skip to content

Commit

Permalink
Improve error messages on parsing POS of gen-ast-pos (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
makenowjust authored Oct 31, 2024
1 parent 98b8bf2 commit e9aa0d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/gen-ast-pos/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func main() {
e := m[1]
expr, err := poslang.Parse(e)
if err != nil {
log.Printf("Error at node %s, pos = %s", nodes[len(nodes)-1].name, e)
log.Fatal(err)
}
nodes[len(nodes)-1].posExpr = expr
Expand All @@ -90,6 +91,7 @@ func main() {
e := m[1]
expr, err := poslang.Parse(e)
if err != nil {
log.Printf("Error at node %s, end = %s", nodes[len(nodes)-1].name, e)
log.Fatal(err)
}
nodes[len(nodes)-1].endExpr = expr
Expand Down

0 comments on commit e9aa0d4

Please sign in to comment.