@@ -1820,8 +1820,7 @@ ast_for_async_funcdef(struct compiling *c, const node *n, asdl_seq *decorator_se
1820
1820
{
1821
1821
/* async_funcdef: 'async' funcdef */
1822
1822
REQ (n , async_funcdef );
1823
- REQ (CHILD (n , 0 ), NAME );
1824
- assert (strcmp (STR (CHILD (n , 0 )), "async" ) == 0 );
1823
+ REQ (CHILD (n , 0 ), ASYNC );
1825
1824
REQ (CHILD (n , 1 ), funcdef );
1826
1825
1827
1826
return ast_for_funcdef_impl (c , n , decorator_seq ,
@@ -1842,8 +1841,7 @@ ast_for_async_stmt(struct compiling *c, const node *n)
1842
1841
{
1843
1842
/* async_stmt: 'async' (funcdef | with_stmt | for_stmt) */
1844
1843
REQ (n , async_stmt );
1845
- REQ (CHILD (n , 0 ), NAME );
1846
- assert (strcmp (STR (CHILD (n , 0 )), "async" ) == 0 );
1844
+ REQ (CHILD (n , 0 ), ASYNC );
1847
1845
1848
1846
switch (TYPE (CHILD (n , 1 ))) {
1849
1847
case funcdef :
@@ -1961,8 +1959,7 @@ count_comp_fors(struct compiling *c, const node *n)
1961
1959
n_fors ++ ;
1962
1960
REQ (n , comp_for );
1963
1961
if (NCH (n ) == 2 ) {
1964
- REQ (CHILD (n , 0 ), NAME );
1965
- assert (strcmp (STR (CHILD (n , 0 )), "async" ) == 0 );
1962
+ REQ (CHILD (n , 0 ), ASYNC );
1966
1963
n = CHILD (n , 1 );
1967
1964
}
1968
1965
else if (NCH (n ) == 1 ) {
@@ -2047,8 +2044,7 @@ ast_for_comprehension(struct compiling *c, const node *n)
2047
2044
2048
2045
if (NCH (n ) == 2 ) {
2049
2046
is_async = 1 ;
2050
- REQ (CHILD (n , 0 ), NAME );
2051
- assert (strcmp (STR (CHILD (n , 0 )), "async" ) == 0 );
2047
+ REQ (CHILD (n , 0 ), ASYNC );
2052
2048
sync_n = CHILD (n , 1 );
2053
2049
}
2054
2050
else {
0 commit comments