From fe6c82ae9e213bdf27b60fae326e47d85be63cb8 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Mon, 5 Sep 2022 13:46:10 -0400 Subject: [PATCH] Added skim boolean that does nothing --- parser/parser.go | 4 ++-- parser/test-common.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parser/parser.go b/parser/parser.go index fcc54f3..43f344a 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -27,14 +27,14 @@ type ParsingOperation struct { // 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 // first. -func Fetch (modulePath string) (tree SyntaxTree, err error) { +func Fetch (modulePath string, skim bool) (tree SyntaxTree, err error) { if modulePath[0] != '/' { panic("module path did not begin at filesystem root") } // try to hit cache cached, exists := cache[modulePath] - if exists { + if exists && !(!skim && cached.skimmed){ tree = cached.tree return } diff --git a/parser/test-common.go b/parser/test-common.go index 12368c3..8a8e918 100644 --- a/parser/test-common.go +++ b/parser/test-common.go @@ -10,7 +10,7 @@ func checkTree (modulePath string, correct string, test *testing.T) { cwd, _ := os.Getwd() modulePath = filepath.Join(cwd, modulePath) println(modulePath) - tree, err := Fetch(modulePath) + tree, err := Fetch(modulePath, false) treeString := tree.ToString(0) treeRunes := []rune(treeString)