[Synopsis-changes] Synopsis/Synopsis/Synopsis AST.py,1.30,1.31
Stefan Seefeld stefan at synopsis.fresco.orgTue Jan 13 07:37:06 UTC 2004
- Previous message: [Synopsis-changes] Synopsis/Synopsis/tests/qmtest/classes synopsis_database.py,1.3,1.4 synopsis_test.py,1.2,1.3
- Next message: [Synopsis-changes] Synopsis/Synopsis/include/Synopsis Dict.hh,1.2,1.3 List.hh,1.2,1.3 Tuple.hh,1.2,1.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /cvs/synopsis/Synopsis/Synopsis
In directory frida:/tmp/cvs-serv25705/Synopsis
Modified Files:
AST.py
Log Message:
add 'MacroCall' type
Index: AST.py
===================================================================
RCS file: /cvs/synopsis/Synopsis/Synopsis/AST.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -p -d -r1.30 -r1.31
--- AST.py 2 Dec 2003 05:44:07 -0000 1.30
+++ AST.py 13 Jan 2004 07:37:03 -0000 1.31
@@ -185,6 +185,17 @@ class Include:
def is_next(self):
return self.__is_next
+class MacroCall:
+ """A class to support mapping from positions in a preprocessed file
+ back to positions in the original file."""
+
+ def __init__(self, name, start, end, diff):
+
+ self.name = name
+ self.start = start,
+ self.end = end
+ self.diff = diff
+
class SourceFile:
"""The information about a file that the AST was generated from.
Contains filename, all declarations from this file (even nested ones) and
@@ -201,6 +212,7 @@ class SourceFile:
self.__includes = []
self.__declarations = []
self.__is_main = 0
+ self.__macro_calls = {}
def is_main(self):
"""Returns whether this was a main file. A source file is a main file
@@ -246,6 +258,9 @@ class SourceFile:
tracking since *all* files read while parsing this file are included
in the list (even system files)."""
return self.__includes
+
+ def macro_calls(self):
+ return self.__macro_calls
class Declaration:
"""Declaration base class. Every declaration has a name, comments,
- Previous message: [Synopsis-changes] Synopsis/Synopsis/tests/qmtest/classes synopsis_database.py,1.3,1.4 synopsis_test.py,1.2,1.3
- Next message: [Synopsis-changes] Synopsis/Synopsis/include/Synopsis Dict.hh,1.2,1.3 List.hh,1.2,1.3 Tuple.hh,1.2,1.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Synopsis-changes mailing list