Now works with tests
This commit is contained in:
parent
2e79d9c834
commit
49bcbcaa96
@ -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.
|
||||
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user