mirror of
https://git.freebsd.org/ports.git
synced 2025-06-06 21:30:31 -04:00
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
52 lines
1.2 KiB
Python
52 lines
1.2 KiB
Python
--- ast/cxx_visitor.py.orig 2017-10-16 21:39:41 UTC
|
|
+++ ast/cxx_visitor.py
|
|
@@ -13,7 +13,7 @@ class Printer(object):
|
|
pass
|
|
|
|
def start_file(self):
|
|
- print C_LICENSE_COMMENT + '''/** @generated */
|
|
+ print(C_LICENSE_COMMENT + '''/** @generated */
|
|
|
|
#pragma once
|
|
|
|
@@ -27,28 +27,28 @@ namespace visitor {
|
|
class AstVisitor {
|
|
public:
|
|
virtual ~AstVisitor() {}
|
|
-'''
|
|
+''')
|
|
|
|
def end_file(self):
|
|
- print '};' # end AstVisitor
|
|
- print
|
|
- print '}'
|
|
- print '}'
|
|
- print '}'
|
|
- print '}'
|
|
+ print('};') # end AstVisitor
|
|
+ print()
|
|
+ print('}')
|
|
+ print('}')
|
|
+ print('}')
|
|
+ print('}')
|
|
|
|
def start_type(self, name):
|
|
titleName = title(name)
|
|
camelName = camel(titleName)
|
|
- print ' virtual bool visit%s(const %s &%s) { return true; }' % (
|
|
+ print(' virtual bool visit%s(const %s &%s) { return true; }' % (
|
|
titleName,
|
|
titleName,
|
|
- camelName)
|
|
- print ' virtual void endVisit%s(const %s &%s) { }' % (
|
|
+ camelName))
|
|
+ print(' virtual void endVisit%s(const %s &%s) { }' % (
|
|
titleName,
|
|
titleName,
|
|
- camelName)
|
|
- print
|
|
+ camelName))
|
|
+ print()
|
|
|
|
def end_type(self, name):
|
|
pass
|