mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-12 17:27:50 +08:00
Show content of compiler error.
This commit is contained in:
parent
a016fb8cbe
commit
9ca0f83256
|
@ -131,7 +131,7 @@ func (ed *Editor) refresh(fullRefresh bool) error {
|
|||
_, err := ed.evaler.Compile(name, src, n)
|
||||
if err != nil {
|
||||
if err, ok := err.(*errutil.ContextualError); ok {
|
||||
ed.addTip("compiler error highlighted")
|
||||
ed.addTip("compiler error: %s", err)
|
||||
p := err.Pos()
|
||||
for i, token := range ed.tokens {
|
||||
if token.Node.Begin() <= p && p < token.Node.End() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user