lang: Refactor all the highlight helping together

Keep this cleaner and add a bit more.
This commit is contained in:
James Shubin
2025-06-07 00:23:45 -04:00
parent 2b7e9c3200
commit 55eeb50fb4
12 changed files with 35 additions and 28 deletions

View File

@@ -574,16 +574,3 @@ func classScopeFeedback(scope *interfaces.Scope, logf func(format string, v ...i
logf("class %s", name)
}
}
// highlightHelper give the user better file/line number feedback.
func highlightHelper(node interfaces.Node, logf func(format string, v ...interface{}), err error) error {
displayer, ok := node.(interfaces.TextDisplayer)
if ok {
if highlight := displayer.HighlightText(); highlight != "" {
logf("%s: %s", err.Error(), highlight)
}
//return fmt.Errorf("%s: %s", err.Error(), displayer.Byline())
}
return err
}