Forráskód Böngészése

Removed hidden consts from symbol files.

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6628 8c9fc860-2736-0410-a75d-ab315db34111
felixf 9 éve
szülő
commit
a1ac6818be
2 módosított fájl, 6 hozzáadás és 3 törlés
  1. 1 0
      source/FoxIntermediateBackend.Mod
  2. 5 3
      source/FoxPrintout.Mod

+ 1 - 0
source/FoxIntermediateBackend.Mod

@@ -13212,6 +13212,7 @@ TYPE
 		*)
 		constant := SyntaxTree.NewConstant(-1,SyntaxTree.NewIdentifier(name));
 		constant.SetValue(value);
+		constant.SetAccess(SyntaxTree.Hidden);
 		module.moduleScope.AddConstant(constant);
 		constant.SetScope(module.moduleScope);
 		RETURN constant

+ 5 - 3
source/FoxPrintout.Mod

@@ -1050,9 +1050,11 @@ TYPE
 			Indent;  Keyword("CONST " );
 			w.IncIndent;
 			WHILE(x # NIL) DO
-				Indent;
-				Symbol(x);
-				w.String( "; " );
+				IF (x.access # SyntaxTree.Hidden) OR (mode > SourceCode) THEN
+					Indent;
+					Symbol(x);
+					w.String( "; " );
+				END;
 				x := x.nextConstant;
 			END;
 			w.DecIndent;