Home
last modified time | relevance | path

Searched refs:TYPE_COMMENT (Results 1 – 10 of 10) sorted by relevance

/external/python/cpython3/Grammar/
DGrammar12 # NB: due to the way TYPE_COMMENT is tokenized it will always be followed by a NEWLINE
22 funcdef: 'def' NAME parameters ['->' test] ':' [TYPE_COMMENT] func_body_suite
28 # arguments = argument (',' [TYPE_COMMENT] argument)*
30 # kwargs = '**' tfpdef [','] [TYPE_COMMENT]
32 # kwonly_kwargs = (',' [TYPE_COMMENT] argument)* (TYPE_COMMENT | [',' [TYPE_COMMENT] [kwargs]])
34 # poskeyword_args_kwonly_kwargs = arguments ( TYPE_COMMENT | [',' [TYPE_COMMENT] [args_kwonly_k…
36 # typedarglist = (arguments ',' [TYPE_COMMENT] '/' [',' [[TYPE_COMMENT] typedargslist_no_posonl…
41 …(tfpdef ['=' test] (',' [TYPE_COMMENT] tfpdef ['=' test])* ',' [TYPE_COMMENT] '/' [',' [ [TYPE_COM…
42 ',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] [
43 …'*' [tfpdef] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] ['**' tfp…
[all …]
Dpython.gram94 | a=(z=star_targets '=' { z })+ b=(yield_expr | star_expressions) !'=' tc=[TYPE_COMMENT] {
169 … | 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {
171 …| ASYNC 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_blo…
178 | 'with' a=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {
182 | ASYNC 'with' a=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {
223 | NEWLINE t=TYPE_COMMENT &(NEWLINE INDENT) { t } # Must be followed by indented block
225 | TYPE_COMMENT
274 | a=param ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }
275 | a=param tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }
277 | a=param c=default ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }
[all …]
DTokens61 TYPE_COMMENT
/external/python/cpython3/Doc/library/
Dtoken.rst72 .. data:: TYPE_COMMENT
91 Added :data:`TYPE_COMMENT`, :data:`TYPE_IGNORE`, :data:`COLONEQUAL`.
Dtoken-list.inc212 .. data:: TYPE_COMMENT
/external/python/cpython3/Include/
Dtoken.h71 #define TYPE_COMMENT 58 macro
/external/python/cpython3/Lib/
Dtoken.py64 TYPE_COMMENT = 58 variable
/external/python/cpython3/Python/
Dast.c745 if (TYPE(CHILD(n, 1)) == TYPE_COMMENT) in num_stmts()
1395 case TYPE_COMMENT: in handle_keywordonly_args()
1600 || TYPE(CHILD(n, i+1)) == TYPE_COMMENT))) { in ast_for_arguments()
1610 if (i < NCH(n) && TYPE(CHILD(n, i)) == TYPE_COMMENT) { in ast_for_arguments()
1630 if (i < NCH(n) && TYPE(CHILD(n, i)) == TYPE_COMMENT) { in ast_for_arguments()
1657 case TYPE_COMMENT: in ast_for_arguments()
1749 if (TYPE(CHILD(n, name_i + 3)) == TYPE_COMMENT) { in ast_for_funcdef_impl()
1764 if (TYPE(tc) == TYPE_COMMENT) { in ast_for_funcdef_impl()
3318 has_type_comment = TYPE(CHILD(n, num - 1)) == TYPE_COMMENT; in ast_for_expr_stmt()
3811 if (TYPE(CHILD(n, 1)) == TYPE_COMMENT) { in ast_for_suite()
[all …]
/external/python/cpython3/Parser/
Dtokenizer.c1370 return TYPE_COMMENT; in tok_get()
/external/python/cpython3/Parser/pegen/
Dparse.c2145 (tc = _PyPegen_expect_token(p, TYPE_COMMENT), 1) // TYPE_COMMENT? in assignment_rule()
3938 (tc = _PyPegen_expect_token(p, TYPE_COMMENT), 1) // TYPE_COMMENT? in for_stmt_rule()
4002 (tc = _PyPegen_expect_token(p, TYPE_COMMENT), 1) // TYPE_COMMENT? in for_stmt_rule()
4154 (tc = _PyPegen_expect_token(p, TYPE_COMMENT), 1) // TYPE_COMMENT? in with_stmt_rule()
4257 (tc = _PyPegen_expect_token(p, TYPE_COMMENT), 1) // TYPE_COMMENT? in with_stmt_rule()
5053 (t = _PyPegen_expect_token(p, TYPE_COMMENT)) // token='TYPE_COMMENT' in func_type_comment_rule()
5098 (type_comment_var = _PyPegen_expect_token(p, TYPE_COMMENT)) // token='TYPE_COMMENT' in func_type_comment_rule()
5695 (tc = _PyPegen_expect_token(p, TYPE_COMMENT), 1) // TYPE_COMMENT? in param_no_default_rule()
5722 (tc = _PyPegen_expect_token(p, TYPE_COMMENT), 1) // TYPE_COMMENT? in param_no_default_rule()
5774 (tc = _PyPegen_expect_token(p, TYPE_COMMENT), 1) // TYPE_COMMENT? in param_with_default_rule()
[all …]