lang: ast, gapi, interfaces, parser: Print line numbers on error
This adds an initial implementation of printing line numbers on type unification errors. It also attempts to print a visual position indicator for most scenarios. This patch was started by Felix Frank and finished by James Shubin. Co-authored-by: Felix Frank <Felix.Frank.de@gmail.com>
This commit is contained in:
@@ -859,6 +859,11 @@ func TestUnification1(t *testing.T) {
|
||||
|
||||
data := &interfaces.Data{
|
||||
// TODO: add missing fields here if/when needed
|
||||
Metadata: &interfaces.Metadata{},
|
||||
SourceFinder: func(string) ([]byte, error) {
|
||||
return nil, fmt.Errorf("not implemented")
|
||||
},
|
||||
|
||||
Debug: testing.Verbose(), // set via the -test.v flag to `go test`
|
||||
Logf: func(format string, v ...interface{}) {
|
||||
t.Logf(fmt.Sprintf("test #%d", index)+": ast: "+format, v...)
|
||||
|
||||
Reference in New Issue
Block a user