ports/devel/libgraphqlparser/files/patch-ast-c_visitor_impl.py
Sunpoet Po-Chuan Hsieh f0508af695 Add libgraphqlparser 0.7.0
libgraphqlparser is a parser for GraphQL, a query language for describing data
requirements on complex application data models, implemented in C++11. It can be
used on its own in C++ code (or in C code via the pure C API defined in the c
subdirectory), or you can use it as the basis for an extension module for your
favorite programming language instead of writing your own parser from scratch.

WWW: https://github.com/graphql/libgraphqlparser
2020-05-03 20:46:12 +00:00

22 lines
741 B
Python

--- ast/c_visitor_impl.py.orig 2017-10-16 21:39:41 UTC
+++ ast/c_visitor_impl.py
@@ -16,8 +16,8 @@ class Printer(object):
self._types = []
def start_file(self):
- print C_LICENSE_COMMENT + '/** @generated */'
- print '#define FOR_EACH_CONCRETE_TYPE(MACRO) \\'
+ print(C_LICENSE_COMMENT + '/** @generated */')
+ print('#define FOR_EACH_CONCRETE_TYPE(MACRO) \\')
def start_type(self, name):
self._types.append(name)
@@ -29,7 +29,7 @@ class Printer(object):
pass
def end_file(self):
- print ' \\\n'.join('MACRO(%s, %s)' % (name, snake(name)) for name in self._types)
+ print(' \\\n'.join('MACRO(%s, %s)' % (name, snake(name)) for name in self._types))
def start_union(self, name):
pass