MCPcopy
hub / github.com/tinygo-org/tinygo / makeError

Method makeError

compiler/errors.go:14–20  ·  view source on GitHub ↗

makeError makes it easy to create an error from a token.Pos with a message.

(pos token.Pos, msg string)

Source from the content-addressed store, hash-verified

12
13// makeError makes it easy to create an error from a token.Pos with a message.
14func (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.
23func (c *compilerContext) addError(pos token.Pos, msg string) {

Callers 12

addErrorMethod · 0.95
createInterruptGlobalMethod · 0.80
createInlineAsmFullMethod · 0.80
emitCSROperationMethod · 0.80
createRawSyscallMethod · 0.80
createSyscallMethod · 0.80
createBuiltinMethod · 0.80
createFunctionCallMethod · 0.80
createExprMethod · 0.80
createBinOpMethod · 0.80
createConvertMethod · 0.80
createUnOpMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected