mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-29 08:08:42 +00:00
da0a02d128
Replace most errors returned by the compiler (using errors.New) with an error type that includes the source location.
15 lines
203 B
Go
15 lines
203 B
Go
package compiler
|
|
|
|
import (
|
|
"go/token"
|
|
"go/types"
|
|
)
|
|
|
|
func (c *Compiler) makeError(pos token.Pos, msg string) types.Error {
|
|
return types.Error{
|
|
Fset: c.ir.Program.Fset,
|
|
Pos: pos,
|
|
Msg: msg,
|
|
}
|
|
}
|