• Home
  • Raw
  • Download

Lines Matching full:extra

60     | NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, CHECK(stmt_ty, _PyAST_Pass(EXTRA))) }
69 | e=star_expressions { _PyAST_Expr(e, EXTRA) }
73 | 'pass' { _PyAST_Pass(EXTRA) }
77 | 'break' { _PyAST_Break(EXTRA) }
78 | 'continue' { _PyAST_Continue(EXTRA) }
98 _PyAST_AnnAssign(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, c, 1, EXTRA)
102 … CHECK_VERSION(stmt_ty, 6, "Variable annotations syntax is", _PyAST_AnnAssign(a, b, c, 0, EXTRA)) }
104 _PyAST_Assign(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }
106 _PyAST_AugAssign(a, b->kind, c, EXTRA) }
125 _PyAST_Global(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }
127 _PyAST_Nonlocal(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }
129 yield_stmt[stmt_ty]: y=yield_expr { _PyAST_Expr(y, EXTRA) }
131 assert_stmt[stmt_ty]: 'assert' a=expression b=[',' z=expression { z }] { _PyAST_Assert(a, b, EXTRA)…
134 | 'del' a=del_targets &(';' | NEWLINE) { _PyAST_Delete(a, EXTRA) }
138 import_name[stmt_ty]: 'import' a=dotted_as_names { _PyAST_Import(a, EXTRA) }
142 _PyAST_ImportFrom(b->v.Name.id, c, _PyPegen_seq_count_dots(a), EXTRA) }
144 _PyAST_ImportFrom(NULL, b, _PyPegen_seq_count_dots(a), EXTRA) }
148 … { (asdl_alias_seq*)_PyPegen_singleton_seq(p, CHECK(alias_ty, _PyPegen_alias_for_star(p, EXTRA))) }
155 EXTRA) }
161 EXTRA) }
169 _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }
170 | 'if' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }
174 _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }
175 | 'elif' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }
182 | 'while' a=named_expression ':' b=block c=[else_block] { _PyAST_While(a, b, c, EXTRA) }
187 _PyAST_For(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA) }
189 …stmt_ty, 5, "Async for loops are", _PyAST_AsyncFor(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA)) }
195 _PyAST_With(a, b, NULL, EXTRA) }
197 _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }
199 CHECK_VERSION(stmt_ty, 5, "Async with statements are", _PyAST_AsyncWith(a, b, NULL, EXTRA)) }
201 …(stmt_ty, 5, "Async with statements are", _PyAST_AsyncWith(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA)) }
211 | 'try' &&':' b=block f=finally_block { _PyAST_Try(b, NULL, NULL, f, EXTRA) }
212 …pthandler_seq*]=except_block+ el=[else_block] f=[finally_block] { _PyAST_Try(b, ex, el, f, EXTRA) }
216 _PyAST_ExceptHandler(e, (t) ? ((expr_ty) t)->v.Name.id : NULL, b, EXTRA) }
217 | 'except' ':' b=block { _PyAST_ExceptHandler(NULL, NULL, b, EXTRA) }
225 CHECK_VERSION(stmt_ty, 10, "Pattern matching is", _PyAST_Match(subject, cases, EXTRA)) }
229 … _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, value, values)), Load, EXTRA) }
239 _PyAST_MatchSequence(patterns, EXTRA) }
246 _PyAST_MatchAs(pattern, target->v.Name.id, EXTRA) }
250 asdl_seq_LEN(patterns) == 1 ? asdl_seq_GET(patterns, 0) : _PyAST_MatchOr(patterns, EXTRA) }
263 | value=signed_number !('+' | '-') { _PyAST_MatchValue(value, EXTRA) }
264 | value=complex_number { _PyAST_MatchValue(value, EXTRA) }
265 | value=strings { _PyAST_MatchValue(value, EXTRA) }
266 | 'None' { _PyAST_MatchSingleton(Py_None, EXTRA) }
267 | 'True' { _PyAST_MatchSingleton(Py_True, EXTRA) }
268 | 'False' { _PyAST_MatchSingleton(Py_False, EXTRA) }
275 | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }
276 | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }
277 | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }
281 _PyAST_BinOp(real, Add, imag, EXTRA) }
283 _PyAST_BinOp(real, Sub, imag, EXTRA) }
287 | '-' number=NUMBER { _PyAST_UnaryOp(USub, number, EXTRA) }
291 | '-' real=real_number { _PyAST_UnaryOp(USub, real, EXTRA) }
300 | target=pattern_capture_target { _PyAST_MatchAs(NULL, target->v.Name.id, EXTRA) }
307 | "_" { _PyAST_MatchAs(NULL, NULL, EXTRA) }
310 | attr=attr !('.' | '(' | '=') { _PyAST_MatchValue(attr, EXTRA) }
313 _PyAST_Attribute(value, attr->v.Name.id, Load, EXTRA) }
322 | '[' patterns=maybe_sequence_pattern? ']' { _PyAST_MatchSequence(patterns, EXTRA) }
323 | '(' patterns=open_sequence_pattern? ')' { _PyAST_MatchSequence(patterns, EXTRA) }
334 _PyAST_MatchStar(target->v.Name.id, EXTRA) }
336 _PyAST_MatchStar(NULL, EXTRA) }
340 _PyAST_MatchMapping(NULL, NULL, NULL, EXTRA) }
342 _PyAST_MatchMapping(NULL, NULL, rest->v.Name.id, EXTRA) }
348 EXTRA) }
354 EXTRA) }
365 _PyAST_MatchClass(cls, NULL, NULL, NULL, EXTRA) }
367 _PyAST_MatchClass(cls, patterns, NULL, NULL, EXTRA) }
374 EXTRA) }
382 EXTRA) }
392 | 'return' a=[star_expressions] { _PyAST_Return(a, EXTRA) }
395 | 'raise' a=expression b=['from' z=expression { z }] { _PyAST_Raise(a, b, EXTRA) }
396 | 'raise' { _PyAST_Raise(NULL, NULL, EXTRA) }
407 b, NULL, a, NEW_TYPE_COMMENT(p, tc), EXTRA) }
415 b, NULL, a, NEW_TYPE_COMMENT(p, tc), EXTRA)
477 param[arg_ty]: a=NAME b=annotation? { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }
493 c, NULL, EXTRA) }
502 _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }
503 …r_expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }
506 | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }
511 | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }
516 …b=expression { _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA) }
527 _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }
528 …a=expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }
533 | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }
539 _PyAST_Lambda((a) ? a : CHECK(arguments_ty, _PyPegen_empty_arguments(p)), b, EXTRA) }
585 lambda_param[arg_ty]: a=NAME { _PyAST_arg(a->v.Name.id, NULL, NULL, EXTRA) }
591 EXTRA) }
597 EXTRA) }
600 | 'not' a=inversion { _PyAST_UnaryOp(Not, a, EXTRA) }
608 EXTRA) }
634 | a=bitwise_or '|' b=bitwise_xor { _PyAST_BinOp(a, BitOr, b, EXTRA) }
637 | a=bitwise_xor '^' b=bitwise_and { _PyAST_BinOp(a, BitXor, b, EXTRA) }
640 | a=bitwise_and '&' b=shift_expr { _PyAST_BinOp(a, BitAnd, b, EXTRA) }
643 | a=shift_expr '<<' b=sum { _PyAST_BinOp(a, LShift, b, EXTRA) }
644 | a=shift_expr '>>' b=sum { _PyAST_BinOp(a, RShift, b, EXTRA) }
648 | a=sum '+' b=term { _PyAST_BinOp(a, Add, b, EXTRA) }
649 | a=sum '-' b=term { _PyAST_BinOp(a, Sub, b, EXTRA) }
652 | a=term '*' b=factor { _PyAST_BinOp(a, Mult, b, EXTRA) }
653 | a=term '/' b=factor { _PyAST_BinOp(a, Div, b, EXTRA) }
654 | a=term '//' b=factor { _PyAST_BinOp(a, FloorDiv, b, EXTRA) }
655 | a=term '%' b=factor { _PyAST_BinOp(a, Mod, b, EXTRA) }
656 …' b=factor { CHECK_VERSION(expr_ty, 5, "The '@' operator is", _PyAST_BinOp(a, MatMult, b, EXTRA)) }
659 | '+' a=factor { _PyAST_UnaryOp(UAdd, a, EXTRA) }
660 | '-' a=factor { _PyAST_UnaryOp(USub, a, EXTRA) }
661 | '~' a=factor { _PyAST_UnaryOp(Invert, a, EXTRA) }
664 | a=await_primary '**' b=factor { _PyAST_BinOp(a, Pow, b, EXTRA) }
667 | AWAIT a=primary { CHECK_VERSION(expr_ty, 5, "Await expressions are", _PyAST_Await(a, EXTRA)) }
670 | a=primary '.' b=NAME { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }
671 … _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }
676 EXTRA) }
677 | a=primary '[' b=slices ']' { _PyAST_Subscript(a, b, Load, EXTRA) }
682 | a[asdl_expr_seq*]=','.slice+ [','] { _PyAST_Tuple(a, Load, EXTRA) }
684 … | a=[expression] ':' b=[expression] c=[':' d=[expression] { d }] { _PyAST_Slice(a, b, c, EXTRA) }
688 | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }
689 | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }
690 | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }
696 | '...' { _PyAST_Constant(Py_Ellipsis, NULL, EXTRA) }
700 | '[' a=[star_named_expressions] ']' { _PyAST_List(a, Load, EXTRA) }
702 | '[' a=named_expression b=for_if_clauses ']' { _PyAST_ListComp(a, b, EXTRA) }
706 _PyAST_Tuple(a, Load, EXTRA) }
711 …assignment_expression | expression !':=') b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }
713 set[expr_ty]: '{' a=star_named_expressions '}' { _PyAST_Set(a, EXTRA) }
715 | '{' a=named_expression b=for_if_clauses '}' { _PyAST_SetComp(a, b, EXTRA) }
722 EXTRA) }
726 | '{' a=kvpair b=for_if_clauses '}' { _PyAST_DictComp(a->key, a->value, b, EXTRA) }
743 | 'yield' 'from' a=expression { _PyAST_YieldFrom(a, EXTRA) }
744 | 'yield' a=[star_expressions] { _PyAST_Yield(a, EXTRA) }
751 _PyPegen_collect_call_seqs(p, a, b, EXTRA) }
755 EXTRA) }
762 | '*' a=expression { _PyAST_Starred(a, Load, EXTRA) }
766 … _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }
771 … _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }
772 …expression { _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(NULL, a, EXTRA)), 1) }
778 _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Store, EXTRA) }
785 _PyAST_Starred(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), Store, EXTRA) }
788 | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }
789 | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }
794 | '(' a=[star_targets_tuple_seq] ')' { _PyAST_Tuple(a, Store, EXTRA) }
795 | '[' a=[star_targets_list_seq] ']' { _PyAST_List(a, Store, EXTRA) }
802 | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }
803 | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }
807 | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Del, EXTRA) }
808 | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Del, EXTRA) }
813 | '(' a=[del_targets] ')' { _PyAST_Tuple(a, Del, EXTRA) }
814 | '[' a=[del_targets] ']' { _PyAST_List(a, Del, EXTRA) }
817 | a=t_primary '.' b=NAME &t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }
818 | a=t_primary '[' b=slices ']' &t_lookahead { _PyAST_Subscript(a, b, Load, EXTRA) }
820 … _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }
825 EXTRA) }
851 | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }