[Synopsis-changes] Synopsis/Synopsis/Synopsis/Processors Linker.py,1.11,1.12 __init__.py,1.6,1.7
Stefan Seefeld stefan at synopsis.fresco.orgTue Dec 2 16:19:43 UTC 2003
- Previous message: [Synopsis-changes] Synopsis/Synopsis/Synopsis/Processors EmptyNS.py,1.5,1.6
- Next message: [Synopsis-changes] Synopsis/Synopsis/demo/C++/Boost synopsis.py,1.5,1.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /cvs/synopsis/Synopsis/Synopsis/Processors
In directory frida:/tmp/cvs-serv9887/Synopsis/Processors
Modified Files:
Linker.py __init__.py
Log Message:
mv 'EmptyNS' -> 'EmptyModuleRemover' and integrate it into Linker
Index: Linker.py
===================================================================
RCS file: /cvs/synopsis/Synopsis/Synopsis/Processors/Linker.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -d -r1.11 -r1.12
--- Linker.py 25 Nov 2003 20:19:00 -0000 1.11
+++ Linker.py 2 Dec 2003 16:19:41 -0000 1.12
@@ -10,11 +10,13 @@
import string
from Synopsis.Processor import Composite, Parameter
-from Synopsis import AST, Type, Util
+from Synopsis import AST, Type
class Linker(Composite, AST.Visitor, Type.Visitor):
"""Visitor that removes duplicate declarations"""
+ remove_empty_modules = Parameter(True, 'Remove empty modules.')
+
def process(self, ast, **kwds):
self.set_parameters(kwds)
@@ -35,8 +37,12 @@ class Linker(Composite, AST.Visitor, Typ
for file in self.ast.files().values():
self.visitSourceFile(file)
+ if self.remove_empty_modules:
+ import EmptyModuleRemover
+ self.ast = EmptyModuleRemover.EmptyModuleRemover().process(self.ast)
+
# now deal with the sub-processors, if any
- self.ast = Composite.process(self, self.ast, input=[])
+ self.ast = Composite.process(self, self.ast, input=[], output='')
return self.output_and_return_ast()
Index: __init__.py
===================================================================
RCS file: /cvs/synopsis/Synopsis/Synopsis/Processors/__init__.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -d -r1.6 -r1.7
--- __init__.py 22 Nov 2003 21:48:05 -0000 1.6
+++ __init__.py 2 Dec 2003 16:19:41 -0000 1.7
@@ -10,7 +10,7 @@ from Stripper import *
from NameMapper import *
from Comments import *
from XRefCompiler import *
-from EmptyNS import *
+from EmptyModuleRemover import *
from AccessRestrictor import *
from TypeMapper import *
from LanguageMapper import *
- Previous message: [Synopsis-changes] Synopsis/Synopsis/Synopsis/Processors EmptyNS.py,1.5,1.6
- Next message: [Synopsis-changes] Synopsis/Synopsis/demo/C++/Boost synopsis.py,1.5,1.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Synopsis-changes mailing list