lang: Refactor all the highlight helping together
Keep this cleaner and add a bit more.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user