about summary refs log tree commit diff
path: root/pkg/lang/compiler/errors.go
blob: 45f14cc23502355321d7e39e4306bba4a2983f08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package compiler

import (
	"fmt"
	"jinx/pkg/libs/source"
)

type Error struct {
	Module string
	Loc    source.Loc
	Err    error
}

func (e Error) Error() string {
	return fmt.Sprintf("compiler error at %s:%d:%d: %v", e.Module, e.Loc.Row, e.Loc.Col, e.Err)
}