Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
85bf3bb4
Kaydet (Commit)
85bf3bb4
authored
Agu 23, 2000
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
validate_listmaker(): Revise to match Skip's latest changes to the
Grammar file. This makes the test suite pass once again.
üst
03c06ee7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
parsermodule.c
Modules/parsermodule.c
+12
-6
No files found.
Modules/parsermodule.c
Dosyayı görüntüle @
85bf3bb4
...
...
@@ -2193,6 +2193,9 @@ validate_atom(node *tree)
}
/* listmaker:
* test ( list_for | (',' test)* [','] )
*/
static
int
validate_listmaker
(
node
*
tree
)
{
...
...
@@ -2207,19 +2210,22 @@ validate_listmaker(node *tree)
/*
* list_iter | (',' test)* [',']
*/
if
(
nch
==
2
&&
TYPE
(
CHILD
(
tree
,
1
))
==
list_
ite
r
)
ok
=
validate_list_
ite
r
(
CHILD
(
tree
,
1
));
if
(
nch
==
2
&&
TYPE
(
CHILD
(
tree
,
1
))
==
list_
fo
r
)
ok
=
validate_list_
fo
r
(
CHILD
(
tree
,
1
));
else
{
/* (',' test)* [','] */
int
i
=
1
;
while
(
ok
&&
nch
-
i
>=
2
)
{
ok
=
(
validate_comma
(
CHILD
(
tree
,
i
))
&&
validate_test
(
CHILD
(
tree
,
i
+
1
)));
if
(
ok
)
i
+=
2
;
i
+=
2
;
}
if
(
ok
&&
i
==
nch
-
1
)
ok
=
validate_comma
(
CHILD
(
tree
,
i
));
else
if
(
i
!=
nch
)
{
ok
=
0
;
err_string
(
"illegal trailing nodes for listmaker"
);
}
if
(
ok
&&
nch
-
i
)
ok
=
validate_comma
(
CHILD
(
tree
,
nch
-
1
));
}
return
ok
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment