| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Jython
Revision: 5219
Author: fwierzbicki
Date: 20 Aug 2008 11:23:14
Changes:Diff:| ... | ...@@ -78,10 +78,6 @@ | |
| 78 | 78 | PYNODE; |
| 79 | 79 | Interactive; |
| 80 | 80 | Expression; |
| 81 | Test; | |
| 82 | Body; | |
| 83 | Dict; | |
| 84 | IfExp; | |
| 85 | 81 | Ellipsis; |
| 86 | 82 | ListComp; |
| 87 | 83 | Repr; |
| ... | ...@@ -133,6 +129,7 @@ | |
| 133 | 129 | import org.python.antlr.ast.FunctionDef; |
| 134 | 130 | import org.python.antlr.ast.Global; |
| 135 | 131 | import org.python.antlr.ast.If; |
| 132 | import org.python.antlr.ast.IfExp; | |
| 136 | 133 | import org.python.antlr.ast.Import; |
| 137 | 134 | import org.python.antlr.ast.ImportFrom; |
| 138 | 135 | import org.python.antlr.ast.Index; |
| ... | ...@@ -778,8 +775,8 @@ | |
| 778 | 775 | //test: or_test ['if' or_test 'else' test] | lambdef |
| 779 | 776 | test[expr_contextType ctype] |
| 780 | 777 | :o1=or_test[ctype] |
| 781 | ( (IF or_test[expr_contextType.Load] ORELSE) => IF o2=or_test[ctype] ORELSE test[expr_contextType.Load] | |
| 782 | -> ^(IfExp ^(Test $o2) ^(Body $o1) ^(ORELSE test)) | |
| 778 | ( (IF or_test[expr_contextType.Load] ORELSE) => IF o2=or_test[expr_contextType.Load] ORELSE e=test[expr_contextType.Load] | |
| 779 | -> ^(IF<IfExp>[$IF, (exprType)$o2.tree, (exprType)$o1.tree, (exprType)$e.tree]) | |
| 783 | 780 | | -> or_test |
| 784 | 781 | ) |
| 785 | 782 | | lambdef {debug("parsed lambdef");} |