mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 07:53:40 +00:00
all: improve compiler error handling
Most of these errors are actually "todo" or "unimplemented" errors, so the return type is known. This means that compilation can proceed (with errors) even though the output will be incorrect. This is useful because this way, all errors in a compilation unit can be shown together to the user.
This commit is contained in:
committed by
Ron Evans
parent
45cacda7b3
commit
d155e31b64
@@ -12,3 +12,7 @@ func (c *Compiler) makeError(pos token.Pos, msg string) types.Error {
|
||||
Msg: msg,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Compiler) addError(pos token.Pos, msg string) {
|
||||
c.diagnostics = append(c.diagnostics, c.makeError(pos, msg))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user