summaryrefslogtreecommitdiffstats
path: root/Tools/compiler
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-07-18 06:16:08 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-07-18 06:16:08 (GMT)
commit182b5aca27d376b08a2904bed42b751496f932f3 (patch)
treedf13115820dbc879c0fe2eae488c9f8c0215a7da /Tools/compiler
parente6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff)
downloadcpython-182b5aca27d376b08a2904bed42b751496f932f3.zip
cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz
cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Tools/compiler')
-rw-r--r--Tools/compiler/astgen.py4
-rw-r--r--Tools/compiler/compile.py2
-rwxr-xr-xTools/compiler/demo.py6
3 files changed, 6 insertions, 6 deletions
diff --git a/Tools/compiler/astgen.py b/Tools/compiler/astgen.py
index 90201d3..08d501b 100644
--- a/Tools/compiler/astgen.py
+++ b/Tools/compiler/astgen.py
@@ -88,7 +88,7 @@ class NodeInfo:
self.args = self.args.replace('*', '')
self.args = self.args.replace('!', '')
self.args = self.args.replace('&', '')
-
+
return d
def gen_source(self):
@@ -158,7 +158,7 @@ class NodeInfo:
template = " nodes.%s(%sself.%s%s)"
for name in self.argnames:
if self.argprops[name] == P_NONE:
- tmp = (" if self.%s is not None:"
+ tmp = (" if self.%s is not None:"
" nodes.append(self.%s)")
print >> buf, tmp % (name, name)
elif self.argprops[name] == P_NESTED:
diff --git a/Tools/compiler/compile.py b/Tools/compiler/compile.py
index c1483c5..9d50425 100644
--- a/Tools/compiler/compile.py
+++ b/Tools/compiler/compile.py
@@ -39,7 +39,7 @@ def main():
filename + ".prof")
else:
compileFile(filename, DISPLAY)
-
+
except SyntaxError, err:
print err
if err.lineno is not None:
diff --git a/Tools/compiler/demo.py b/Tools/compiler/demo.py
index e9ada5a..61c54ee 100755
--- a/Tools/compiler/demo.py
+++ b/Tools/compiler/demo.py
@@ -14,7 +14,7 @@ class MethodFinder:
Each visit method takes two arguments, the node and its current
scope. The scope is the name of the current class or None.
"""
-
+
def visitClass(self, node, scope=None):
self.visit(node.code, node.name)
@@ -22,7 +22,7 @@ class MethodFinder:
if scope is not None:
print "%s.%s" % (scope, node.name)
self.visit(node.code, None)
-
+
def main(files):
mf = MethodFinder()
for file in files:
@@ -34,5 +34,5 @@ def main(files):
if __name__ == "__main__":
import sys
-
+
main(sys.argv[1:])