diff --git a/lexer/error.go b/lexer/error.go index 065fc01..d18f3f2 100644 --- a/lexer/error.go +++ b/lexer/error.go @@ -25,6 +25,7 @@ type Error struct { Column int Content string + Hint string Err error } @@ -57,6 +58,10 @@ func (err Error) Error() string { s = append(s, fmt.Sprintf("%q", err.Content)) } + if err.Hint != "" { + s = append(s, err.Hint) + } + return strings.Join(s, ": ") }