Skip to content

Commit

Permalink
Renamed outputFiles to outputDict
Browse files Browse the repository at this point in the history
  • Loading branch information
adarshp committed Dec 11, 2018
1 parent e8f5eb4 commit f9c498d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions delphi/program_analysis/autoTranslate/scripts/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def loadFunction(self, root):
def analyze(
self, trees: List[ET.ElementTree], comments: OrderedDict
) -> Dict:
outputFiles = {}
outputDict = {}
ast = []

# Parse through the ast once to identify and grab all the funcstions
Expand Down Expand Up @@ -401,10 +401,10 @@ def analyze(

# Load the functions list and Fortran ast to a single data structure which
# can be pickled and hence is portable across various scripts and usages.
outputFiles["ast"] = ast
outputFiles["functionList"] = self.functionList
outputFiles["comments"] = comments
return outputFiles
outputDict["ast"] = ast
outputDict["functionList"] = self.functionList
outputDict["comments"] = comments
return outputDict


def get_trees(files: List[str]) -> List[ET.ElementTree]:
Expand Down Expand Up @@ -437,7 +437,7 @@ def get_trees(files: List[str]) -> List[ET.ElementTree]:
trees = get_trees(args.files)
comments = get_comments(fortranFile)
translator = XMLToJSONTranslator()
outputFiles = translator.analyze(trees, comments)
outputDict = translator.analyze(trees, comments)

with open(pickleFile, "wb") as f:
pickle.dump(outputFiles, f)
pickle.dump(outputDict, f)

0 comments on commit f9c498d

Please sign in to comment.