makeError makes it easy to create an error from a token.Pos with a message.
(pos token.Pos, msg string)
| 12 | |
| 13 | // makeError makes it easy to create an error from a token.Pos with a message. |
| 14 | func (c *compilerContext) makeError(pos token.Pos, msg string) types.Error { |
| 15 | return types.Error{ |
| 16 | Fset: c.program.Fset, |
| 17 | Pos: pos, |
| 18 | Msg: msg, |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | // addError adds a new compiler diagnostic with the given location and message. |
| 23 | func (c *compilerContext) addError(pos token.Pos, msg string) { |
no outgoing calls
no test coverage detected