[Python-checkins] python/dist/src/Parser Python.asdl, 1.1.2.8, 1.1.2.9 asdl_c.py, 1.1.2.5, 1.1.2.6

nascheme at users.sourceforge.net nascheme at users.sourceforge.net
Sat Apr 2 20:50:41 CEST 2005


Update of /cvsroot/python/python/dist/src/Parser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1290/Parser

Modified Files:
      Tag: ast-branch
	Python.asdl asdl_c.py 
Log Message:
Add support to the AST compiler for decorators (SF patch #1167709).


Index: Python.asdl
===================================================================
RCS file: /cvsroot/python/python/dist/src/Parser/Attic/Python.asdl,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -d -r1.1.2.8 -r1.1.2.9
--- Python.asdl	16 Jan 2005 17:09:11 -0000	1.1.2.8
+++ Python.asdl	2 Apr 2005 18:50:05 -0000	1.1.2.9
@@ -9,7 +9,8 @@
 	    -- not really an actual node but useful in Jython's typesystem.
 	    | Suite(stmt* body)
 
-	stmt = FunctionDef(identifier name, arguments args, stmt* body)
+	stmt = FunctionDef(identifier name, arguments args, 
+                           stmt* body, expr* decorators)
 	      | ClassDef(identifier name, expr* bases, stmt* body)
 	      | Return(expr? value) | Yield(expr value)
 

Index: asdl_c.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Parser/Attic/asdl_c.py,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -d -r1.1.2.5 -r1.1.2.6
--- asdl_c.py	20 Mar 2005 23:40:58 -0000	1.1.2.5
+++ asdl_c.py	2 Apr 2005 18:50:05 -0000	1.1.2.6
@@ -371,6 +371,10 @@
         if has_seq:
             self.emit("int i, n;", 1)
             self.emit("asdl_seq *seq;", 1)
+        self.emit('', 0)
+        self.emit('if (!o)', 1)
+        self.emit('return;', 2)
+        self.emit('', 0)
 
     def func_end(self):
         self.emit("}", 0)



More information about the Python-checkins mailing list