Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(72767)

Delta Between Two Patch Sets: Python/symtable.c

Issue 11682: PEP 380 reference implementation for 3.3
Left Patch Set: Created 7 years, 11 months ago
Right Patch Set: Created 7 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« Objects/exceptions.c ('K') | « Python/Python-ast.c ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #include "Python.h" 1 #include "Python.h"
2 #include "Python-ast.h" 2 #include "Python-ast.h"
3 #include "code.h" 3 #include "code.h"
4 #include "symtable.h" 4 #include "symtable.h"
5 #include "structmember.h" 5 #include "structmember.h"
6 6
7 /* error strings used for warnings */ 7 /* error strings used for warnings */
8 #define GLOBAL_AFTER_ASSIGN \ 8 #define GLOBAL_AFTER_ASSIGN \
9 "name '%.400s' is assigned to before global declaration" 9 "name '%.400s' is assigned to before global declaration"
10 10
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 VISIT(st, expr, e->v.BinOp.right); 1281 VISIT(st, expr, e->v.BinOp.right);
1282 break; 1282 break;
1283 case UnaryOp_kind: 1283 case UnaryOp_kind:
1284 VISIT(st, expr, e->v.UnaryOp.operand); 1284 VISIT(st, expr, e->v.UnaryOp.operand);
1285 break; 1285 break;
1286 case Lambda_kind: { 1286 case Lambda_kind: {
1287 if (!GET_IDENTIFIER(lambda)) 1287 if (!GET_IDENTIFIER(lambda))
1288 return 0; 1288 return 0;
1289 if (e->v.Lambda.args->defaults) 1289 if (e->v.Lambda.args->defaults)
1290 VISIT_SEQ(st, expr, e->v.Lambda.args->defaults); 1290 VISIT_SEQ(st, expr, e->v.Lambda.args->defaults);
1291 if (e->v.Lambda.args->kw_defaults)
1292 VISIT_KWONLYDEFAULTS(st,
1293 e->v.Lambda.args->kw_defaults);
1291 if (!symtable_enter_block(st, lambda, 1294 if (!symtable_enter_block(st, lambda,
1292 FunctionBlock, (void *)e, e->lineno, 1295 FunctionBlock, (void *)e, e->lineno,
1293 e->col_offset)) 1296 e->col_offset))
1294 return 0; 1297 return 0;
1295 VISIT(st, arguments, e->v.Lambda.args); 1298 VISIT(st, arguments, e->v.Lambda.args);
1296 VISIT(st, expr, e->v.Lambda.body); 1299 VISIT(st, expr, e->v.Lambda.body);
1297 if (!symtable_exit_block(st, (void *)e)) 1300 if (!symtable_exit_block(st, (void *)e))
1298 return 0; 1301 return 0;
1299 break; 1302 break;
1300 } 1303 }
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 } 1643 }
1641 1644
1642 static int 1645 static int
1643 symtable_visit_dictcomp(struct symtable *st, expr_ty e) 1646 symtable_visit_dictcomp(struct symtable *st, expr_ty e)
1644 { 1647 {
1645 return symtable_handle_comprehension(st, e, GET_IDENTIFIER(dictcomp), 1648 return symtable_handle_comprehension(st, e, GET_IDENTIFIER(dictcomp),
1646 e->v.DictComp.generators, 1649 e->v.DictComp.generators,
1647 e->v.DictComp.key, 1650 e->v.DictComp.key,
1648 e->v.DictComp.value); 1651 e->v.DictComp.value);
1649 } 1652 }
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+