From 1cce4cc59edf66b81c7caa88462805f023e98d07 Mon Sep 17 00:00:00 2001
From: pycsham <shampuiyanchloe@gmail.com>
Date: Thu, 27 Feb 2020 16:21:01 -0500
Subject: [PATCH] modified test file to make debugging easier

---
 LineNodes.py |  7 ++++++-
 Test.py      | 21 ++++++++++++++-------
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/LineNodes.py b/LineNodes.py
index 0e9cb22..e0a992c 100644
--- a/LineNodes.py
+++ b/LineNodes.py
@@ -59,7 +59,9 @@ def makeNodeFromNoTailStatement(parseTree):
     elif child.name == 'returnStatement':
         return ReturnNode(child)
 
-
+###########################################################
+# end of factory methods
+###########################################################
 
 # block
 # Rules:
@@ -78,6 +80,9 @@ class BlockNode(ASTNode):
         
         self.children = self.statements
 
+    # def buildEnv(self, parentEnv):
+
+
 
    
 
diff --git a/Test.py b/Test.py
index bb71dd3..eaf6389 100644
--- a/Test.py
+++ b/Test.py
@@ -40,6 +40,8 @@ def a2Multiple():
         testCases = [f.path for f in scandir(testDirectory) if f.is_dir()]
 
     for c in testCases:
+        print("**********************************************************")
+        print("DIRECTORY")
         print(c)
         print("**********************************************************")
         # get all files in the folder recursively
@@ -104,13 +106,18 @@ def run(testFiles):
 
     ASTs = astBuild(parseTrees)
 
-    for (n, t) in ASTs:
-        print(n)
-        print("--------------------")
-        t.printTree()
-        print("\n \n\n \n")
-
-    buildEnvAndLink(ASTs)
+    # for (n, t) in ASTs:
+        # print(n)
+        # print("--------------------")
+        # t.printTree()
+        # print("\n \n\n \n")
+    
+    try:
+        buildEnvAndLink(ASTs)
+    except Exception as e:
+        print("error at environment building and linking")
+        print(e)
+        return
 
     print("<<<<------- after buildEnvAndLink -------->>>>>>")
     for (n, t) in ASTs:
-- 
GitLab