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
9c7c6bec
Kaydet (Commit)
9c7c6bec
authored
Şub 19, 1998
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up name->name conversion a little, *make sure it happens in all the
right places*!
üst
414f2611
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
24 deletions
+36
-24
partparse.py
Doc/partparse.py
+18
-12
partparse.py
Doc/tools/partparse.py
+18
-12
No files found.
Doc/partparse.py
Dosyayı görüntüle @
9c7c6bec
...
@@ -1013,6 +1013,18 @@ itemizesymbols = ['bullet', 'minus', 'dots']
...
@@ -1013,6 +1013,18 @@ itemizesymbols = ['bullet', 'minus', 'dots']
# same for enumerate
# same for enumerate
enumeratesymbols
=
[
'1'
,
'A'
,
'a'
]
enumeratesymbols
=
[
'1'
,
'A'
,
'a'
]
d
=
{}
for
name
in
(
'url'
,
'module'
,
'function'
,
'cfunction'
,
'keyword'
,
'method'
,
'exception'
,
'constant'
,
'email'
,
'class'
,
'member'
,
'cdata'
,
'ctype'
,
'member'
):
d
[
name
]
=
'code'
d
[
'program'
]
=
'strong'
d
[
'sectcode'
]
=
'code'
convertible_csname
=
d
.
has_key
conversion
=
d
.
get
del
d
,
name
##
##
## \begin{ {func,data,exc}desc }{name}...
## \begin{ {func,data,exc}desc }{name}...
## the resulting texi-code is dependent on the contents of indexsubitem
## the resulting texi-code is dependent on the contents of indexsubitem
...
@@ -1391,6 +1403,8 @@ def changeit(buf, pp):
...
@@ -1391,6 +1403,8 @@ def changeit(buf, pp):
if
pp
[
i
]
.
chtype
!=
chunk_type
[
PLAIN
]:
if
pp
[
i
]
.
chtype
!=
chunk_type
[
PLAIN
]:
raise
error
,
'Sorry, expected plain text argument'
raise
error
,
'Sorry, expected plain text argument'
hist
.
itemargmacro
=
s
(
buf
,
pp
[
i
]
.
data
)
hist
.
itemargmacro
=
s
(
buf
,
pp
[
i
]
.
data
)
if
convertible_csname
(
hist
.
itemargmacro
):
hist
.
itemargmacro
=
conversion
(
hist
.
itemargmacro
)
del
pp
[
i
:
newi
]
del
pp
[
i
:
newi
]
length
=
length
-
(
newi
-
i
)
length
=
length
-
(
newi
-
i
)
...
@@ -1593,9 +1607,6 @@ def changeit(buf, pp):
...
@@ -1593,9 +1607,6 @@ def changeit(buf, pp):
ch
.
chtype
=
chunk_type
[
PLAIN
]
ch
.
chtype
=
chunk_type
[
PLAIN
]
ch
.
data
=
release_version
ch
.
data
=
release_version
elif
s_buf_data
==
'program'
:
ch
.
data
=
"strong"
elif
s_buf_data
==
'item'
:
elif
s_buf_data
==
'item'
:
ch
.
chtype
=
chunk_type
[
CSLINE
]
ch
.
chtype
=
chunk_type
[
CSLINE
]
length
,
newi
=
getoptarg
(
length
,
buf
,
pp
,
i
)
length
,
newi
=
getoptarg
(
length
,
buf
,
pp
,
i
)
...
@@ -1641,10 +1652,10 @@ def changeit(buf, pp):
...
@@ -1641,10 +1652,10 @@ def changeit(buf, pp):
if
command
in
regindices
:
if
command
in
regindices
:
arg
=
[
chunk
(
CSNAME
,
ch
.
where
,
't'
),
arg
=
[
chunk
(
CSNAME
,
ch
.
where
,
't'
),
chunk
(
GROUP
,
ch
.
where
,
arg
)]
chunk
(
GROUP
,
ch
.
where
,
arg
)]
else
:
else
:
cat_arg
=
[
chunk
(
CSNAME
,
ch
.
where
,
'r'
),
cat_arg
=
[
chunk
(
CSNAME
,
ch
.
where
,
'r'
),
chunk
(
GROUP
,
ch
.
where
,
cat_arg
)]
chunk
(
GROUP
,
ch
.
where
,
cat_arg
)]
ingroupch
=
arg
+
\
ingroupch
=
arg
+
\
[
chunk
(
PLAIN
,
ch
.
where
,
' '
)]
+
\
[
chunk
(
PLAIN
,
ch
.
where
,
' '
)]
+
\
...
@@ -1868,9 +1879,6 @@ def changeit(buf, pp):
...
@@ -1868,9 +1879,6 @@ def changeit(buf, pp):
pp
.
insert
(
i
,
chunk
(
GROUP
,
ch
.
where
,
ingroupch
))
pp
.
insert
(
i
,
chunk
(
GROUP
,
ch
.
where
,
ingroupch
))
length
,
i
=
length
+
1
,
i
+
1
length
,
i
=
length
+
1
,
i
+
1
elif
s_buf_data
==
'sectcode'
:
ch
.
data
=
'code'
elif
s_buf_data
in
(
'stmodindex'
,
'refstmodindex'
):
elif
s_buf_data
in
(
'stmodindex'
,
'refstmodindex'
):
ch
.
chtype
=
chunk_type
[
CSLINE
]
ch
.
chtype
=
chunk_type
[
CSLINE
]
# use the program index as module index
# use the program index as module index
...
@@ -2086,10 +2094,8 @@ def changeit(buf, pp):
...
@@ -2086,10 +2094,8 @@ def changeit(buf, pp):
elif
s_buf_data
in
(
'noindent'
,
'indexsubitem'
,
'footnote'
):
elif
s_buf_data
in
(
'noindent'
,
'indexsubitem'
,
'footnote'
):
pass
pass
elif
s_buf_data
in
(
'url'
,
'module'
,
'function'
,
'cfunction'
,
elif
convertible_csname
(
s_buf_data
):
'keyword'
,
'method'
,
'exception'
,
'constant'
,
ch
.
data
=
conversion
(
s_buf_data
)
'email'
,
'class'
,
'member'
,
'cdata'
,
'ctype'
):
ch
.
data
=
"code"
elif
s_buf_data
==
'label'
:
elif
s_buf_data
==
'label'
:
name
=
s
(
buf
,
pp
[
i
]
.
data
[
0
]
.
data
)
name
=
s
(
buf
,
pp
[
i
]
.
data
[
0
]
.
data
)
...
...
Doc/tools/partparse.py
Dosyayı görüntüle @
9c7c6bec
...
@@ -1013,6 +1013,18 @@ itemizesymbols = ['bullet', 'minus', 'dots']
...
@@ -1013,6 +1013,18 @@ itemizesymbols = ['bullet', 'minus', 'dots']
# same for enumerate
# same for enumerate
enumeratesymbols
=
[
'1'
,
'A'
,
'a'
]
enumeratesymbols
=
[
'1'
,
'A'
,
'a'
]
d
=
{}
for
name
in
(
'url'
,
'module'
,
'function'
,
'cfunction'
,
'keyword'
,
'method'
,
'exception'
,
'constant'
,
'email'
,
'class'
,
'member'
,
'cdata'
,
'ctype'
,
'member'
):
d
[
name
]
=
'code'
d
[
'program'
]
=
'strong'
d
[
'sectcode'
]
=
'code'
convertible_csname
=
d
.
has_key
conversion
=
d
.
get
del
d
,
name
##
##
## \begin{ {func,data,exc}desc }{name}...
## \begin{ {func,data,exc}desc }{name}...
## the resulting texi-code is dependent on the contents of indexsubitem
## the resulting texi-code is dependent on the contents of indexsubitem
...
@@ -1391,6 +1403,8 @@ def changeit(buf, pp):
...
@@ -1391,6 +1403,8 @@ def changeit(buf, pp):
if
pp
[
i
]
.
chtype
!=
chunk_type
[
PLAIN
]:
if
pp
[
i
]
.
chtype
!=
chunk_type
[
PLAIN
]:
raise
error
,
'Sorry, expected plain text argument'
raise
error
,
'Sorry, expected plain text argument'
hist
.
itemargmacro
=
s
(
buf
,
pp
[
i
]
.
data
)
hist
.
itemargmacro
=
s
(
buf
,
pp
[
i
]
.
data
)
if
convertible_csname
(
hist
.
itemargmacro
):
hist
.
itemargmacro
=
conversion
(
hist
.
itemargmacro
)
del
pp
[
i
:
newi
]
del
pp
[
i
:
newi
]
length
=
length
-
(
newi
-
i
)
length
=
length
-
(
newi
-
i
)
...
@@ -1593,9 +1607,6 @@ def changeit(buf, pp):
...
@@ -1593,9 +1607,6 @@ def changeit(buf, pp):
ch
.
chtype
=
chunk_type
[
PLAIN
]
ch
.
chtype
=
chunk_type
[
PLAIN
]
ch
.
data
=
release_version
ch
.
data
=
release_version
elif
s_buf_data
==
'program'
:
ch
.
data
=
"strong"
elif
s_buf_data
==
'item'
:
elif
s_buf_data
==
'item'
:
ch
.
chtype
=
chunk_type
[
CSLINE
]
ch
.
chtype
=
chunk_type
[
CSLINE
]
length
,
newi
=
getoptarg
(
length
,
buf
,
pp
,
i
)
length
,
newi
=
getoptarg
(
length
,
buf
,
pp
,
i
)
...
@@ -1641,10 +1652,10 @@ def changeit(buf, pp):
...
@@ -1641,10 +1652,10 @@ def changeit(buf, pp):
if
command
in
regindices
:
if
command
in
regindices
:
arg
=
[
chunk
(
CSNAME
,
ch
.
where
,
't'
),
arg
=
[
chunk
(
CSNAME
,
ch
.
where
,
't'
),
chunk
(
GROUP
,
ch
.
where
,
arg
)]
chunk
(
GROUP
,
ch
.
where
,
arg
)]
else
:
else
:
cat_arg
=
[
chunk
(
CSNAME
,
ch
.
where
,
'r'
),
cat_arg
=
[
chunk
(
CSNAME
,
ch
.
where
,
'r'
),
chunk
(
GROUP
,
ch
.
where
,
cat_arg
)]
chunk
(
GROUP
,
ch
.
where
,
cat_arg
)]
ingroupch
=
arg
+
\
ingroupch
=
arg
+
\
[
chunk
(
PLAIN
,
ch
.
where
,
' '
)]
+
\
[
chunk
(
PLAIN
,
ch
.
where
,
' '
)]
+
\
...
@@ -1868,9 +1879,6 @@ def changeit(buf, pp):
...
@@ -1868,9 +1879,6 @@ def changeit(buf, pp):
pp
.
insert
(
i
,
chunk
(
GROUP
,
ch
.
where
,
ingroupch
))
pp
.
insert
(
i
,
chunk
(
GROUP
,
ch
.
where
,
ingroupch
))
length
,
i
=
length
+
1
,
i
+
1
length
,
i
=
length
+
1
,
i
+
1
elif
s_buf_data
==
'sectcode'
:
ch
.
data
=
'code'
elif
s_buf_data
in
(
'stmodindex'
,
'refstmodindex'
):
elif
s_buf_data
in
(
'stmodindex'
,
'refstmodindex'
):
ch
.
chtype
=
chunk_type
[
CSLINE
]
ch
.
chtype
=
chunk_type
[
CSLINE
]
# use the program index as module index
# use the program index as module index
...
@@ -2086,10 +2094,8 @@ def changeit(buf, pp):
...
@@ -2086,10 +2094,8 @@ def changeit(buf, pp):
elif
s_buf_data
in
(
'noindent'
,
'indexsubitem'
,
'footnote'
):
elif
s_buf_data
in
(
'noindent'
,
'indexsubitem'
,
'footnote'
):
pass
pass
elif
s_buf_data
in
(
'url'
,
'module'
,
'function'
,
'cfunction'
,
elif
convertible_csname
(
s_buf_data
):
'keyword'
,
'method'
,
'exception'
,
'constant'
,
ch
.
data
=
conversion
(
s_buf_data
)
'email'
,
'class'
,
'member'
,
'cdata'
,
'ctype'
):
ch
.
data
=
"code"
elif
s_buf_data
==
'label'
:
elif
s_buf_data
==
'label'
:
name
=
s
(
buf
,
pp
[
i
]
.
data
[
0
]
.
data
)
name
=
s
(
buf
,
pp
[
i
]
.
data
[
0
]
.
data
)
...
...
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