Added skim boolean that does nothing
This commit is contained in:
parent
49bcbcaa96
commit
fe6c82ae9e
@ -27,14 +27,14 @@ type ParsingOperation struct {
|
|||||||
// Fetch returns the parsed module located at the specified path, and returns an
|
// Fetch returns the parsed module located at the specified path, and returns an
|
||||||
// abstract syntax tree. If the module has not yet been parsed, it parses it
|
// abstract syntax tree. If the module has not yet been parsed, it parses it
|
||||||
// first.
|
// first.
|
||||||
func Fetch (modulePath string) (tree SyntaxTree, err error) {
|
func Fetch (modulePath string, skim bool) (tree SyntaxTree, err error) {
|
||||||
if modulePath[0] != '/' {
|
if modulePath[0] != '/' {
|
||||||
panic("module path did not begin at filesystem root")
|
panic("module path did not begin at filesystem root")
|
||||||
}
|
}
|
||||||
|
|
||||||
// try to hit cache
|
// try to hit cache
|
||||||
cached, exists := cache[modulePath]
|
cached, exists := cache[modulePath]
|
||||||
if exists {
|
if exists && !(!skim && cached.skimmed){
|
||||||
tree = cached.tree
|
tree = cached.tree
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ func checkTree (modulePath string, correct string, test *testing.T) {
|
|||||||
cwd, _ := os.Getwd()
|
cwd, _ := os.Getwd()
|
||||||
modulePath = filepath.Join(cwd, modulePath)
|
modulePath = filepath.Join(cwd, modulePath)
|
||||||
println(modulePath)
|
println(modulePath)
|
||||||
tree, err := Fetch(modulePath)
|
tree, err := Fetch(modulePath, false)
|
||||||
|
|
||||||
treeString := tree.ToString(0)
|
treeString := tree.ToString(0)
|
||||||
treeRunes := []rune(treeString)
|
treeRunes := []rune(treeString)
|
||||||
|
Reference in New Issue
Block a user