Searched refs:MatchAs (Results 1 - 7 of 7) sorted by relevance
/third_party/python/Python/ |
H A D | ast.c | 654 if (p->v.MatchAs.name && !validate_capture(p->v.MatchAs.name)) { in validate_pattern() 658 if (p->v.MatchAs.pattern == NULL) { in validate_pattern() 661 else if (p->v.MatchAs.name == NULL) { in validate_pattern() 663 "MatchAs must specify a target name if a pattern is given"); in validate_pattern() 667 ret = validate_pattern(state, p->v.MatchAs.pattern, /*star_ok=*/0); in validate_pattern()
|
H A D | symtable.c | 1770 if (p->v.MatchAs.pattern) { in symtable_visit_pattern() 1771 VISIT(st, pattern, p->v.MatchAs.pattern); in symtable_visit_pattern() 1773 if (p->v.MatchAs.name) { in symtable_visit_pattern() 1774 symtable_add_def(st, p->v.MatchAs.name, DEF_LOCAL, LOCATION(p)); in symtable_visit_pattern()
|
H A D | ast_opt.c | 1048 if (node_->v.MatchAs.pattern) { in astfold_pattern() 1049 CALL(astfold_pattern, pattern_ty, node_->v.MatchAs.pattern); in astfold_pattern()
|
H A D | compile.c | 6299 ((N)->kind == MatchAs_kind && !(N)->v.MatchAs.name) 6506 if (p->v.MatchAs.pattern == NULL) { in compiler_pattern_as() 6509 if (p->v.MatchAs.name) { in compiler_pattern_as() 6511 return compiler_error(c, e, p->v.MatchAs.name); in compiler_pattern_as() 6516 return pattern_helper_store_name(c, p->v.MatchAs.name, pc); in compiler_pattern_as() 6521 RETURN_IF_FALSE(compiler_pattern(c, p->v.MatchAs.pattern, pc)); in compiler_pattern_as() 6524 RETURN_IF_FALSE(pattern_helper_store_name(c, p->v.MatchAs.name, pc)); in compiler_pattern_as()
|
H A D | Python-ast.c | 1793 " | MatchAs(pattern? pattern, identifier? name)\n" in init_types() 1831 state->MatchAs_type = make_type(state, "MatchAs", state->pattern_type, in init_types() 1833 "MatchAs(pattern? pattern, identifier? name)"); in init_types() 3561 p->v.MatchAs.pattern = pattern; in _PyAST_MatchAs() 3562 p->v.MatchAs.name = name; in _PyAST_MatchAs() 5382 value = ast2obj_pattern(state, o->v.MatchAs.pattern); in ast2obj_pattern() 5387 value = ast2obj_identifier(state, o->v.MatchAs.name); in ast2obj_pattern() 11749 if (_Py_EnterRecursiveCall(" while traversing 'MatchAs' node")) { in obj2ast_pattern() 11766 if (_Py_EnterRecursiveCall(" while traversing 'MatchAs' node")) { in obj2ast_pattern() 12276 if (PyModule_AddObjectRef(m, "MatchAs", stat in astmodule_exec() [all...] |
/third_party/python/Include/internal/ |
H A D | pycore_ast.h | 608 } MatchAs; member
|
/third_party/python/Lib/test/ |
H A D | test_ast.py | 1804 ast.MatchAs( 1816 ast.MatchAs(name="_"),
|
Completed in 35 milliseconds