Skip to content

Commit 37ce0e4

Browse files
committed
Make generate_ast work on py3x
1 parent aab90dd commit 37ce0e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/generate_ast.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ def __init__(self):
3131
self._fields = []
3232

3333
def start_file(self):
34-
print '''# This is autogenerated code. DO NOT change this manually.
34+
print('''# This is autogenerated code. DO NOT change this manually.
3535
# Run scripts/generate_ast.py to generate this file.
3636
3737
3838
class Node(object):
39-
pass'''
39+
pass''')
4040

4141
def end_file(self):
4242
pass
4343

4444
def start_type(self, name):
4545
name = remap_type(name)
4646
parent_type = self._parent_types.get(name, 'Node')
47-
print '''
47+
print('''
4848
49-
class {name}({parent_type}):'''.format(name=name, parent_type=parent_type)
49+
class {name}({parent_type}):'''.format(name=name, parent_type=parent_type))
5050

5151
def field(self, type, name, nullable, plural):
5252
type = remap_type(type)

0 commit comments

Comments
 (0)