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
33c2a627
Kaydet (Commit)
33c2a627
authored
Agu 27, 2001
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add -c option to continue if one file has a SyntaxError
üst
6d8c1aab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
compile.py
Tools/compiler/compile.py
+15
-2
No files found.
Tools/compiler/compile.py
Dosyayı görüntüle @
33c2a627
...
...
@@ -3,10 +3,13 @@ import getopt
from
compiler
import
compile
,
visitor
##import profile
def
main
():
VERBOSE
=
0
DISPLAY
=
0
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'vqd'
)
CONTINUE
=
0
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'vqdc'
)
for
k
,
v
in
opts
:
if
k
==
'-v'
:
VERBOSE
=
1
...
...
@@ -19,13 +22,23 @@ def main():
sys
.
stdout
=
f
if
k
==
'-d'
:
DISPLAY
=
1
if
k
==
'-c'
:
CONTINUE
=
1
if
not
args
:
print
"no files to compile"
else
:
for
filename
in
args
:
if
VERBOSE
:
print
filename
compile
(
filename
,
DISPLAY
)
try
:
compile
(
filename
,
DISPLAY
)
## profile.run('compile(%s, %s)' % (`filename`, `DISPLAY`),
## filename + ".prof")
except
SyntaxError
,
err
:
print
err
print
err
.
lineno
if
not
CONTINUE
:
sys
.
exit
(
-
1
)
if
__name__
==
"__main__"
:
main
()
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