diff --git a/parser/parser.go b/parser/parser.go index 9e4a994..fcc54f3 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -20,7 +20,7 @@ type ParsingOperation struct { // TODO: // * implement parser cache // * have this try to hit the cache, and actually parse on miss -// - rename this to Fetch +// * rename this to Fetch // - add `skim bool` argument. when this is true, don't parse any code or data // section initialization values, just definitions and their default values. diff --git a/parser/test-common.go b/parser/test-common.go index 2784087..12368c3 100644 --- a/parser/test-common.go +++ b/parser/test-common.go @@ -1,12 +1,16 @@ package parser import "io" +import "os" import "strings" import "testing" -// import "git.tebibyte.media/arf/arf/types" +import "path/filepath" func checkTree (modulePath string, correct string, test *testing.T) { - tree, err := Parse(modulePath) + cwd, _ := os.Getwd() + modulePath = filepath.Join(cwd, modulePath) + println(modulePath) + tree, err := Fetch(modulePath) treeString := tree.ToString(0) treeRunes := []rune(treeString)