Treat source as runes to allow for unicode characters (e.g. greek, japanese)

This commit is contained in:
Neemek 2024-12-28 17:16:56 +01:00
parent 74bf43d387
commit 402644d219
Signed by: neemek
GPG key ID: 28360A8951CD0E9B
2 changed files with 4 additions and 4 deletions

View file

@ -65,7 +65,7 @@ func (cmd *RunCmd) Run(ctx *Context) error {
panic(r)
}
for _, e := range p.Errors {
print(e.Format(src))
print(e.Format([]rune(src)))
}
}
}()
@ -75,7 +75,7 @@ func (cmd *RunCmd) Run(ctx *Context) error {
// if there were parsing errors, print them out
if len(p.Errors) > 0 {
for _, e := range p.Errors {
print(e.Format(src))
print(e.Format([]rune(src)))
}
log.Fatal("Parsing had errors")
}