diff --git a/.gitignore b/.gitignore index 7bbc71c..d7f493d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.idea + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2b4ec00 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: python +sudo: false +services: + - docker +cache: + directories: + - $HOME/.cache/pip +python: + - "3.4" + - "3.5" + - "3.6" +install: + - pip install --upgrade pip + - pip install grpcio + - CC=gcc-5 CXX=g++-5 pip install -e . +script: + - python3 -m unittest discover . +notifications: + email: false \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..94649c2 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +PYTHON ?= python3 + +makefile_dir := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + +all: bblfsh/github/com/gogo/protobuf/gogoproto/gogo_pb2.py \ + bblfsh/github/com/bblfsh/sdk/uast/generated_pb2.py \ + bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2_*.py \ + bblfsh/github/__init__.py \ + bblfsh/github/com/__init__.py \ + bblfsh/github/com/gogo/__init__.py \ + bblfsh/github/com/gogo/protobuf/__init__.py \ + bblfsh/github/com/gogo/protobuf/gogoproto/__init__.py \ + bblfsh/github/com/bblfsh/__init__.py \ + bblfsh/github/com/bblfsh/sdk/__init__.py \ + bblfsh/github/com/bblfsh/sdk/uast/__init__.py \ + bblfsh/github/com/bblfsh/sdk/protocol/__init__.py + +bblfsh/github/com/gogo/protobuf/gogoproto/gogo_pb2.py: github.com/gogo/protobuf/gogoproto/gogo.proto + protoc --python_out bblfsh github.com/gogo/protobuf/gogoproto/gogo.proto + +bblfsh/github/com/bblfsh/sdk/uast/generated_pb2.py: github.com/bblfsh/sdk/uast/generated.proto + protoc --python_out bblfsh github.com/bblfsh/sdk/uast/generated.proto + +bblfsh/github/com/bblfsh/sdk/protocol: + @mkdir -p $@ + +bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2_*.py: \ + bblfsh/github/com/bblfsh/sdk/protocol github.com/bblfsh/sdk/protocol/generated.proto + $(PYTHON) -m grpc.tools.protoc --python_out=bblfsh/github/com/bblfsh/sdk/protocol \ + --grpc_python_out=bblfsh/github/com/bblfsh/sdk/protocol \ + -I github.com/bblfsh/sdk/protocol -I $(makefile_dir) \ + github.com/bblfsh/sdk/protocol/generated.proto + +%/__init__.py: + @touch $@ diff --git a/README.md b/README.md new file mode 100644 index 0000000..14b2673 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +## Babelfish Python client + +This a pure Python implementation of querying [Babelfish](https://doc.bblf.sh/) server. + +### Usage + +API +``` +from bblfsh import BblfshClient + +client = BblfshClient("0.0.0.0:9432") +print(client.parse_uast("/path/to/file.py")) +``` + +Command line +``` +python3 -m bblfsh -f file.py +``` + +### Installation + +``` +pip3 install bblfsh +``` + +It is possible to regenerate the gRPC/protobuf bindings by executing `make`. + +### License + +Apache 2.0. diff --git a/bblfsh/__init__.py b/bblfsh/__init__.py new file mode 100644 index 0000000..3f1b7ee --- /dev/null +++ b/bblfsh/__init__.py @@ -0,0 +1 @@ +from bblfsh.client import BblfshClient diff --git a/bblfsh/__main__.py b/bblfsh/__main__.py new file mode 100644 index 0000000..eb320a4 --- /dev/null +++ b/bblfsh/__main__.py @@ -0,0 +1,34 @@ +import argparse +import sys + +from bblfsh.client import BblfshClient +from bblfsh.launcher import ensure_bblfsh_is_running + + +def setup(): + parser = argparse.ArgumentParser( + description="Query for a UAST to Babelfish and dump it to stdout." + ) + parser.add_argument("-e", "--endpoint", default="0.0.0.0:9432", + help="bblfsh gRPC endpoint.") + parser.add_argument("-f", "--file", required=True, + help="File to parse.") + parser.add_argument("-l", "--language", default=None, + help="File's language. The default is to autodetect.") + parser.add_argument("--disable-bblfsh-autorun", action="store_true", + help="Do not automatically launch Babelfish server " + "if it is not running.") + args = parser.parse_args() + return args + + +def main(): + args = setup() + if not args.disable_bblfsh_autorun: + ensure_bblfsh_is_running() + client = BblfshClient(args.endpoint) + print(client.parse_uast(args.file, args.language)) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/bblfsh/client.py b/bblfsh/client.py new file mode 100644 index 0000000..fd0a5e9 --- /dev/null +++ b/bblfsh/client.py @@ -0,0 +1,64 @@ +import os +import sys + +import grpc + +# The following two insertions fix the broken pb import paths +sys.path.insert(0, os.path.join(os.path.dirname(__file__), + "github/com/bblfsh/sdk/protocol")) +sys.path.insert(0, os.path.dirname(__file__)) +from bblfsh.github.com.bblfsh.sdk.protocol.generated_pb2 import ParseUASTRequest +from bblfsh.github.com.bblfsh.sdk.protocol.generated_pb2_grpc import ProtocolServiceStub + + +class BblfshClient(object): + """ + Babelfish gRPC client. Currently it is only capable of fetching UASTs. + """ + + def __init__(self, endpoint): + """ + Initializes a new instance of BblfshClient. + + :param endpoint: The address of the Babelfish server, \ + for example "0.0.0.0:9432" + :type endpoint: str + """ + self._channel = grpc.insecure_channel(endpoint) + self._stub = ProtocolServiceStub(self._channel) + + def parse_uast(self, filename, language=None, contents=None): + """ + Queries the Babelfish server and receives the UAST for the specified + file. + + :param filename: The path to the file. Can be arbitrary if contents \ + is not None. + :param language: The programming language of the file. Refer to \ + https://doc.bblf.sh/languages.html for the list of \ + currently supported languages. None means autodetect. + :param contents: The contents of the file. IF None, it is read from \ + filename. + :type filename: str + :type language: str + :type contents: str + :return: UAST object. + """ + if contents is None: + with open(filename) as fin: + contents = fin.read() + request = ParseUASTRequest(filename=os.path.basename(filename), + content=contents, + language=self._scramble_language(language)) + response = self._stub.ParseUAST(request) + return response + + @staticmethod + def _scramble_language(lang): + if lang is None: + return None + lang = lang.lower() + lang = lang.replace(" ", "-") + lang = lang.replace("+", "p") + lang = lang.replace("#", "sharp") + return lang diff --git a/bblfsh/github/__init__.py b/bblfsh/github/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bblfsh/github/com/__init__.py b/bblfsh/github/com/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bblfsh/github/com/bblfsh/__init__.py b/bblfsh/github/com/bblfsh/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bblfsh/github/com/bblfsh/sdk/__init__.py b/bblfsh/github/com/bblfsh/sdk/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bblfsh/github/com/bblfsh/sdk/protocol/__init__.py b/bblfsh/github/com/bblfsh/sdk/protocol/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2.py b/bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2.py new file mode 100644 index 0000000..cbe04b9 --- /dev/null +++ b/bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2.py @@ -0,0 +1,300 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: generated.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 +from github.com.bblfsh.sdk.uast import generated_pb2 as github_dot_com_dot_bblfsh_dot_sdk_dot_uast_dot_generated__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='generated.proto', + package='github.com.bblfsh.sdk.protocol', + syntax='proto3', + serialized_pb=_b('\n\x0fgenerated.proto\x12\x1egithub.com.bblfsh.sdk.protocol\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\x1a*github.com/bblfsh/sdk/uast/generated.proto\"Q\n\x10ParseUASTRequest\x12\x10\n\x08\x66ilename\x18\x01 \x01(\t\x12\x10\n\x08language\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t:\x08\x88\xa0\x1f\x00\xf0\xa1\x1f\x00\"\x9f\x01\n\x11ParseUASTResponse\x12\x36\n\x06status\x18\x01 \x01(\x0e\x32&.github.com.bblfsh.sdk.protocol.Status\x12\x0e\n\x06\x65rrors\x18\x02 \x03(\t\x12\x38\n\x04uast\x18\x03 \x01(\x0b\x32 .github.com.bblfsh.sdk.uast.NodeB\x08\xe2\xde\x1f\x04UAST:\x08\x88\xa0\x1f\x00\xf0\xa1\x1f\x00*R\n\x06Status\x12\x0e\n\x02OK\x10\x00\x1a\x06\x8a\x9d \x02Ok\x12\x14\n\x05\x45RROR\x10\x01\x1a\t\x8a\x9d \x05\x45rror\x12\x14\n\x05\x46\x41TAL\x10\x02\x1a\t\x8a\x9d \x05\x46\x61tal\x1a\x0c\xc0\xa4\x1e\x00\x88\xa3\x1e\x00\xa8\xa4\x1e\x00\x32\x83\x01\n\x0fProtocolService\x12p\n\tParseUAST\x12\x30.github.com.bblfsh.sdk.protocol.ParseUASTRequest\x1a\x31.github.com.bblfsh.sdk.protocol.ParseUASTResponseB\x12Z\x08protocol\xa0\xe3\x1e\x01\xe0\xe2\x1e\x00\x62\x06proto3') + , + dependencies=[github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,github_dot_com_dot_bblfsh_dot_sdk_dot_uast_dot_generated__pb2.DESCRIPTOR,]) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +_STATUS = _descriptor.EnumDescriptor( + name='Status', + full_name='github.com.bblfsh.sdk.protocol.Status', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='OK', index=0, number=0, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \002Ok')), + type=None), + _descriptor.EnumValueDescriptor( + name='ERROR', index=1, number=1, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Error')), + type=None), + _descriptor.EnumValueDescriptor( + name='FATAL', index=2, number=2, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Fatal')), + type=None), + ], + containing_type=None, + options=_descriptor._ParseOptions(descriptor_pb2.EnumOptions(), _b('\300\244\036\000\210\243\036\000\250\244\036\000')), + serialized_start=387, + serialized_end=469, +) +_sym_db.RegisterEnumDescriptor(_STATUS) + +Status = enum_type_wrapper.EnumTypeWrapper(_STATUS) +OK = 0 +ERROR = 1 +FATAL = 2 + + + +_PARSEUASTREQUEST = _descriptor.Descriptor( + name='ParseUASTRequest', + full_name='github.com.bblfsh.sdk.protocol.ParseUASTRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='filename', full_name='github.com.bblfsh.sdk.protocol.ParseUASTRequest.filename', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='language', full_name='github.com.bblfsh.sdk.protocol.ParseUASTRequest.language', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='content', full_name='github.com.bblfsh.sdk.protocol.ParseUASTRequest.content', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\210\240\037\000\360\241\037\000')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=142, + serialized_end=223, +) + + +_PARSEUASTRESPONSE = _descriptor.Descriptor( + name='ParseUASTResponse', + full_name='github.com.bblfsh.sdk.protocol.ParseUASTResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='status', full_name='github.com.bblfsh.sdk.protocol.ParseUASTResponse.status', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='errors', full_name='github.com.bblfsh.sdk.protocol.ParseUASTResponse.errors', index=1, + number=2, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='uast', full_name='github.com.bblfsh.sdk.protocol.ParseUASTResponse.uast', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\342\336\037\004UAST'))), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\210\240\037\000\360\241\037\000')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=226, + serialized_end=385, +) + +_PARSEUASTRESPONSE.fields_by_name['status'].enum_type = _STATUS +_PARSEUASTRESPONSE.fields_by_name['uast'].message_type = github_dot_com_dot_bblfsh_dot_sdk_dot_uast_dot_generated__pb2._NODE +DESCRIPTOR.message_types_by_name['ParseUASTRequest'] = _PARSEUASTREQUEST +DESCRIPTOR.message_types_by_name['ParseUASTResponse'] = _PARSEUASTRESPONSE +DESCRIPTOR.enum_types_by_name['Status'] = _STATUS + +ParseUASTRequest = _reflection.GeneratedProtocolMessageType('ParseUASTRequest', (_message.Message,), dict( + DESCRIPTOR = _PARSEUASTREQUEST, + __module__ = 'generated_pb2' + # @@protoc_insertion_point(class_scope:github.com.bblfsh.sdk.protocol.ParseUASTRequest) + )) +_sym_db.RegisterMessage(ParseUASTRequest) + +ParseUASTResponse = _reflection.GeneratedProtocolMessageType('ParseUASTResponse', (_message.Message,), dict( + DESCRIPTOR = _PARSEUASTRESPONSE, + __module__ = 'generated_pb2' + # @@protoc_insertion_point(class_scope:github.com.bblfsh.sdk.protocol.ParseUASTResponse) + )) +_sym_db.RegisterMessage(ParseUASTResponse) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\010protocol\240\343\036\001\340\342\036\000')) +_STATUS.has_options = True +_STATUS._options = _descriptor._ParseOptions(descriptor_pb2.EnumOptions(), _b('\300\244\036\000\210\243\036\000\250\244\036\000')) +_STATUS.values_by_name["OK"].has_options = True +_STATUS.values_by_name["OK"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \002Ok')) +_STATUS.values_by_name["ERROR"].has_options = True +_STATUS.values_by_name["ERROR"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Error')) +_STATUS.values_by_name["FATAL"].has_options = True +_STATUS.values_by_name["FATAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Fatal')) +_PARSEUASTREQUEST.has_options = True +_PARSEUASTREQUEST._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\210\240\037\000\360\241\037\000')) +_PARSEUASTRESPONSE.fields_by_name['uast'].has_options = True +_PARSEUASTRESPONSE.fields_by_name['uast']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\342\336\037\004UAST')) +_PARSEUASTRESPONSE.has_options = True +_PARSEUASTRESPONSE._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\210\240\037\000\360\241\037\000')) +try: + # THESE ELEMENTS WILL BE DEPRECATED. + # Please use the generated *_pb2_grpc.py files instead. + import grpc + from grpc.beta import implementations as beta_implementations + from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities + + + class ProtocolServiceStub(object): + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ParseUAST = channel.unary_unary( + '/github.com.bblfsh.sdk.protocol.ProtocolService/ParseUAST', + request_serializer=ParseUASTRequest.SerializeToString, + response_deserializer=ParseUASTResponse.FromString, + ) + + + class ProtocolServiceServicer(object): + + def ParseUAST(self, request, context): + """ParseUAST uses DefaultParser to process the given UAST parsing request. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + + def add_ProtocolServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ParseUAST': grpc.unary_unary_rpc_method_handler( + servicer.ParseUAST, + request_deserializer=ParseUASTRequest.FromString, + response_serializer=ParseUASTResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'github.com.bblfsh.sdk.protocol.ProtocolService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + class BetaProtocolServiceServicer(object): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This class was generated + only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" + def ParseUAST(self, request, context): + """ParseUAST uses DefaultParser to process the given UAST parsing request. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + + class BetaProtocolServiceStub(object): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This class was generated + only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" + def ParseUAST(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ParseUAST uses DefaultParser to process the given UAST parsing request. + """ + raise NotImplementedError() + ParseUAST.future = None + + + def beta_create_ProtocolService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This function was + generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" + request_deserializers = { + ('github.com.bblfsh.sdk.protocol.ProtocolService', 'ParseUAST'): ParseUASTRequest.FromString, + } + response_serializers = { + ('github.com.bblfsh.sdk.protocol.ProtocolService', 'ParseUAST'): ParseUASTResponse.SerializeToString, + } + method_implementations = { + ('github.com.bblfsh.sdk.protocol.ProtocolService', 'ParseUAST'): face_utilities.unary_unary_inline(servicer.ParseUAST), + } + server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) + return beta_implementations.server(method_implementations, options=server_options) + + + def beta_create_ProtocolService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This function was + generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" + request_serializers = { + ('github.com.bblfsh.sdk.protocol.ProtocolService', 'ParseUAST'): ParseUASTRequest.SerializeToString, + } + response_deserializers = { + ('github.com.bblfsh.sdk.protocol.ProtocolService', 'ParseUAST'): ParseUASTResponse.FromString, + } + cardinalities = { + 'ParseUAST': cardinality.Cardinality.UNARY_UNARY, + } + stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) + return beta_implementations.dynamic_stub(channel, 'github.com.bblfsh.sdk.protocol.ProtocolService', cardinalities, options=stub_options) +except ImportError: + pass +# @@protoc_insertion_point(module_scope) diff --git a/bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2_grpc.py b/bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2_grpc.py new file mode 100644 index 0000000..974b101 --- /dev/null +++ b/bblfsh/github/com/bblfsh/sdk/protocol/generated_pb2_grpc.py @@ -0,0 +1,42 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc + +import generated_pb2 as generated__pb2 + + +class ProtocolServiceStub(object): + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ParseUAST = channel.unary_unary( + '/github.com.bblfsh.sdk.protocol.ProtocolService/ParseUAST', + request_serializer=generated__pb2.ParseUASTRequest.SerializeToString, + response_deserializer=generated__pb2.ParseUASTResponse.FromString, + ) + + +class ProtocolServiceServicer(object): + + def ParseUAST(self, request, context): + """ParseUAST uses DefaultParser to process the given UAST parsing request. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ProtocolServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ParseUAST': grpc.unary_unary_rpc_method_handler( + servicer.ParseUAST, + request_deserializer=generated__pb2.ParseUASTRequest.FromString, + response_serializer=generated__pb2.ParseUASTResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'github.com.bblfsh.sdk.protocol.ProtocolService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) diff --git a/bblfsh/github/com/bblfsh/sdk/uast/__init__.py b/bblfsh/github/com/bblfsh/sdk/uast/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bblfsh/github/com/bblfsh/sdk/uast/generated_pb2.py b/bblfsh/github/com/bblfsh/sdk/uast/generated_pb2.py new file mode 100644 index 0000000..91225fa --- /dev/null +++ b/bblfsh/github/com/bblfsh/sdk/uast/generated_pb2.py @@ -0,0 +1,1224 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: github.com/bblfsh/sdk/uast/generated.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='github.com/bblfsh/sdk/uast/generated.proto', + package='github.com.bblfsh.sdk.uast', + syntax='proto3', + serialized_pb=_b('\n*github.com/bblfsh/sdk/uast/generated.proto\x12\x1agithub.com.bblfsh.sdk.uast\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\"\x92\x03\n\x04Node\x12\x15\n\rinternal_type\x18\x01 \x01(\t\x12\x44\n\nproperties\x18\x02 \x03(\x0b\x32\x30.github.com.bblfsh.sdk.uast.Node.PropertiesEntry\x12\x32\n\x08\x63hildren\x18\x03 \x03(\x0b\x32 .github.com.bblfsh.sdk.uast.Node\x12\r\n\x05token\x18\x04 \x01(\t\x12<\n\x0estart_position\x18\x05 \x01(\x0b\x32$.github.com.bblfsh.sdk.uast.Position\x12:\n\x0c\x65nd_position\x18\x06 \x01(\x0b\x32$.github.com.bblfsh.sdk.uast.Position\x12/\n\x05roles\x18\x07 \x03(\x0e\x32 .github.com.bblfsh.sdk.uast.Role\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x0c\x88\xa0\x1f\x00\x98\xa0\x1f\x00\xf0\xa1\x1f\x00\"?\n\x08Position\x12\x0e\n\x06offset\x18\x01 \x01(\r\x12\x0c\n\x04line\x18\x02 \x01(\r\x12\x0b\n\x03\x63ol\x18\x03 \x01(\r:\x08\x88\xa0\x1f\x00\xf0\xa1\x1f\x00*\xb4+\n\x04Role\x12+\n\x11SIMPLE_IDENTIFIER\x10\x00\x1a\x14\x8a\x9d \x10SimpleIdentifier\x12\x31\n\x14QUALIFIED_IDENTIFIER\x10\x01\x1a\x17\x8a\x9d \x13QualifiedIdentifier\x12+\n\x11\x42INARY_EXPRESSION\x10\x02\x1a\x14\x8a\x9d \x10\x42inaryExpression\x12\x34\n\x16\x42INARY_EXPRESSION_LEFT\x10\x03\x1a\x18\x8a\x9d \x14\x42inaryExpressionLeft\x12\x36\n\x17\x42INARY_EXPRESSION_RIGHT\x10\x04\x1a\x19\x8a\x9d \x15\x42inaryExpressionRight\x12\x30\n\x14\x42INARY_EXPRESSION_OP\x10\x05\x1a\x16\x8a\x9d \x12\x42inaryExpressionOp\x12\x14\n\x05INFIX\x10\x06\x1a\t\x8a\x9d \x05Infix\x12\x18\n\x07POSTFIX\x10\x07\x1a\x0b\x8a\x9d \x07Postfix\x12\x31\n\x15OP_BITWISE_LEFT_SHIFT\x10\x08\x1a\x16\x8a\x9d \x12OpBitwiseLeftShift\x12\x33\n\x16OP_BITWISE_RIGHT_SHIFT\x10\t\x1a\x17\x8a\x9d \x13OpBitwiseRightShift\x12\x44\n\x1fOP_BITWISE_UNSIGNED_RIGHT_SHIFT\x10\n\x1a\x1f\x8a\x9d \x1bOpBitwiseUnsignedRightShift\x12\"\n\rOP_BITWISE_OR\x10\x0b\x1a\x0f\x8a\x9d \x0bOpBitwiseOr\x12$\n\x0eOP_BITWISE_XOR\x10\x0c\x1a\x10\x8a\x9d \x0cOpBitwiseXor\x12$\n\x0eOP_BITWISE_AND\x10\r\x1a\x10\x8a\x9d \x0cOpBitwiseAnd\x12\x1e\n\nEXPRESSION\x10\x0e\x1a\x0e\x8a\x9d \nExpression\x12\x1c\n\tSTATEMENT\x10\x0f\x1a\r\x8a\x9d \tStatement\x12\x19\n\x08OP_EQUAL\x10\x10\x1a\x0b\x8a\x9d \x07OpEqual\x12 \n\x0cOP_NOT_EQUAL\x10\x11\x1a\x0e\x8a\x9d \nOpNotEqual\x12 \n\x0cOP_LESS_THAN\x10\x12\x1a\x0e\x8a\x9d \nOpLessThan\x12+\n\x12OP_LESS_THAN_EQUAL\x10\x13\x1a\x13\x8a\x9d \x0fOpLessThanEqual\x12&\n\x0fOP_GREATER_THAN\x10\x14\x1a\x11\x8a\x9d \rOpGreaterThan\x12\x31\n\x15OP_GREATER_THAN_EQUAL\x10\x15\x1a\x16\x8a\x9d \x12OpGreaterThanEqual\x12\x17\n\x07OP_SAME\x10\x16\x1a\n\x8a\x9d \x06OpSame\x12\x1e\n\x0bOP_NOT_SAME\x10\x17\x1a\r\x8a\x9d \tOpNotSame\x12\x1f\n\x0bOP_CONTAINS\x10\x18\x1a\x0e\x8a\x9d \nOpContains\x12&\n\x0fOP_NOT_CONTAINS\x10\x19\x1a\x11\x8a\x9d \rOpNotContains\x12(\n\x10OP_PRE_INCREMENT\x10\x1a\x1a\x12\x8a\x9d \x0eOpPreIncrement\x12*\n\x11OP_POST_INCREMENT\x10\x1b\x1a\x13\x8a\x9d \x0fOpPostIncrement\x12(\n\x10OP_PRE_DECREMENT\x10\x1c\x1a\x12\x8a\x9d \x0eOpPreDecrement\x12*\n\x11OP_POST_DECREMENT\x10\x1d\x1a\x13\x8a\x9d \x0fOpPostDecrement\x12\x1f\n\x0bOP_NEGATIVE\x10\x1e\x1a\x0e\x8a\x9d \nOpNegative\x12\x1f\n\x0bOP_POSITIVE\x10\x1f\x1a\x0e\x8a\x9d \nOpPositive\x12\x32\n\x15OP_BITWISE_COMPLEMENT\x10 \x1a\x17\x8a\x9d \x13OpBitwiseComplement\x12%\n\x0eOP_DEREFERENCE\x10!\x1a\x11\x8a\x9d \rOpDereference\x12&\n\x0fOP_TAKE_ADDRESS\x10\"\x1a\x11\x8a\x9d \rOpTakeAddress\x12\x12\n\x04\x46ILE\x10#\x1a\x08\x8a\x9d \x04\x46ile\x12$\n\x0eOP_BOOLEAN_AND\x10$\x1a\x10\x8a\x9d \x0cOpBooleanAnd\x12\"\n\rOP_BOOLEAN_OR\x10%\x1a\x0f\x8a\x9d \x0bOpBooleanOr\x12$\n\x0eOP_BOOLEAN_NOT\x10&\x1a\x10\x8a\x9d \x0cOpBooleanNot\x12$\n\x0eOP_BOOLEAN_XOR\x10\'\x1a\x10\x8a\x9d \x0cOpBooleanXor\x12\x15\n\x06OP_ADD\x10(\x1a\t\x8a\x9d \x05OpAdd\x12!\n\x0cOP_SUBSTRACT\x10)\x1a\x0f\x8a\x9d \x0bOpSubstract\x12\x1f\n\x0bOP_MULTIPLY\x10*\x1a\x0e\x8a\x9d \nOpMultiply\x12\x1b\n\tOP_DIVIDE\x10+\x1a\x0c\x8a\x9d \x08OpDivide\x12\x15\n\x06OP_MOD\x10,\x1a\t\x8a\x9d \x05OpMod\x12/\n\x13PACKAGE_DECLARATION\x10-\x1a\x16\x8a\x9d \x12PackageDeclaration\x12-\n\x12IMPORT_DECLARATION\x10.\x1a\x15\x8a\x9d \x11ImportDeclaration\x12\x1f\n\x0bIMPORT_PATH\x10/\x1a\x0e\x8a\x9d \nImportPath\x12!\n\x0cIMPORT_ALIAS\x10\x30\x1a\x0f\x8a\x9d \x0bImportAlias\x12\x31\n\x14\x46UNCTION_DECLARATION\x10\x31\x1a\x17\x8a\x9d \x13\x46unctionDeclaration\x12:\n\x19\x46UNCTION_DECLARATION_BODY\x10\x32\x1a\x1b\x8a\x9d \x17\x46unctionDeclarationBody\x12:\n\x19\x46UNCTION_DECLARATION_NAME\x10\x33\x1a\x1b\x8a\x9d \x17\x46unctionDeclarationName\x12\x42\n\x1d\x46UNCTION_DECLARATION_RECEIVER\x10\x34\x1a\x1f\x8a\x9d \x1b\x46unctionDeclarationReceiver\x12\x42\n\x1d\x46UNCTION_DECLARATION_ARGUMENT\x10\x35\x1a\x1f\x8a\x9d \x1b\x46unctionDeclarationArgument\x12K\n\"FUNCTION_DECLARATION_ARGUMENT_NAME\x10\x36\x1a#\x8a\x9d \x1f\x46unctionDeclarationArgumentName\x12\\\n+FUNCTION_DECLARATION_ARGUMENT_DEFAULT_VALUE\x10\x37\x1a+\x8a\x9d \'FunctionDeclarationArgumentDefaultValue\x12J\n\"FUNCTION_DECLARATION_VAR_ARGS_LIST\x10\x38\x1a\"\x8a\x9d \x1e\x46unctionDeclarationVarArgsList\x12)\n\x10TYPE_DECLARATION\x10\x39\x1a\x13\x8a\x9d \x0fTypeDeclaration\x12\x32\n\x15TYPE_DECLARATION_BODY\x10:\x1a\x17\x8a\x9d \x13TypeDeclarationBody\x12\x34\n\x16TYPE_DECLARATION_BASES\x10;\x1a\x18\x8a\x9d \x14TypeDeclarationBases\x12>\n\x1bTYPE_DECLARATION_IMPLEMENTS\x10<\x1a\x1d\x8a\x9d \x19TypeDeclarationImplements\x12\x32\n\x15VISIBLE_FROM_INSTANCE\x10=\x1a\x17\x8a\x9d \x13VisibleFromInstance\x12*\n\x11VISIBLE_FROM_TYPE\x10>\x1a\x13\x8a\x9d \x0fVisibleFromType\x12\x30\n\x14VISIBLE_FROM_SUBTYPE\x10?\x1a\x16\x8a\x9d \x12VisibleFromSubtype\x12\x30\n\x14VISIBLE_FROM_PACKAGE\x10@\x1a\x16\x8a\x9d \x12VisibleFromPackage\x12\x36\n\x17VISIBLE_FROM_SUBPACKAGE\x10\x41\x1a\x19\x8a\x9d \x15VisibleFromSubpackage\x12.\n\x13VISIBLE_FROM_MODULE\x10\x42\x1a\x15\x8a\x9d \x11VisibleFromModule\x12.\n\x13VISIBLE_FROM_FRIEND\x10\x43\x1a\x15\x8a\x9d \x11VisibleFromFriend\x12,\n\x12VISIBLE_FROM_WORLD\x10\x44\x1a\x14\x8a\x9d \x10VisibleFromWorld\x12\x0e\n\x02IF\x10\x45\x1a\x06\x8a\x9d \x02If\x12!\n\x0cIF_CONDITION\x10\x46\x1a\x0f\x8a\x9d \x0bIfCondition\x12\x17\n\x07IF_BODY\x10G\x1a\n\x8a\x9d \x06IfBody\x12\x17\n\x07IF_ELSE\x10H\x1a\n\x8a\x9d \x06IfElse\x12\x16\n\x06SWITCH\x10I\x1a\n\x8a\x9d \x06Switch\x12\x1f\n\x0bSWITCH_CASE\x10J\x1a\x0e\x8a\x9d \nSwitchCase\x12\x32\n\x15SWITCH_CASE_CONDITION\x10K\x1a\x17\x8a\x9d \x13SwitchCaseCondition\x12(\n\x10SWITCH_CASE_BODY\x10L\x1a\x12\x8a\x9d \x0eSwitchCaseBody\x12%\n\x0eSWITCH_DEFAULT\x10M\x1a\x11\x8a\x9d \rSwitchDefault\x12\x10\n\x03\x46OR\x10N\x1a\x07\x8a\x9d \x03\x46or\x12\x19\n\x08\x46OR_INIT\x10O\x1a\x0b\x8a\x9d \x07\x46orInit\x12%\n\x0e\x46OR_EXPRESSION\x10P\x1a\x11\x8a\x9d \rForExpression\x12\x1d\n\nFOR_UPDATE\x10Q\x1a\r\x8a\x9d \tForUpdate\x12\x19\n\x08\x46OR_BODY\x10R\x1a\x0b\x8a\x9d \x07\x46orBody\x12\x19\n\x08\x46OR_EACH\x10S\x1a\x0b\x8a\x9d \x07\x46orEach\x12\x14\n\x05WHILE\x10T\x1a\t\x8a\x9d \x05While\x12\'\n\x0fWHILE_CONDITION\x10U\x1a\x12\x8a\x9d \x0eWhileCondition\x12\x1d\n\nWHILE_BODY\x10V\x1a\r\x8a\x9d \tWhileBody\x12\x19\n\x08\x44O_WHILE\x10W\x1a\x0b\x8a\x9d \x07\x44oWhile\x12,\n\x12\x44O_WHILE_CONDITION\x10X\x1a\x14\x8a\x9d \x10\x44oWhileCondition\x12\"\n\rDO_WHILE_BODY\x10Y\x1a\x0f\x8a\x9d \x0b\x44oWhileBody\x12\x14\n\x05\x42REAK\x10Z\x1a\t\x8a\x9d \x05\x42reak\x12\x1a\n\x08\x43ONTINUE\x10[\x1a\x0c\x8a\x9d \x08\x43ontinue\x12\x12\n\x04GOTO\x10\\\x1a\x08\x8a\x9d \x04Goto\x12\x14\n\x05\x42LOCK\x10]\x1a\t\x8a\x9d \x05\x42lock\x12\x1f\n\x0b\x42LOCK_SCOPE\x10^\x1a\x0e\x8a\x9d \nBlockScope\x12\x16\n\x06RETURN\x10_\x1a\n\x8a\x9d \x06Return\x12\x10\n\x03TRY\x10`\x1a\x07\x8a\x9d \x03Try\x12\x19\n\x08TRY_BODY\x10\x61\x1a\x0b\x8a\x9d \x07TryBody\x12\x1b\n\tTRY_CATCH\x10\x62\x1a\x0c\x8a\x9d \x08TryCatch\x12\x1f\n\x0bTRY_FINALLY\x10\x63\x1a\x0e\x8a\x9d \nTryFinally\x12\x14\n\x05THROW\x10\x64\x1a\t\x8a\x9d \x05Throw\x12\x16\n\x06\x41SSERT\x10\x65\x1a\n\x8a\x9d \x06\x41ssert\x12\x12\n\x04\x43\x41LL\x10\x66\x1a\x08\x8a\x9d \x04\x43\x61ll\x12#\n\rCALL_RECEIVER\x10g\x1a\x10\x8a\x9d \x0c\x43\x61llReceiver\x12\x1f\n\x0b\x43\x41LL_CALLEE\x10h\x1a\x0e\x8a\x9d \nCallCallee\x12\x38\n\x18\x43\x41LL_POSITIONAL_ARGUMENT\x10i\x1a\x1a\x8a\x9d \x16\x43\x61llPositionalArgument\x12.\n\x13\x43\x41LL_NAMED_ARGUMENT\x10j\x1a\x15\x8a\x9d \x11\x43\x61llNamedArgument\x12\x37\n\x18\x43\x41LL_NAMED_ARGUMENT_NAME\x10k\x1a\x19\x8a\x9d \x15\x43\x61llNamedArgumentName\x12\x39\n\x19\x43\x41LL_NAMED_ARGUMENT_VALUE\x10l\x1a\x1a\x8a\x9d \x16\x43\x61llNamedArgumentValue\x12\x12\n\x04NOOP\x10m\x1a\x08\x8a\x9d \x04Noop\x12\'\n\x0f\x42OOLEAN_LITERAL\x10n\x1a\x12\x8a\x9d \x0e\x42ooleanLiteral\x12!\n\x0c\x42YTE_LITERAL\x10o\x1a\x0f\x8a\x9d \x0b\x42yteLiteral\x12.\n\x13\x42YTE_STRING_LITERAL\x10p\x1a\x15\x8a\x9d \x11\x42yteStringLiteral\x12+\n\x11\x43HARACTER_LITERAL\x10q\x1a\x14\x8a\x9d \x10\x43haracterLiteral\x12!\n\x0cLIST_LITERAL\x10r\x1a\x0f\x8a\x9d \x0bListLiteral\x12\x1f\n\x0bMAP_LITERAL\x10s\x1a\x0e\x8a\x9d \nMapLiteral\x12!\n\x0cNULL_LITERAL\x10t\x1a\x0f\x8a\x9d \x0bNullLiteral\x12%\n\x0eNUMBER_LITERAL\x10u\x1a\x11\x8a\x9d \rNumberLiteral\x12%\n\x0eREGEXP_LITERAL\x10v\x1a\x11\x8a\x9d \rRegexpLiteral\x12\x1f\n\x0bSET_LITERAL\x10w\x1a\x0e\x8a\x9d \nSetLiteral\x12%\n\x0eSTRING_LITERAL\x10x\x1a\x11\x8a\x9d \rStringLiteral\x12#\n\rTUPLE_LITERAL\x10y\x1a\x10\x8a\x9d \x0cTupleLiteral\x12!\n\x0cTYPE_LITERAL\x10z\x1a\x0f\x8a\x9d \x0bTypeLiteral\x12#\n\rOTHER_LITERAL\x10{\x1a\x10\x8a\x9d \x0cOtherLiteral\x12\x1b\n\tMAP_ENTRY\x10|\x1a\x0c\x8a\x9d \x08MapEntry\x12\x17\n\x07MAP_KEY\x10}\x1a\n\x8a\x9d \x06MapKey\x12\x1b\n\tMAP_VALUE\x10~\x1a\x0c\x8a\x9d \x08MapValue\x12\x12\n\x04TYPE\x10\x7f\x1a\x08\x8a\x9d \x04Type\x12&\n\x0ePRIMITIVE_TYPE\x10\x80\x01\x1a\x11\x8a\x9d \rPrimitiveType\x12\x1f\n\nASSIGNMENT\x10\x81\x01\x1a\x0e\x8a\x9d \nAssignment\x12\x30\n\x13\x41SSIGNMENT_VARIABLE\x10\x82\x01\x1a\x16\x8a\x9d \x12\x41ssignmentVariable\x12*\n\x10\x41SSIGNMENT_VALUE\x10\x83\x01\x1a\x13\x8a\x9d \x0f\x41ssignmentValue\x12\x32\n\x14\x41UGMENTED_ASSIGNMENT\x10\x84\x01\x1a\x17\x8a\x9d \x13\x41ugmentedAssignment\x12\x43\n\x1d\x41UGMENTED_ASSIGNMENT_OPERATOR\x10\x85\x01\x1a\x1f\x8a\x9d \x1b\x41ugmentedAssignmentOperator\x12\x43\n\x1d\x41UGMENTED_ASSIGNMENT_VARIABLE\x10\x86\x01\x1a\x1f\x8a\x9d \x1b\x41ugmentedAssignmentVariable\x12=\n\x1a\x41UGMENTED_ASSIGNMENT_VALUE\x10\x87\x01\x1a\x1c\x8a\x9d \x18\x41ugmentedAssignmentValue\x12\x13\n\x04THIS\x10\x88\x01\x1a\x08\x8a\x9d \x04This\x12\x19\n\x07\x43OMMENT\x10\x89\x01\x1a\x0b\x8a\x9d \x07\x43omment\x12%\n\rDOCUMENTATION\x10\x8a\x01\x1a\x11\x8a\x9d \rDocumentation\x12\x1f\n\nWHITESPACE\x10\x8b\x01\x1a\x0e\x8a\x9d \nWhitespace\x1a\x0c\xc0\xa4\x1e\x00\x88\xa3\x1e\x00\xa8\xa4\x1e\x00\x42\x0eZ\x04uast\xa0\xe3\x1e\x01\xe0\xe2\x1e\x00\x62\x06proto3') + , + dependencies=[github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,]) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +_ROLE = _descriptor.EnumDescriptor( + name='Role', + full_name='github.com.bblfsh.sdk.uast.Role', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='SIMPLE_IDENTIFIER', index=0, number=0, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \020SimpleIdentifier')), + type=None), + _descriptor.EnumValueDescriptor( + name='QUALIFIED_IDENTIFIER', index=1, number=1, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023QualifiedIdentifier')), + type=None), + _descriptor.EnumValueDescriptor( + name='BINARY_EXPRESSION', index=2, number=2, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \020BinaryExpression')), + type=None), + _descriptor.EnumValueDescriptor( + name='BINARY_EXPRESSION_LEFT', index=3, number=3, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \024BinaryExpressionLeft')), + type=None), + _descriptor.EnumValueDescriptor( + name='BINARY_EXPRESSION_RIGHT', index=4, number=4, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \025BinaryExpressionRight')), + type=None), + _descriptor.EnumValueDescriptor( + name='BINARY_EXPRESSION_OP', index=5, number=5, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022BinaryExpressionOp')), + type=None), + _descriptor.EnumValueDescriptor( + name='INFIX', index=6, number=6, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Infix')), + type=None), + _descriptor.EnumValueDescriptor( + name='POSTFIX', index=7, number=7, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007Postfix')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BITWISE_LEFT_SHIFT', index=8, number=8, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022OpBitwiseLeftShift')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BITWISE_RIGHT_SHIFT', index=9, number=9, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023OpBitwiseRightShift')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BITWISE_UNSIGNED_RIGHT_SHIFT', index=10, number=10, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \033OpBitwiseUnsignedRightShift')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BITWISE_OR', index=11, number=11, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013OpBitwiseOr')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BITWISE_XOR', index=12, number=12, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OpBitwiseXor')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BITWISE_AND', index=13, number=13, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OpBitwiseAnd')), + type=None), + _descriptor.EnumValueDescriptor( + name='EXPRESSION', index=14, number=14, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nExpression')), + type=None), + _descriptor.EnumValueDescriptor( + name='STATEMENT', index=15, number=15, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \tStatement')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_EQUAL', index=16, number=16, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007OpEqual')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_NOT_EQUAL', index=17, number=17, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpNotEqual')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_LESS_THAN', index=18, number=18, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpLessThan')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_LESS_THAN_EQUAL', index=19, number=19, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017OpLessThanEqual')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_GREATER_THAN', index=20, number=20, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rOpGreaterThan')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_GREATER_THAN_EQUAL', index=21, number=21, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022OpGreaterThanEqual')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_SAME', index=22, number=22, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006OpSame')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_NOT_SAME', index=23, number=23, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \tOpNotSame')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_CONTAINS', index=24, number=24, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpContains')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_NOT_CONTAINS', index=25, number=25, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rOpNotContains')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_PRE_INCREMENT', index=26, number=26, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \016OpPreIncrement')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_POST_INCREMENT', index=27, number=27, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017OpPostIncrement')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_PRE_DECREMENT', index=28, number=28, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \016OpPreDecrement')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_POST_DECREMENT', index=29, number=29, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017OpPostDecrement')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_NEGATIVE', index=30, number=30, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpNegative')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_POSITIVE', index=31, number=31, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpPositive')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BITWISE_COMPLEMENT', index=32, number=32, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023OpBitwiseComplement')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_DEREFERENCE', index=33, number=33, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rOpDereference')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_TAKE_ADDRESS', index=34, number=34, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rOpTakeAddress')), + type=None), + _descriptor.EnumValueDescriptor( + name='FILE', index=35, number=35, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004File')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BOOLEAN_AND', index=36, number=36, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OpBooleanAnd')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BOOLEAN_OR', index=37, number=37, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013OpBooleanOr')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BOOLEAN_NOT', index=38, number=38, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OpBooleanNot')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_BOOLEAN_XOR', index=39, number=39, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OpBooleanXor')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_ADD', index=40, number=40, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005OpAdd')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_SUBSTRACT', index=41, number=41, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013OpSubstract')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_MULTIPLY', index=42, number=42, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpMultiply')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_DIVIDE', index=43, number=43, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \010OpDivide')), + type=None), + _descriptor.EnumValueDescriptor( + name='OP_MOD', index=44, number=44, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005OpMod')), + type=None), + _descriptor.EnumValueDescriptor( + name='PACKAGE_DECLARATION', index=45, number=45, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022PackageDeclaration')), + type=None), + _descriptor.EnumValueDescriptor( + name='IMPORT_DECLARATION', index=46, number=46, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \021ImportDeclaration')), + type=None), + _descriptor.EnumValueDescriptor( + name='IMPORT_PATH', index=47, number=47, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nImportPath')), + type=None), + _descriptor.EnumValueDescriptor( + name='IMPORT_ALIAS', index=48, number=48, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013ImportAlias')), + type=None), + _descriptor.EnumValueDescriptor( + name='FUNCTION_DECLARATION', index=49, number=49, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023FunctionDeclaration')), + type=None), + _descriptor.EnumValueDescriptor( + name='FUNCTION_DECLARATION_BODY', index=50, number=50, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \027FunctionDeclarationBody')), + type=None), + _descriptor.EnumValueDescriptor( + name='FUNCTION_DECLARATION_NAME', index=51, number=51, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \027FunctionDeclarationName')), + type=None), + _descriptor.EnumValueDescriptor( + name='FUNCTION_DECLARATION_RECEIVER', index=52, number=52, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \033FunctionDeclarationReceiver')), + type=None), + _descriptor.EnumValueDescriptor( + name='FUNCTION_DECLARATION_ARGUMENT', index=53, number=53, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \033FunctionDeclarationArgument')), + type=None), + _descriptor.EnumValueDescriptor( + name='FUNCTION_DECLARATION_ARGUMENT_NAME', index=54, number=54, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \037FunctionDeclarationArgumentName')), + type=None), + _descriptor.EnumValueDescriptor( + name='FUNCTION_DECLARATION_ARGUMENT_DEFAULT_VALUE', index=55, number=55, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \'FunctionDeclarationArgumentDefaultValue')), + type=None), + _descriptor.EnumValueDescriptor( + name='FUNCTION_DECLARATION_VAR_ARGS_LIST', index=56, number=56, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \036FunctionDeclarationVarArgsList')), + type=None), + _descriptor.EnumValueDescriptor( + name='TYPE_DECLARATION', index=57, number=57, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017TypeDeclaration')), + type=None), + _descriptor.EnumValueDescriptor( + name='TYPE_DECLARATION_BODY', index=58, number=58, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023TypeDeclarationBody')), + type=None), + _descriptor.EnumValueDescriptor( + name='TYPE_DECLARATION_BASES', index=59, number=59, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \024TypeDeclarationBases')), + type=None), + _descriptor.EnumValueDescriptor( + name='TYPE_DECLARATION_IMPLEMENTS', index=60, number=60, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \031TypeDeclarationImplements')), + type=None), + _descriptor.EnumValueDescriptor( + name='VISIBLE_FROM_INSTANCE', index=61, number=61, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023VisibleFromInstance')), + type=None), + _descriptor.EnumValueDescriptor( + name='VISIBLE_FROM_TYPE', index=62, number=62, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017VisibleFromType')), + type=None), + _descriptor.EnumValueDescriptor( + name='VISIBLE_FROM_SUBTYPE', index=63, number=63, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022VisibleFromSubtype')), + type=None), + _descriptor.EnumValueDescriptor( + name='VISIBLE_FROM_PACKAGE', index=64, number=64, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022VisibleFromPackage')), + type=None), + _descriptor.EnumValueDescriptor( + name='VISIBLE_FROM_SUBPACKAGE', index=65, number=65, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \025VisibleFromSubpackage')), + type=None), + _descriptor.EnumValueDescriptor( + name='VISIBLE_FROM_MODULE', index=66, number=66, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \021VisibleFromModule')), + type=None), + _descriptor.EnumValueDescriptor( + name='VISIBLE_FROM_FRIEND', index=67, number=67, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \021VisibleFromFriend')), + type=None), + _descriptor.EnumValueDescriptor( + name='VISIBLE_FROM_WORLD', index=68, number=68, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \020VisibleFromWorld')), + type=None), + _descriptor.EnumValueDescriptor( + name='IF', index=69, number=69, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \002If')), + type=None), + _descriptor.EnumValueDescriptor( + name='IF_CONDITION', index=70, number=70, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013IfCondition')), + type=None), + _descriptor.EnumValueDescriptor( + name='IF_BODY', index=71, number=71, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006IfBody')), + type=None), + _descriptor.EnumValueDescriptor( + name='IF_ELSE', index=72, number=72, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006IfElse')), + type=None), + _descriptor.EnumValueDescriptor( + name='SWITCH', index=73, number=73, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006Switch')), + type=None), + _descriptor.EnumValueDescriptor( + name='SWITCH_CASE', index=74, number=74, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nSwitchCase')), + type=None), + _descriptor.EnumValueDescriptor( + name='SWITCH_CASE_CONDITION', index=75, number=75, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023SwitchCaseCondition')), + type=None), + _descriptor.EnumValueDescriptor( + name='SWITCH_CASE_BODY', index=76, number=76, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \016SwitchCaseBody')), + type=None), + _descriptor.EnumValueDescriptor( + name='SWITCH_DEFAULT', index=77, number=77, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rSwitchDefault')), + type=None), + _descriptor.EnumValueDescriptor( + name='FOR', index=78, number=78, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \003For')), + type=None), + _descriptor.EnumValueDescriptor( + name='FOR_INIT', index=79, number=79, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007ForInit')), + type=None), + _descriptor.EnumValueDescriptor( + name='FOR_EXPRESSION', index=80, number=80, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rForExpression')), + type=None), + _descriptor.EnumValueDescriptor( + name='FOR_UPDATE', index=81, number=81, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \tForUpdate')), + type=None), + _descriptor.EnumValueDescriptor( + name='FOR_BODY', index=82, number=82, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007ForBody')), + type=None), + _descriptor.EnumValueDescriptor( + name='FOR_EACH', index=83, number=83, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007ForEach')), + type=None), + _descriptor.EnumValueDescriptor( + name='WHILE', index=84, number=84, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005While')), + type=None), + _descriptor.EnumValueDescriptor( + name='WHILE_CONDITION', index=85, number=85, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \016WhileCondition')), + type=None), + _descriptor.EnumValueDescriptor( + name='WHILE_BODY', index=86, number=86, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \tWhileBody')), + type=None), + _descriptor.EnumValueDescriptor( + name='DO_WHILE', index=87, number=87, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007DoWhile')), + type=None), + _descriptor.EnumValueDescriptor( + name='DO_WHILE_CONDITION', index=88, number=88, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \020DoWhileCondition')), + type=None), + _descriptor.EnumValueDescriptor( + name='DO_WHILE_BODY', index=89, number=89, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013DoWhileBody')), + type=None), + _descriptor.EnumValueDescriptor( + name='BREAK', index=90, number=90, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Break')), + type=None), + _descriptor.EnumValueDescriptor( + name='CONTINUE', index=91, number=91, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \010Continue')), + type=None), + _descriptor.EnumValueDescriptor( + name='GOTO', index=92, number=92, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004Goto')), + type=None), + _descriptor.EnumValueDescriptor( + name='BLOCK', index=93, number=93, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Block')), + type=None), + _descriptor.EnumValueDescriptor( + name='BLOCK_SCOPE', index=94, number=94, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nBlockScope')), + type=None), + _descriptor.EnumValueDescriptor( + name='RETURN', index=95, number=95, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006Return')), + type=None), + _descriptor.EnumValueDescriptor( + name='TRY', index=96, number=96, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \003Try')), + type=None), + _descriptor.EnumValueDescriptor( + name='TRY_BODY', index=97, number=97, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007TryBody')), + type=None), + _descriptor.EnumValueDescriptor( + name='TRY_CATCH', index=98, number=98, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \010TryCatch')), + type=None), + _descriptor.EnumValueDescriptor( + name='TRY_FINALLY', index=99, number=99, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nTryFinally')), + type=None), + _descriptor.EnumValueDescriptor( + name='THROW', index=100, number=100, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Throw')), + type=None), + _descriptor.EnumValueDescriptor( + name='ASSERT', index=101, number=101, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006Assert')), + type=None), + _descriptor.EnumValueDescriptor( + name='CALL', index=102, number=102, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004Call')), + type=None), + _descriptor.EnumValueDescriptor( + name='CALL_RECEIVER', index=103, number=103, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014CallReceiver')), + type=None), + _descriptor.EnumValueDescriptor( + name='CALL_CALLEE', index=104, number=104, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nCallCallee')), + type=None), + _descriptor.EnumValueDescriptor( + name='CALL_POSITIONAL_ARGUMENT', index=105, number=105, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \026CallPositionalArgument')), + type=None), + _descriptor.EnumValueDescriptor( + name='CALL_NAMED_ARGUMENT', index=106, number=106, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \021CallNamedArgument')), + type=None), + _descriptor.EnumValueDescriptor( + name='CALL_NAMED_ARGUMENT_NAME', index=107, number=107, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \025CallNamedArgumentName')), + type=None), + _descriptor.EnumValueDescriptor( + name='CALL_NAMED_ARGUMENT_VALUE', index=108, number=108, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \026CallNamedArgumentValue')), + type=None), + _descriptor.EnumValueDescriptor( + name='NOOP', index=109, number=109, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004Noop')), + type=None), + _descriptor.EnumValueDescriptor( + name='BOOLEAN_LITERAL', index=110, number=110, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \016BooleanLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='BYTE_LITERAL', index=111, number=111, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013ByteLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='BYTE_STRING_LITERAL', index=112, number=112, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \021ByteStringLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='CHARACTER_LITERAL', index=113, number=113, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \020CharacterLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='LIST_LITERAL', index=114, number=114, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013ListLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='MAP_LITERAL', index=115, number=115, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nMapLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='NULL_LITERAL', index=116, number=116, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013NullLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='NUMBER_LITERAL', index=117, number=117, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rNumberLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='REGEXP_LITERAL', index=118, number=118, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rRegexpLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='SET_LITERAL', index=119, number=119, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nSetLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='STRING_LITERAL', index=120, number=120, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rStringLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='TUPLE_LITERAL', index=121, number=121, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014TupleLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='TYPE_LITERAL', index=122, number=122, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013TypeLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='OTHER_LITERAL', index=123, number=123, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OtherLiteral')), + type=None), + _descriptor.EnumValueDescriptor( + name='MAP_ENTRY', index=124, number=124, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \010MapEntry')), + type=None), + _descriptor.EnumValueDescriptor( + name='MAP_KEY', index=125, number=125, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006MapKey')), + type=None), + _descriptor.EnumValueDescriptor( + name='MAP_VALUE', index=126, number=126, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \010MapValue')), + type=None), + _descriptor.EnumValueDescriptor( + name='TYPE', index=127, number=127, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004Type')), + type=None), + _descriptor.EnumValueDescriptor( + name='PRIMITIVE_TYPE', index=128, number=128, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rPrimitiveType')), + type=None), + _descriptor.EnumValueDescriptor( + name='ASSIGNMENT', index=129, number=129, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nAssignment')), + type=None), + _descriptor.EnumValueDescriptor( + name='ASSIGNMENT_VARIABLE', index=130, number=130, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022AssignmentVariable')), + type=None), + _descriptor.EnumValueDescriptor( + name='ASSIGNMENT_VALUE', index=131, number=131, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017AssignmentValue')), + type=None), + _descriptor.EnumValueDescriptor( + name='AUGMENTED_ASSIGNMENT', index=132, number=132, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023AugmentedAssignment')), + type=None), + _descriptor.EnumValueDescriptor( + name='AUGMENTED_ASSIGNMENT_OPERATOR', index=133, number=133, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \033AugmentedAssignmentOperator')), + type=None), + _descriptor.EnumValueDescriptor( + name='AUGMENTED_ASSIGNMENT_VARIABLE', index=134, number=134, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \033AugmentedAssignmentVariable')), + type=None), + _descriptor.EnumValueDescriptor( + name='AUGMENTED_ASSIGNMENT_VALUE', index=135, number=135, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \030AugmentedAssignmentValue')), + type=None), + _descriptor.EnumValueDescriptor( + name='THIS', index=136, number=136, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004This')), + type=None), + _descriptor.EnumValueDescriptor( + name='COMMENT', index=137, number=137, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007Comment')), + type=None), + _descriptor.EnumValueDescriptor( + name='DOCUMENTATION', index=138, number=138, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rDocumentation')), + type=None), + _descriptor.EnumValueDescriptor( + name='WHITESPACE', index=139, number=139, + options=_descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nWhitespace')), + type=None), + ], + containing_type=None, + options=_descriptor._ParseOptions(descriptor_pb2.EnumOptions(), _b('\300\244\036\000\210\243\036\000\250\244\036\000')), + serialized_start=592, + serialized_end=6148, +) +_sym_db.RegisterEnumDescriptor(_ROLE) + +Role = enum_type_wrapper.EnumTypeWrapper(_ROLE) +SIMPLE_IDENTIFIER = 0 +QUALIFIED_IDENTIFIER = 1 +BINARY_EXPRESSION = 2 +BINARY_EXPRESSION_LEFT = 3 +BINARY_EXPRESSION_RIGHT = 4 +BINARY_EXPRESSION_OP = 5 +INFIX = 6 +POSTFIX = 7 +OP_BITWISE_LEFT_SHIFT = 8 +OP_BITWISE_RIGHT_SHIFT = 9 +OP_BITWISE_UNSIGNED_RIGHT_SHIFT = 10 +OP_BITWISE_OR = 11 +OP_BITWISE_XOR = 12 +OP_BITWISE_AND = 13 +EXPRESSION = 14 +STATEMENT = 15 +OP_EQUAL = 16 +OP_NOT_EQUAL = 17 +OP_LESS_THAN = 18 +OP_LESS_THAN_EQUAL = 19 +OP_GREATER_THAN = 20 +OP_GREATER_THAN_EQUAL = 21 +OP_SAME = 22 +OP_NOT_SAME = 23 +OP_CONTAINS = 24 +OP_NOT_CONTAINS = 25 +OP_PRE_INCREMENT = 26 +OP_POST_INCREMENT = 27 +OP_PRE_DECREMENT = 28 +OP_POST_DECREMENT = 29 +OP_NEGATIVE = 30 +OP_POSITIVE = 31 +OP_BITWISE_COMPLEMENT = 32 +OP_DEREFERENCE = 33 +OP_TAKE_ADDRESS = 34 +FILE = 35 +OP_BOOLEAN_AND = 36 +OP_BOOLEAN_OR = 37 +OP_BOOLEAN_NOT = 38 +OP_BOOLEAN_XOR = 39 +OP_ADD = 40 +OP_SUBSTRACT = 41 +OP_MULTIPLY = 42 +OP_DIVIDE = 43 +OP_MOD = 44 +PACKAGE_DECLARATION = 45 +IMPORT_DECLARATION = 46 +IMPORT_PATH = 47 +IMPORT_ALIAS = 48 +FUNCTION_DECLARATION = 49 +FUNCTION_DECLARATION_BODY = 50 +FUNCTION_DECLARATION_NAME = 51 +FUNCTION_DECLARATION_RECEIVER = 52 +FUNCTION_DECLARATION_ARGUMENT = 53 +FUNCTION_DECLARATION_ARGUMENT_NAME = 54 +FUNCTION_DECLARATION_ARGUMENT_DEFAULT_VALUE = 55 +FUNCTION_DECLARATION_VAR_ARGS_LIST = 56 +TYPE_DECLARATION = 57 +TYPE_DECLARATION_BODY = 58 +TYPE_DECLARATION_BASES = 59 +TYPE_DECLARATION_IMPLEMENTS = 60 +VISIBLE_FROM_INSTANCE = 61 +VISIBLE_FROM_TYPE = 62 +VISIBLE_FROM_SUBTYPE = 63 +VISIBLE_FROM_PACKAGE = 64 +VISIBLE_FROM_SUBPACKAGE = 65 +VISIBLE_FROM_MODULE = 66 +VISIBLE_FROM_FRIEND = 67 +VISIBLE_FROM_WORLD = 68 +IF = 69 +IF_CONDITION = 70 +IF_BODY = 71 +IF_ELSE = 72 +SWITCH = 73 +SWITCH_CASE = 74 +SWITCH_CASE_CONDITION = 75 +SWITCH_CASE_BODY = 76 +SWITCH_DEFAULT = 77 +FOR = 78 +FOR_INIT = 79 +FOR_EXPRESSION = 80 +FOR_UPDATE = 81 +FOR_BODY = 82 +FOR_EACH = 83 +WHILE = 84 +WHILE_CONDITION = 85 +WHILE_BODY = 86 +DO_WHILE = 87 +DO_WHILE_CONDITION = 88 +DO_WHILE_BODY = 89 +BREAK = 90 +CONTINUE = 91 +GOTO = 92 +BLOCK = 93 +BLOCK_SCOPE = 94 +RETURN = 95 +TRY = 96 +TRY_BODY = 97 +TRY_CATCH = 98 +TRY_FINALLY = 99 +THROW = 100 +ASSERT = 101 +CALL = 102 +CALL_RECEIVER = 103 +CALL_CALLEE = 104 +CALL_POSITIONAL_ARGUMENT = 105 +CALL_NAMED_ARGUMENT = 106 +CALL_NAMED_ARGUMENT_NAME = 107 +CALL_NAMED_ARGUMENT_VALUE = 108 +NOOP = 109 +BOOLEAN_LITERAL = 110 +BYTE_LITERAL = 111 +BYTE_STRING_LITERAL = 112 +CHARACTER_LITERAL = 113 +LIST_LITERAL = 114 +MAP_LITERAL = 115 +NULL_LITERAL = 116 +NUMBER_LITERAL = 117 +REGEXP_LITERAL = 118 +SET_LITERAL = 119 +STRING_LITERAL = 120 +TUPLE_LITERAL = 121 +TYPE_LITERAL = 122 +OTHER_LITERAL = 123 +MAP_ENTRY = 124 +MAP_KEY = 125 +MAP_VALUE = 126 +TYPE = 127 +PRIMITIVE_TYPE = 128 +ASSIGNMENT = 129 +ASSIGNMENT_VARIABLE = 130 +ASSIGNMENT_VALUE = 131 +AUGMENTED_ASSIGNMENT = 132 +AUGMENTED_ASSIGNMENT_OPERATOR = 133 +AUGMENTED_ASSIGNMENT_VARIABLE = 134 +AUGMENTED_ASSIGNMENT_VALUE = 135 +THIS = 136 +COMMENT = 137 +DOCUMENTATION = 138 +WHITESPACE = 139 + + + +_NODE_PROPERTIESENTRY = _descriptor.Descriptor( + name='PropertiesEntry', + full_name='github.com.bblfsh.sdk.uast.Node.PropertiesEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='github.com.bblfsh.sdk.uast.Node.PropertiesEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='github.com.bblfsh.sdk.uast.Node.PropertiesEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=461, + serialized_end=510, +) + +_NODE = _descriptor.Descriptor( + name='Node', + full_name='github.com.bblfsh.sdk.uast.Node', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='internal_type', full_name='github.com.bblfsh.sdk.uast.Node.internal_type', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='properties', full_name='github.com.bblfsh.sdk.uast.Node.properties', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='children', full_name='github.com.bblfsh.sdk.uast.Node.children', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='token', full_name='github.com.bblfsh.sdk.uast.Node.token', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='start_position', full_name='github.com.bblfsh.sdk.uast.Node.start_position', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='end_position', full_name='github.com.bblfsh.sdk.uast.Node.end_position', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='roles', full_name='github.com.bblfsh.sdk.uast.Node.roles', index=6, + number=7, type=14, cpp_type=8, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_NODE_PROPERTIESENTRY, ], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\210\240\037\000\230\240\037\000\360\241\037\000')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=122, + serialized_end=524, +) + + +_POSITION = _descriptor.Descriptor( + name='Position', + full_name='github.com.bblfsh.sdk.uast.Position', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='offset', full_name='github.com.bblfsh.sdk.uast.Position.offset', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='line', full_name='github.com.bblfsh.sdk.uast.Position.line', index=1, + number=2, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='col', full_name='github.com.bblfsh.sdk.uast.Position.col', index=2, + number=3, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\210\240\037\000\360\241\037\000')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=526, + serialized_end=589, +) + +_NODE_PROPERTIESENTRY.containing_type = _NODE +_NODE.fields_by_name['properties'].message_type = _NODE_PROPERTIESENTRY +_NODE.fields_by_name['children'].message_type = _NODE +_NODE.fields_by_name['start_position'].message_type = _POSITION +_NODE.fields_by_name['end_position'].message_type = _POSITION +_NODE.fields_by_name['roles'].enum_type = _ROLE +DESCRIPTOR.message_types_by_name['Node'] = _NODE +DESCRIPTOR.message_types_by_name['Position'] = _POSITION +DESCRIPTOR.enum_types_by_name['Role'] = _ROLE + +Node = _reflection.GeneratedProtocolMessageType('Node', (_message.Message,), dict( + + PropertiesEntry = _reflection.GeneratedProtocolMessageType('PropertiesEntry', (_message.Message,), dict( + DESCRIPTOR = _NODE_PROPERTIESENTRY, + __module__ = 'github.com.bblfsh.sdk.uast.generated_pb2' + # @@protoc_insertion_point(class_scope:github.com.bblfsh.sdk.uast.Node.PropertiesEntry) + )) + , + DESCRIPTOR = _NODE, + __module__ = 'github.com.bblfsh.sdk.uast.generated_pb2' + # @@protoc_insertion_point(class_scope:github.com.bblfsh.sdk.uast.Node) + )) +_sym_db.RegisterMessage(Node) +_sym_db.RegisterMessage(Node.PropertiesEntry) + +Position = _reflection.GeneratedProtocolMessageType('Position', (_message.Message,), dict( + DESCRIPTOR = _POSITION, + __module__ = 'github.com.bblfsh.sdk.uast.generated_pb2' + # @@protoc_insertion_point(class_scope:github.com.bblfsh.sdk.uast.Position) + )) +_sym_db.RegisterMessage(Position) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\004uast\240\343\036\001\340\342\036\000')) +_ROLE.has_options = True +_ROLE._options = _descriptor._ParseOptions(descriptor_pb2.EnumOptions(), _b('\300\244\036\000\210\243\036\000\250\244\036\000')) +_ROLE.values_by_name["SIMPLE_IDENTIFIER"].has_options = True +_ROLE.values_by_name["SIMPLE_IDENTIFIER"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \020SimpleIdentifier')) +_ROLE.values_by_name["QUALIFIED_IDENTIFIER"].has_options = True +_ROLE.values_by_name["QUALIFIED_IDENTIFIER"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023QualifiedIdentifier')) +_ROLE.values_by_name["BINARY_EXPRESSION"].has_options = True +_ROLE.values_by_name["BINARY_EXPRESSION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \020BinaryExpression')) +_ROLE.values_by_name["BINARY_EXPRESSION_LEFT"].has_options = True +_ROLE.values_by_name["BINARY_EXPRESSION_LEFT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \024BinaryExpressionLeft')) +_ROLE.values_by_name["BINARY_EXPRESSION_RIGHT"].has_options = True +_ROLE.values_by_name["BINARY_EXPRESSION_RIGHT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \025BinaryExpressionRight')) +_ROLE.values_by_name["BINARY_EXPRESSION_OP"].has_options = True +_ROLE.values_by_name["BINARY_EXPRESSION_OP"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022BinaryExpressionOp')) +_ROLE.values_by_name["INFIX"].has_options = True +_ROLE.values_by_name["INFIX"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Infix')) +_ROLE.values_by_name["POSTFIX"].has_options = True +_ROLE.values_by_name["POSTFIX"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007Postfix')) +_ROLE.values_by_name["OP_BITWISE_LEFT_SHIFT"].has_options = True +_ROLE.values_by_name["OP_BITWISE_LEFT_SHIFT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022OpBitwiseLeftShift')) +_ROLE.values_by_name["OP_BITWISE_RIGHT_SHIFT"].has_options = True +_ROLE.values_by_name["OP_BITWISE_RIGHT_SHIFT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023OpBitwiseRightShift')) +_ROLE.values_by_name["OP_BITWISE_UNSIGNED_RIGHT_SHIFT"].has_options = True +_ROLE.values_by_name["OP_BITWISE_UNSIGNED_RIGHT_SHIFT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \033OpBitwiseUnsignedRightShift')) +_ROLE.values_by_name["OP_BITWISE_OR"].has_options = True +_ROLE.values_by_name["OP_BITWISE_OR"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013OpBitwiseOr')) +_ROLE.values_by_name["OP_BITWISE_XOR"].has_options = True +_ROLE.values_by_name["OP_BITWISE_XOR"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OpBitwiseXor')) +_ROLE.values_by_name["OP_BITWISE_AND"].has_options = True +_ROLE.values_by_name["OP_BITWISE_AND"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OpBitwiseAnd')) +_ROLE.values_by_name["EXPRESSION"].has_options = True +_ROLE.values_by_name["EXPRESSION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nExpression')) +_ROLE.values_by_name["STATEMENT"].has_options = True +_ROLE.values_by_name["STATEMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \tStatement')) +_ROLE.values_by_name["OP_EQUAL"].has_options = True +_ROLE.values_by_name["OP_EQUAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007OpEqual')) +_ROLE.values_by_name["OP_NOT_EQUAL"].has_options = True +_ROLE.values_by_name["OP_NOT_EQUAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpNotEqual')) +_ROLE.values_by_name["OP_LESS_THAN"].has_options = True +_ROLE.values_by_name["OP_LESS_THAN"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpLessThan')) +_ROLE.values_by_name["OP_LESS_THAN_EQUAL"].has_options = True +_ROLE.values_by_name["OP_LESS_THAN_EQUAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017OpLessThanEqual')) +_ROLE.values_by_name["OP_GREATER_THAN"].has_options = True +_ROLE.values_by_name["OP_GREATER_THAN"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rOpGreaterThan')) +_ROLE.values_by_name["OP_GREATER_THAN_EQUAL"].has_options = True +_ROLE.values_by_name["OP_GREATER_THAN_EQUAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022OpGreaterThanEqual')) +_ROLE.values_by_name["OP_SAME"].has_options = True +_ROLE.values_by_name["OP_SAME"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006OpSame')) +_ROLE.values_by_name["OP_NOT_SAME"].has_options = True +_ROLE.values_by_name["OP_NOT_SAME"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \tOpNotSame')) +_ROLE.values_by_name["OP_CONTAINS"].has_options = True +_ROLE.values_by_name["OP_CONTAINS"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpContains')) +_ROLE.values_by_name["OP_NOT_CONTAINS"].has_options = True +_ROLE.values_by_name["OP_NOT_CONTAINS"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rOpNotContains')) +_ROLE.values_by_name["OP_PRE_INCREMENT"].has_options = True +_ROLE.values_by_name["OP_PRE_INCREMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \016OpPreIncrement')) +_ROLE.values_by_name["OP_POST_INCREMENT"].has_options = True +_ROLE.values_by_name["OP_POST_INCREMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017OpPostIncrement')) +_ROLE.values_by_name["OP_PRE_DECREMENT"].has_options = True +_ROLE.values_by_name["OP_PRE_DECREMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \016OpPreDecrement')) +_ROLE.values_by_name["OP_POST_DECREMENT"].has_options = True +_ROLE.values_by_name["OP_POST_DECREMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017OpPostDecrement')) +_ROLE.values_by_name["OP_NEGATIVE"].has_options = True +_ROLE.values_by_name["OP_NEGATIVE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpNegative')) +_ROLE.values_by_name["OP_POSITIVE"].has_options = True +_ROLE.values_by_name["OP_POSITIVE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpPositive')) +_ROLE.values_by_name["OP_BITWISE_COMPLEMENT"].has_options = True +_ROLE.values_by_name["OP_BITWISE_COMPLEMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023OpBitwiseComplement')) +_ROLE.values_by_name["OP_DEREFERENCE"].has_options = True +_ROLE.values_by_name["OP_DEREFERENCE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rOpDereference')) +_ROLE.values_by_name["OP_TAKE_ADDRESS"].has_options = True +_ROLE.values_by_name["OP_TAKE_ADDRESS"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rOpTakeAddress')) +_ROLE.values_by_name["FILE"].has_options = True +_ROLE.values_by_name["FILE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004File')) +_ROLE.values_by_name["OP_BOOLEAN_AND"].has_options = True +_ROLE.values_by_name["OP_BOOLEAN_AND"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OpBooleanAnd')) +_ROLE.values_by_name["OP_BOOLEAN_OR"].has_options = True +_ROLE.values_by_name["OP_BOOLEAN_OR"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013OpBooleanOr')) +_ROLE.values_by_name["OP_BOOLEAN_NOT"].has_options = True +_ROLE.values_by_name["OP_BOOLEAN_NOT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OpBooleanNot')) +_ROLE.values_by_name["OP_BOOLEAN_XOR"].has_options = True +_ROLE.values_by_name["OP_BOOLEAN_XOR"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OpBooleanXor')) +_ROLE.values_by_name["OP_ADD"].has_options = True +_ROLE.values_by_name["OP_ADD"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005OpAdd')) +_ROLE.values_by_name["OP_SUBSTRACT"].has_options = True +_ROLE.values_by_name["OP_SUBSTRACT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013OpSubstract')) +_ROLE.values_by_name["OP_MULTIPLY"].has_options = True +_ROLE.values_by_name["OP_MULTIPLY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nOpMultiply')) +_ROLE.values_by_name["OP_DIVIDE"].has_options = True +_ROLE.values_by_name["OP_DIVIDE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \010OpDivide')) +_ROLE.values_by_name["OP_MOD"].has_options = True +_ROLE.values_by_name["OP_MOD"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005OpMod')) +_ROLE.values_by_name["PACKAGE_DECLARATION"].has_options = True +_ROLE.values_by_name["PACKAGE_DECLARATION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022PackageDeclaration')) +_ROLE.values_by_name["IMPORT_DECLARATION"].has_options = True +_ROLE.values_by_name["IMPORT_DECLARATION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \021ImportDeclaration')) +_ROLE.values_by_name["IMPORT_PATH"].has_options = True +_ROLE.values_by_name["IMPORT_PATH"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nImportPath')) +_ROLE.values_by_name["IMPORT_ALIAS"].has_options = True +_ROLE.values_by_name["IMPORT_ALIAS"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013ImportAlias')) +_ROLE.values_by_name["FUNCTION_DECLARATION"].has_options = True +_ROLE.values_by_name["FUNCTION_DECLARATION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023FunctionDeclaration')) +_ROLE.values_by_name["FUNCTION_DECLARATION_BODY"].has_options = True +_ROLE.values_by_name["FUNCTION_DECLARATION_BODY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \027FunctionDeclarationBody')) +_ROLE.values_by_name["FUNCTION_DECLARATION_NAME"].has_options = True +_ROLE.values_by_name["FUNCTION_DECLARATION_NAME"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \027FunctionDeclarationName')) +_ROLE.values_by_name["FUNCTION_DECLARATION_RECEIVER"].has_options = True +_ROLE.values_by_name["FUNCTION_DECLARATION_RECEIVER"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \033FunctionDeclarationReceiver')) +_ROLE.values_by_name["FUNCTION_DECLARATION_ARGUMENT"].has_options = True +_ROLE.values_by_name["FUNCTION_DECLARATION_ARGUMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \033FunctionDeclarationArgument')) +_ROLE.values_by_name["FUNCTION_DECLARATION_ARGUMENT_NAME"].has_options = True +_ROLE.values_by_name["FUNCTION_DECLARATION_ARGUMENT_NAME"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \037FunctionDeclarationArgumentName')) +_ROLE.values_by_name["FUNCTION_DECLARATION_ARGUMENT_DEFAULT_VALUE"].has_options = True +_ROLE.values_by_name["FUNCTION_DECLARATION_ARGUMENT_DEFAULT_VALUE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \'FunctionDeclarationArgumentDefaultValue')) +_ROLE.values_by_name["FUNCTION_DECLARATION_VAR_ARGS_LIST"].has_options = True +_ROLE.values_by_name["FUNCTION_DECLARATION_VAR_ARGS_LIST"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \036FunctionDeclarationVarArgsList')) +_ROLE.values_by_name["TYPE_DECLARATION"].has_options = True +_ROLE.values_by_name["TYPE_DECLARATION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017TypeDeclaration')) +_ROLE.values_by_name["TYPE_DECLARATION_BODY"].has_options = True +_ROLE.values_by_name["TYPE_DECLARATION_BODY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023TypeDeclarationBody')) +_ROLE.values_by_name["TYPE_DECLARATION_BASES"].has_options = True +_ROLE.values_by_name["TYPE_DECLARATION_BASES"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \024TypeDeclarationBases')) +_ROLE.values_by_name["TYPE_DECLARATION_IMPLEMENTS"].has_options = True +_ROLE.values_by_name["TYPE_DECLARATION_IMPLEMENTS"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \031TypeDeclarationImplements')) +_ROLE.values_by_name["VISIBLE_FROM_INSTANCE"].has_options = True +_ROLE.values_by_name["VISIBLE_FROM_INSTANCE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023VisibleFromInstance')) +_ROLE.values_by_name["VISIBLE_FROM_TYPE"].has_options = True +_ROLE.values_by_name["VISIBLE_FROM_TYPE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017VisibleFromType')) +_ROLE.values_by_name["VISIBLE_FROM_SUBTYPE"].has_options = True +_ROLE.values_by_name["VISIBLE_FROM_SUBTYPE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022VisibleFromSubtype')) +_ROLE.values_by_name["VISIBLE_FROM_PACKAGE"].has_options = True +_ROLE.values_by_name["VISIBLE_FROM_PACKAGE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022VisibleFromPackage')) +_ROLE.values_by_name["VISIBLE_FROM_SUBPACKAGE"].has_options = True +_ROLE.values_by_name["VISIBLE_FROM_SUBPACKAGE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \025VisibleFromSubpackage')) +_ROLE.values_by_name["VISIBLE_FROM_MODULE"].has_options = True +_ROLE.values_by_name["VISIBLE_FROM_MODULE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \021VisibleFromModule')) +_ROLE.values_by_name["VISIBLE_FROM_FRIEND"].has_options = True +_ROLE.values_by_name["VISIBLE_FROM_FRIEND"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \021VisibleFromFriend')) +_ROLE.values_by_name["VISIBLE_FROM_WORLD"].has_options = True +_ROLE.values_by_name["VISIBLE_FROM_WORLD"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \020VisibleFromWorld')) +_ROLE.values_by_name["IF"].has_options = True +_ROLE.values_by_name["IF"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \002If')) +_ROLE.values_by_name["IF_CONDITION"].has_options = True +_ROLE.values_by_name["IF_CONDITION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013IfCondition')) +_ROLE.values_by_name["IF_BODY"].has_options = True +_ROLE.values_by_name["IF_BODY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006IfBody')) +_ROLE.values_by_name["IF_ELSE"].has_options = True +_ROLE.values_by_name["IF_ELSE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006IfElse')) +_ROLE.values_by_name["SWITCH"].has_options = True +_ROLE.values_by_name["SWITCH"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006Switch')) +_ROLE.values_by_name["SWITCH_CASE"].has_options = True +_ROLE.values_by_name["SWITCH_CASE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nSwitchCase')) +_ROLE.values_by_name["SWITCH_CASE_CONDITION"].has_options = True +_ROLE.values_by_name["SWITCH_CASE_CONDITION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023SwitchCaseCondition')) +_ROLE.values_by_name["SWITCH_CASE_BODY"].has_options = True +_ROLE.values_by_name["SWITCH_CASE_BODY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \016SwitchCaseBody')) +_ROLE.values_by_name["SWITCH_DEFAULT"].has_options = True +_ROLE.values_by_name["SWITCH_DEFAULT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rSwitchDefault')) +_ROLE.values_by_name["FOR"].has_options = True +_ROLE.values_by_name["FOR"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \003For')) +_ROLE.values_by_name["FOR_INIT"].has_options = True +_ROLE.values_by_name["FOR_INIT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007ForInit')) +_ROLE.values_by_name["FOR_EXPRESSION"].has_options = True +_ROLE.values_by_name["FOR_EXPRESSION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rForExpression')) +_ROLE.values_by_name["FOR_UPDATE"].has_options = True +_ROLE.values_by_name["FOR_UPDATE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \tForUpdate')) +_ROLE.values_by_name["FOR_BODY"].has_options = True +_ROLE.values_by_name["FOR_BODY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007ForBody')) +_ROLE.values_by_name["FOR_EACH"].has_options = True +_ROLE.values_by_name["FOR_EACH"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007ForEach')) +_ROLE.values_by_name["WHILE"].has_options = True +_ROLE.values_by_name["WHILE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005While')) +_ROLE.values_by_name["WHILE_CONDITION"].has_options = True +_ROLE.values_by_name["WHILE_CONDITION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \016WhileCondition')) +_ROLE.values_by_name["WHILE_BODY"].has_options = True +_ROLE.values_by_name["WHILE_BODY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \tWhileBody')) +_ROLE.values_by_name["DO_WHILE"].has_options = True +_ROLE.values_by_name["DO_WHILE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007DoWhile')) +_ROLE.values_by_name["DO_WHILE_CONDITION"].has_options = True +_ROLE.values_by_name["DO_WHILE_CONDITION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \020DoWhileCondition')) +_ROLE.values_by_name["DO_WHILE_BODY"].has_options = True +_ROLE.values_by_name["DO_WHILE_BODY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013DoWhileBody')) +_ROLE.values_by_name["BREAK"].has_options = True +_ROLE.values_by_name["BREAK"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Break')) +_ROLE.values_by_name["CONTINUE"].has_options = True +_ROLE.values_by_name["CONTINUE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \010Continue')) +_ROLE.values_by_name["GOTO"].has_options = True +_ROLE.values_by_name["GOTO"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004Goto')) +_ROLE.values_by_name["BLOCK"].has_options = True +_ROLE.values_by_name["BLOCK"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Block')) +_ROLE.values_by_name["BLOCK_SCOPE"].has_options = True +_ROLE.values_by_name["BLOCK_SCOPE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nBlockScope')) +_ROLE.values_by_name["RETURN"].has_options = True +_ROLE.values_by_name["RETURN"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006Return')) +_ROLE.values_by_name["TRY"].has_options = True +_ROLE.values_by_name["TRY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \003Try')) +_ROLE.values_by_name["TRY_BODY"].has_options = True +_ROLE.values_by_name["TRY_BODY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007TryBody')) +_ROLE.values_by_name["TRY_CATCH"].has_options = True +_ROLE.values_by_name["TRY_CATCH"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \010TryCatch')) +_ROLE.values_by_name["TRY_FINALLY"].has_options = True +_ROLE.values_by_name["TRY_FINALLY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nTryFinally')) +_ROLE.values_by_name["THROW"].has_options = True +_ROLE.values_by_name["THROW"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \005Throw')) +_ROLE.values_by_name["ASSERT"].has_options = True +_ROLE.values_by_name["ASSERT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006Assert')) +_ROLE.values_by_name["CALL"].has_options = True +_ROLE.values_by_name["CALL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004Call')) +_ROLE.values_by_name["CALL_RECEIVER"].has_options = True +_ROLE.values_by_name["CALL_RECEIVER"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014CallReceiver')) +_ROLE.values_by_name["CALL_CALLEE"].has_options = True +_ROLE.values_by_name["CALL_CALLEE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nCallCallee')) +_ROLE.values_by_name["CALL_POSITIONAL_ARGUMENT"].has_options = True +_ROLE.values_by_name["CALL_POSITIONAL_ARGUMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \026CallPositionalArgument')) +_ROLE.values_by_name["CALL_NAMED_ARGUMENT"].has_options = True +_ROLE.values_by_name["CALL_NAMED_ARGUMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \021CallNamedArgument')) +_ROLE.values_by_name["CALL_NAMED_ARGUMENT_NAME"].has_options = True +_ROLE.values_by_name["CALL_NAMED_ARGUMENT_NAME"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \025CallNamedArgumentName')) +_ROLE.values_by_name["CALL_NAMED_ARGUMENT_VALUE"].has_options = True +_ROLE.values_by_name["CALL_NAMED_ARGUMENT_VALUE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \026CallNamedArgumentValue')) +_ROLE.values_by_name["NOOP"].has_options = True +_ROLE.values_by_name["NOOP"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004Noop')) +_ROLE.values_by_name["BOOLEAN_LITERAL"].has_options = True +_ROLE.values_by_name["BOOLEAN_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \016BooleanLiteral')) +_ROLE.values_by_name["BYTE_LITERAL"].has_options = True +_ROLE.values_by_name["BYTE_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013ByteLiteral')) +_ROLE.values_by_name["BYTE_STRING_LITERAL"].has_options = True +_ROLE.values_by_name["BYTE_STRING_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \021ByteStringLiteral')) +_ROLE.values_by_name["CHARACTER_LITERAL"].has_options = True +_ROLE.values_by_name["CHARACTER_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \020CharacterLiteral')) +_ROLE.values_by_name["LIST_LITERAL"].has_options = True +_ROLE.values_by_name["LIST_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013ListLiteral')) +_ROLE.values_by_name["MAP_LITERAL"].has_options = True +_ROLE.values_by_name["MAP_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nMapLiteral')) +_ROLE.values_by_name["NULL_LITERAL"].has_options = True +_ROLE.values_by_name["NULL_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013NullLiteral')) +_ROLE.values_by_name["NUMBER_LITERAL"].has_options = True +_ROLE.values_by_name["NUMBER_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rNumberLiteral')) +_ROLE.values_by_name["REGEXP_LITERAL"].has_options = True +_ROLE.values_by_name["REGEXP_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rRegexpLiteral')) +_ROLE.values_by_name["SET_LITERAL"].has_options = True +_ROLE.values_by_name["SET_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nSetLiteral')) +_ROLE.values_by_name["STRING_LITERAL"].has_options = True +_ROLE.values_by_name["STRING_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rStringLiteral')) +_ROLE.values_by_name["TUPLE_LITERAL"].has_options = True +_ROLE.values_by_name["TUPLE_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014TupleLiteral')) +_ROLE.values_by_name["TYPE_LITERAL"].has_options = True +_ROLE.values_by_name["TYPE_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \013TypeLiteral')) +_ROLE.values_by_name["OTHER_LITERAL"].has_options = True +_ROLE.values_by_name["OTHER_LITERAL"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \014OtherLiteral')) +_ROLE.values_by_name["MAP_ENTRY"].has_options = True +_ROLE.values_by_name["MAP_ENTRY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \010MapEntry')) +_ROLE.values_by_name["MAP_KEY"].has_options = True +_ROLE.values_by_name["MAP_KEY"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \006MapKey')) +_ROLE.values_by_name["MAP_VALUE"].has_options = True +_ROLE.values_by_name["MAP_VALUE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \010MapValue')) +_ROLE.values_by_name["TYPE"].has_options = True +_ROLE.values_by_name["TYPE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004Type')) +_ROLE.values_by_name["PRIMITIVE_TYPE"].has_options = True +_ROLE.values_by_name["PRIMITIVE_TYPE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rPrimitiveType')) +_ROLE.values_by_name["ASSIGNMENT"].has_options = True +_ROLE.values_by_name["ASSIGNMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nAssignment')) +_ROLE.values_by_name["ASSIGNMENT_VARIABLE"].has_options = True +_ROLE.values_by_name["ASSIGNMENT_VARIABLE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \022AssignmentVariable')) +_ROLE.values_by_name["ASSIGNMENT_VALUE"].has_options = True +_ROLE.values_by_name["ASSIGNMENT_VALUE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \017AssignmentValue')) +_ROLE.values_by_name["AUGMENTED_ASSIGNMENT"].has_options = True +_ROLE.values_by_name["AUGMENTED_ASSIGNMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \023AugmentedAssignment')) +_ROLE.values_by_name["AUGMENTED_ASSIGNMENT_OPERATOR"].has_options = True +_ROLE.values_by_name["AUGMENTED_ASSIGNMENT_OPERATOR"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \033AugmentedAssignmentOperator')) +_ROLE.values_by_name["AUGMENTED_ASSIGNMENT_VARIABLE"].has_options = True +_ROLE.values_by_name["AUGMENTED_ASSIGNMENT_VARIABLE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \033AugmentedAssignmentVariable')) +_ROLE.values_by_name["AUGMENTED_ASSIGNMENT_VALUE"].has_options = True +_ROLE.values_by_name["AUGMENTED_ASSIGNMENT_VALUE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \030AugmentedAssignmentValue')) +_ROLE.values_by_name["THIS"].has_options = True +_ROLE.values_by_name["THIS"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \004This')) +_ROLE.values_by_name["COMMENT"].has_options = True +_ROLE.values_by_name["COMMENT"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \007Comment')) +_ROLE.values_by_name["DOCUMENTATION"].has_options = True +_ROLE.values_by_name["DOCUMENTATION"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \rDocumentation')) +_ROLE.values_by_name["WHITESPACE"].has_options = True +_ROLE.values_by_name["WHITESPACE"]._options = _descriptor._ParseOptions(descriptor_pb2.EnumValueOptions(), _b('\212\235 \nWhitespace')) +_NODE_PROPERTIESENTRY.has_options = True +_NODE_PROPERTIESENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) +_NODE.has_options = True +_NODE._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\210\240\037\000\230\240\037\000\360\241\037\000')) +_POSITION.has_options = True +_POSITION._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\210\240\037\000\360\241\037\000')) +# @@protoc_insertion_point(module_scope) diff --git a/bblfsh/github/com/gogo/__init__.py b/bblfsh/github/com/gogo/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bblfsh/github/com/gogo/protobuf/__init__.py b/bblfsh/github/com/gogo/protobuf/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bblfsh/github/com/gogo/protobuf/gogoproto/__init__.py b/bblfsh/github/com/gogo/protobuf/gogoproto/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bblfsh/github/com/gogo/protobuf/gogoproto/gogo_pb2.py b/bblfsh/github/com/gogo/protobuf/gogoproto/gogo_pb2.py new file mode 100644 index 0000000..fca72c2 --- /dev/null +++ b/bblfsh/github/com/gogo/protobuf/gogoproto/gogo_pb2.py @@ -0,0 +1,724 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: github.com/gogo/protobuf/gogoproto/gogo.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='github.com/gogo/protobuf/gogoproto/gogo.proto', + package='gogoproto', + syntax='proto2', + serialized_pb=_b('\n-github.com/gogo/protobuf/gogoproto/gogo.proto\x12\tgogoproto\x1a google/protobuf/descriptor.proto:;\n\x13goproto_enum_prefix\x12\x1c.google.protobuf.EnumOptions\x18\xb1\xe4\x03 \x01(\x08:=\n\x15goproto_enum_stringer\x12\x1c.google.protobuf.EnumOptions\x18\xc5\xe4\x03 \x01(\x08:5\n\renum_stringer\x12\x1c.google.protobuf.EnumOptions\x18\xc6\xe4\x03 \x01(\x08:7\n\x0f\x65num_customname\x12\x1c.google.protobuf.EnumOptions\x18\xc7\xe4\x03 \x01(\t:0\n\x08\x65numdecl\x12\x1c.google.protobuf.EnumOptions\x18\xc8\xe4\x03 \x01(\x08:A\n\x14\x65numvalue_customname\x12!.google.protobuf.EnumValueOptions\x18\xd1\x83\x04 \x01(\t:;\n\x13goproto_getters_all\x12\x1c.google.protobuf.FileOptions\x18\x99\xec\x03 \x01(\x08:?\n\x17goproto_enum_prefix_all\x12\x1c.google.protobuf.FileOptions\x18\x9a\xec\x03 \x01(\x08:<\n\x14goproto_stringer_all\x12\x1c.google.protobuf.FileOptions\x18\x9b\xec\x03 \x01(\x08:9\n\x11verbose_equal_all\x12\x1c.google.protobuf.FileOptions\x18\x9c\xec\x03 \x01(\x08:0\n\x08\x66\x61\x63\x65_all\x12\x1c.google.protobuf.FileOptions\x18\x9d\xec\x03 \x01(\x08:4\n\x0cgostring_all\x12\x1c.google.protobuf.FileOptions\x18\x9e\xec\x03 \x01(\x08:4\n\x0cpopulate_all\x12\x1c.google.protobuf.FileOptions\x18\x9f\xec\x03 \x01(\x08:4\n\x0cstringer_all\x12\x1c.google.protobuf.FileOptions\x18\xa0\xec\x03 \x01(\x08:3\n\x0bonlyone_all\x12\x1c.google.protobuf.FileOptions\x18\xa1\xec\x03 \x01(\x08:1\n\tequal_all\x12\x1c.google.protobuf.FileOptions\x18\xa5\xec\x03 \x01(\x08:7\n\x0f\x64\x65scription_all\x12\x1c.google.protobuf.FileOptions\x18\xa6\xec\x03 \x01(\x08:3\n\x0btestgen_all\x12\x1c.google.protobuf.FileOptions\x18\xa7\xec\x03 \x01(\x08:4\n\x0c\x62\x65nchgen_all\x12\x1c.google.protobuf.FileOptions\x18\xa8\xec\x03 \x01(\x08:5\n\rmarshaler_all\x12\x1c.google.protobuf.FileOptions\x18\xa9\xec\x03 \x01(\x08:7\n\x0funmarshaler_all\x12\x1c.google.protobuf.FileOptions\x18\xaa\xec\x03 \x01(\x08:<\n\x14stable_marshaler_all\x12\x1c.google.protobuf.FileOptions\x18\xab\xec\x03 \x01(\x08:1\n\tsizer_all\x12\x1c.google.protobuf.FileOptions\x18\xac\xec\x03 \x01(\x08:A\n\x19goproto_enum_stringer_all\x12\x1c.google.protobuf.FileOptions\x18\xad\xec\x03 \x01(\x08:9\n\x11\x65num_stringer_all\x12\x1c.google.protobuf.FileOptions\x18\xae\xec\x03 \x01(\x08:<\n\x14unsafe_marshaler_all\x12\x1c.google.protobuf.FileOptions\x18\xaf\xec\x03 \x01(\x08:>\n\x16unsafe_unmarshaler_all\x12\x1c.google.protobuf.FileOptions\x18\xb0\xec\x03 \x01(\x08:B\n\x1agoproto_extensions_map_all\x12\x1c.google.protobuf.FileOptions\x18\xb1\xec\x03 \x01(\x08:@\n\x18goproto_unrecognized_all\x12\x1c.google.protobuf.FileOptions\x18\xb2\xec\x03 \x01(\x08:8\n\x10gogoproto_import\x12\x1c.google.protobuf.FileOptions\x18\xb3\xec\x03 \x01(\x08:6\n\x0eprotosizer_all\x12\x1c.google.protobuf.FileOptions\x18\xb4\xec\x03 \x01(\x08:3\n\x0b\x63ompare_all\x12\x1c.google.protobuf.FileOptions\x18\xb5\xec\x03 \x01(\x08:4\n\x0ctypedecl_all\x12\x1c.google.protobuf.FileOptions\x18\xb6\xec\x03 \x01(\x08:4\n\x0c\x65numdecl_all\x12\x1c.google.protobuf.FileOptions\x18\xb7\xec\x03 \x01(\x08:<\n\x14goproto_registration\x12\x1c.google.protobuf.FileOptions\x18\xb8\xec\x03 \x01(\x08::\n\x0fgoproto_getters\x12\x1f.google.protobuf.MessageOptions\x18\x81\xf4\x03 \x01(\x08:;\n\x10goproto_stringer\x12\x1f.google.protobuf.MessageOptions\x18\x83\xf4\x03 \x01(\x08:8\n\rverbose_equal\x12\x1f.google.protobuf.MessageOptions\x18\x84\xf4\x03 \x01(\x08:/\n\x04\x66\x61\x63\x65\x12\x1f.google.protobuf.MessageOptions\x18\x85\xf4\x03 \x01(\x08:3\n\x08gostring\x12\x1f.google.protobuf.MessageOptions\x18\x86\xf4\x03 \x01(\x08:3\n\x08populate\x12\x1f.google.protobuf.MessageOptions\x18\x87\xf4\x03 \x01(\x08:3\n\x08stringer\x12\x1f.google.protobuf.MessageOptions\x18\xc0\x8b\x04 \x01(\x08:2\n\x07onlyone\x12\x1f.google.protobuf.MessageOptions\x18\x89\xf4\x03 \x01(\x08:0\n\x05\x65qual\x12\x1f.google.protobuf.MessageOptions\x18\x8d\xf4\x03 \x01(\x08:6\n\x0b\x64\x65scription\x12\x1f.google.protobuf.MessageOptions\x18\x8e\xf4\x03 \x01(\x08:2\n\x07testgen\x12\x1f.google.protobuf.MessageOptions\x18\x8f\xf4\x03 \x01(\x08:3\n\x08\x62\x65nchgen\x12\x1f.google.protobuf.MessageOptions\x18\x90\xf4\x03 \x01(\x08:4\n\tmarshaler\x12\x1f.google.protobuf.MessageOptions\x18\x91\xf4\x03 \x01(\x08:6\n\x0bunmarshaler\x12\x1f.google.protobuf.MessageOptions\x18\x92\xf4\x03 \x01(\x08:;\n\x10stable_marshaler\x12\x1f.google.protobuf.MessageOptions\x18\x93\xf4\x03 \x01(\x08:0\n\x05sizer\x12\x1f.google.protobuf.MessageOptions\x18\x94\xf4\x03 \x01(\x08:;\n\x10unsafe_marshaler\x12\x1f.google.protobuf.MessageOptions\x18\x97\xf4\x03 \x01(\x08:=\n\x12unsafe_unmarshaler\x12\x1f.google.protobuf.MessageOptions\x18\x98\xf4\x03 \x01(\x08:A\n\x16goproto_extensions_map\x12\x1f.google.protobuf.MessageOptions\x18\x99\xf4\x03 \x01(\x08:?\n\x14goproto_unrecognized\x12\x1f.google.protobuf.MessageOptions\x18\x9a\xf4\x03 \x01(\x08:5\n\nprotosizer\x12\x1f.google.protobuf.MessageOptions\x18\x9c\xf4\x03 \x01(\x08:2\n\x07\x63ompare\x12\x1f.google.protobuf.MessageOptions\x18\x9d\xf4\x03 \x01(\x08:3\n\x08typedecl\x12\x1f.google.protobuf.MessageOptions\x18\x9e\xf4\x03 \x01(\x08:1\n\x08nullable\x12\x1d.google.protobuf.FieldOptions\x18\xe9\xfb\x03 \x01(\x08:.\n\x05\x65mbed\x12\x1d.google.protobuf.FieldOptions\x18\xea\xfb\x03 \x01(\x08:3\n\ncustomtype\x12\x1d.google.protobuf.FieldOptions\x18\xeb\xfb\x03 \x01(\t:3\n\ncustomname\x12\x1d.google.protobuf.FieldOptions\x18\xec\xfb\x03 \x01(\t:0\n\x07jsontag\x12\x1d.google.protobuf.FieldOptions\x18\xed\xfb\x03 \x01(\t:1\n\x08moretags\x12\x1d.google.protobuf.FieldOptions\x18\xee\xfb\x03 \x01(\t:1\n\x08\x63\x61sttype\x12\x1d.google.protobuf.FieldOptions\x18\xef\xfb\x03 \x01(\t:0\n\x07\x63\x61stkey\x12\x1d.google.protobuf.FieldOptions\x18\xf0\xfb\x03 \x01(\t:2\n\tcastvalue\x12\x1d.google.protobuf.FieldOptions\x18\xf1\xfb\x03 \x01(\t:0\n\x07stdtime\x12\x1d.google.protobuf.FieldOptions\x18\xf2\xfb\x03 \x01(\x08:4\n\x0bstdduration\x12\x1d.google.protobuf.FieldOptions\x18\xf3\xfb\x03 \x01(\x08\x42!\n\x13\x63om.google.protobufB\nGoGoProtos') + , + dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,]) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + +GOPROTO_ENUM_PREFIX_FIELD_NUMBER = 62001 +goproto_enum_prefix = _descriptor.FieldDescriptor( + name='goproto_enum_prefix', full_name='gogoproto.goproto_enum_prefix', index=0, + number=62001, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_ENUM_STRINGER_FIELD_NUMBER = 62021 +goproto_enum_stringer = _descriptor.FieldDescriptor( + name='goproto_enum_stringer', full_name='gogoproto.goproto_enum_stringer', index=1, + number=62021, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +ENUM_STRINGER_FIELD_NUMBER = 62022 +enum_stringer = _descriptor.FieldDescriptor( + name='enum_stringer', full_name='gogoproto.enum_stringer', index=2, + number=62022, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +ENUM_CUSTOMNAME_FIELD_NUMBER = 62023 +enum_customname = _descriptor.FieldDescriptor( + name='enum_customname', full_name='gogoproto.enum_customname', index=3, + number=62023, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +ENUMDECL_FIELD_NUMBER = 62024 +enumdecl = _descriptor.FieldDescriptor( + name='enumdecl', full_name='gogoproto.enumdecl', index=4, + number=62024, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +ENUMVALUE_CUSTOMNAME_FIELD_NUMBER = 66001 +enumvalue_customname = _descriptor.FieldDescriptor( + name='enumvalue_customname', full_name='gogoproto.enumvalue_customname', index=5, + number=66001, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_GETTERS_ALL_FIELD_NUMBER = 63001 +goproto_getters_all = _descriptor.FieldDescriptor( + name='goproto_getters_all', full_name='gogoproto.goproto_getters_all', index=6, + number=63001, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_ENUM_PREFIX_ALL_FIELD_NUMBER = 63002 +goproto_enum_prefix_all = _descriptor.FieldDescriptor( + name='goproto_enum_prefix_all', full_name='gogoproto.goproto_enum_prefix_all', index=7, + number=63002, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_STRINGER_ALL_FIELD_NUMBER = 63003 +goproto_stringer_all = _descriptor.FieldDescriptor( + name='goproto_stringer_all', full_name='gogoproto.goproto_stringer_all', index=8, + number=63003, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +VERBOSE_EQUAL_ALL_FIELD_NUMBER = 63004 +verbose_equal_all = _descriptor.FieldDescriptor( + name='verbose_equal_all', full_name='gogoproto.verbose_equal_all', index=9, + number=63004, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +FACE_ALL_FIELD_NUMBER = 63005 +face_all = _descriptor.FieldDescriptor( + name='face_all', full_name='gogoproto.face_all', index=10, + number=63005, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOSTRING_ALL_FIELD_NUMBER = 63006 +gostring_all = _descriptor.FieldDescriptor( + name='gostring_all', full_name='gogoproto.gostring_all', index=11, + number=63006, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +POPULATE_ALL_FIELD_NUMBER = 63007 +populate_all = _descriptor.FieldDescriptor( + name='populate_all', full_name='gogoproto.populate_all', index=12, + number=63007, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +STRINGER_ALL_FIELD_NUMBER = 63008 +stringer_all = _descriptor.FieldDescriptor( + name='stringer_all', full_name='gogoproto.stringer_all', index=13, + number=63008, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +ONLYONE_ALL_FIELD_NUMBER = 63009 +onlyone_all = _descriptor.FieldDescriptor( + name='onlyone_all', full_name='gogoproto.onlyone_all', index=14, + number=63009, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +EQUAL_ALL_FIELD_NUMBER = 63013 +equal_all = _descriptor.FieldDescriptor( + name='equal_all', full_name='gogoproto.equal_all', index=15, + number=63013, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +DESCRIPTION_ALL_FIELD_NUMBER = 63014 +description_all = _descriptor.FieldDescriptor( + name='description_all', full_name='gogoproto.description_all', index=16, + number=63014, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +TESTGEN_ALL_FIELD_NUMBER = 63015 +testgen_all = _descriptor.FieldDescriptor( + name='testgen_all', full_name='gogoproto.testgen_all', index=17, + number=63015, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +BENCHGEN_ALL_FIELD_NUMBER = 63016 +benchgen_all = _descriptor.FieldDescriptor( + name='benchgen_all', full_name='gogoproto.benchgen_all', index=18, + number=63016, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +MARSHALER_ALL_FIELD_NUMBER = 63017 +marshaler_all = _descriptor.FieldDescriptor( + name='marshaler_all', full_name='gogoproto.marshaler_all', index=19, + number=63017, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +UNMARSHALER_ALL_FIELD_NUMBER = 63018 +unmarshaler_all = _descriptor.FieldDescriptor( + name='unmarshaler_all', full_name='gogoproto.unmarshaler_all', index=20, + number=63018, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +STABLE_MARSHALER_ALL_FIELD_NUMBER = 63019 +stable_marshaler_all = _descriptor.FieldDescriptor( + name='stable_marshaler_all', full_name='gogoproto.stable_marshaler_all', index=21, + number=63019, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +SIZER_ALL_FIELD_NUMBER = 63020 +sizer_all = _descriptor.FieldDescriptor( + name='sizer_all', full_name='gogoproto.sizer_all', index=22, + number=63020, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_ENUM_STRINGER_ALL_FIELD_NUMBER = 63021 +goproto_enum_stringer_all = _descriptor.FieldDescriptor( + name='goproto_enum_stringer_all', full_name='gogoproto.goproto_enum_stringer_all', index=23, + number=63021, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +ENUM_STRINGER_ALL_FIELD_NUMBER = 63022 +enum_stringer_all = _descriptor.FieldDescriptor( + name='enum_stringer_all', full_name='gogoproto.enum_stringer_all', index=24, + number=63022, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +UNSAFE_MARSHALER_ALL_FIELD_NUMBER = 63023 +unsafe_marshaler_all = _descriptor.FieldDescriptor( + name='unsafe_marshaler_all', full_name='gogoproto.unsafe_marshaler_all', index=25, + number=63023, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +UNSAFE_UNMARSHALER_ALL_FIELD_NUMBER = 63024 +unsafe_unmarshaler_all = _descriptor.FieldDescriptor( + name='unsafe_unmarshaler_all', full_name='gogoproto.unsafe_unmarshaler_all', index=26, + number=63024, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_EXTENSIONS_MAP_ALL_FIELD_NUMBER = 63025 +goproto_extensions_map_all = _descriptor.FieldDescriptor( + name='goproto_extensions_map_all', full_name='gogoproto.goproto_extensions_map_all', index=27, + number=63025, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_UNRECOGNIZED_ALL_FIELD_NUMBER = 63026 +goproto_unrecognized_all = _descriptor.FieldDescriptor( + name='goproto_unrecognized_all', full_name='gogoproto.goproto_unrecognized_all', index=28, + number=63026, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOGOPROTO_IMPORT_FIELD_NUMBER = 63027 +gogoproto_import = _descriptor.FieldDescriptor( + name='gogoproto_import', full_name='gogoproto.gogoproto_import', index=29, + number=63027, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +PROTOSIZER_ALL_FIELD_NUMBER = 63028 +protosizer_all = _descriptor.FieldDescriptor( + name='protosizer_all', full_name='gogoproto.protosizer_all', index=30, + number=63028, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +COMPARE_ALL_FIELD_NUMBER = 63029 +compare_all = _descriptor.FieldDescriptor( + name='compare_all', full_name='gogoproto.compare_all', index=31, + number=63029, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +TYPEDECL_ALL_FIELD_NUMBER = 63030 +typedecl_all = _descriptor.FieldDescriptor( + name='typedecl_all', full_name='gogoproto.typedecl_all', index=32, + number=63030, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +ENUMDECL_ALL_FIELD_NUMBER = 63031 +enumdecl_all = _descriptor.FieldDescriptor( + name='enumdecl_all', full_name='gogoproto.enumdecl_all', index=33, + number=63031, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_REGISTRATION_FIELD_NUMBER = 63032 +goproto_registration = _descriptor.FieldDescriptor( + name='goproto_registration', full_name='gogoproto.goproto_registration', index=34, + number=63032, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_GETTERS_FIELD_NUMBER = 64001 +goproto_getters = _descriptor.FieldDescriptor( + name='goproto_getters', full_name='gogoproto.goproto_getters', index=35, + number=64001, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_STRINGER_FIELD_NUMBER = 64003 +goproto_stringer = _descriptor.FieldDescriptor( + name='goproto_stringer', full_name='gogoproto.goproto_stringer', index=36, + number=64003, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +VERBOSE_EQUAL_FIELD_NUMBER = 64004 +verbose_equal = _descriptor.FieldDescriptor( + name='verbose_equal', full_name='gogoproto.verbose_equal', index=37, + number=64004, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +FACE_FIELD_NUMBER = 64005 +face = _descriptor.FieldDescriptor( + name='face', full_name='gogoproto.face', index=38, + number=64005, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOSTRING_FIELD_NUMBER = 64006 +gostring = _descriptor.FieldDescriptor( + name='gostring', full_name='gogoproto.gostring', index=39, + number=64006, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +POPULATE_FIELD_NUMBER = 64007 +populate = _descriptor.FieldDescriptor( + name='populate', full_name='gogoproto.populate', index=40, + number=64007, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +STRINGER_FIELD_NUMBER = 67008 +stringer = _descriptor.FieldDescriptor( + name='stringer', full_name='gogoproto.stringer', index=41, + number=67008, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +ONLYONE_FIELD_NUMBER = 64009 +onlyone = _descriptor.FieldDescriptor( + name='onlyone', full_name='gogoproto.onlyone', index=42, + number=64009, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +EQUAL_FIELD_NUMBER = 64013 +equal = _descriptor.FieldDescriptor( + name='equal', full_name='gogoproto.equal', index=43, + number=64013, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +DESCRIPTION_FIELD_NUMBER = 64014 +description = _descriptor.FieldDescriptor( + name='description', full_name='gogoproto.description', index=44, + number=64014, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +TESTGEN_FIELD_NUMBER = 64015 +testgen = _descriptor.FieldDescriptor( + name='testgen', full_name='gogoproto.testgen', index=45, + number=64015, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +BENCHGEN_FIELD_NUMBER = 64016 +benchgen = _descriptor.FieldDescriptor( + name='benchgen', full_name='gogoproto.benchgen', index=46, + number=64016, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +MARSHALER_FIELD_NUMBER = 64017 +marshaler = _descriptor.FieldDescriptor( + name='marshaler', full_name='gogoproto.marshaler', index=47, + number=64017, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +UNMARSHALER_FIELD_NUMBER = 64018 +unmarshaler = _descriptor.FieldDescriptor( + name='unmarshaler', full_name='gogoproto.unmarshaler', index=48, + number=64018, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +STABLE_MARSHALER_FIELD_NUMBER = 64019 +stable_marshaler = _descriptor.FieldDescriptor( + name='stable_marshaler', full_name='gogoproto.stable_marshaler', index=49, + number=64019, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +SIZER_FIELD_NUMBER = 64020 +sizer = _descriptor.FieldDescriptor( + name='sizer', full_name='gogoproto.sizer', index=50, + number=64020, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +UNSAFE_MARSHALER_FIELD_NUMBER = 64023 +unsafe_marshaler = _descriptor.FieldDescriptor( + name='unsafe_marshaler', full_name='gogoproto.unsafe_marshaler', index=51, + number=64023, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +UNSAFE_UNMARSHALER_FIELD_NUMBER = 64024 +unsafe_unmarshaler = _descriptor.FieldDescriptor( + name='unsafe_unmarshaler', full_name='gogoproto.unsafe_unmarshaler', index=52, + number=64024, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_EXTENSIONS_MAP_FIELD_NUMBER = 64025 +goproto_extensions_map = _descriptor.FieldDescriptor( + name='goproto_extensions_map', full_name='gogoproto.goproto_extensions_map', index=53, + number=64025, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +GOPROTO_UNRECOGNIZED_FIELD_NUMBER = 64026 +goproto_unrecognized = _descriptor.FieldDescriptor( + name='goproto_unrecognized', full_name='gogoproto.goproto_unrecognized', index=54, + number=64026, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +PROTOSIZER_FIELD_NUMBER = 64028 +protosizer = _descriptor.FieldDescriptor( + name='protosizer', full_name='gogoproto.protosizer', index=55, + number=64028, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +COMPARE_FIELD_NUMBER = 64029 +compare = _descriptor.FieldDescriptor( + name='compare', full_name='gogoproto.compare', index=56, + number=64029, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +TYPEDECL_FIELD_NUMBER = 64030 +typedecl = _descriptor.FieldDescriptor( + name='typedecl', full_name='gogoproto.typedecl', index=57, + number=64030, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +NULLABLE_FIELD_NUMBER = 65001 +nullable = _descriptor.FieldDescriptor( + name='nullable', full_name='gogoproto.nullable', index=58, + number=65001, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +EMBED_FIELD_NUMBER = 65002 +embed = _descriptor.FieldDescriptor( + name='embed', full_name='gogoproto.embed', index=59, + number=65002, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +CUSTOMTYPE_FIELD_NUMBER = 65003 +customtype = _descriptor.FieldDescriptor( + name='customtype', full_name='gogoproto.customtype', index=60, + number=65003, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +CUSTOMNAME_FIELD_NUMBER = 65004 +customname = _descriptor.FieldDescriptor( + name='customname', full_name='gogoproto.customname', index=61, + number=65004, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +JSONTAG_FIELD_NUMBER = 65005 +jsontag = _descriptor.FieldDescriptor( + name='jsontag', full_name='gogoproto.jsontag', index=62, + number=65005, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +MORETAGS_FIELD_NUMBER = 65006 +moretags = _descriptor.FieldDescriptor( + name='moretags', full_name='gogoproto.moretags', index=63, + number=65006, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +CASTTYPE_FIELD_NUMBER = 65007 +casttype = _descriptor.FieldDescriptor( + name='casttype', full_name='gogoproto.casttype', index=64, + number=65007, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +CASTKEY_FIELD_NUMBER = 65008 +castkey = _descriptor.FieldDescriptor( + name='castkey', full_name='gogoproto.castkey', index=65, + number=65008, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +CASTVALUE_FIELD_NUMBER = 65009 +castvalue = _descriptor.FieldDescriptor( + name='castvalue', full_name='gogoproto.castvalue', index=66, + number=65009, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +STDTIME_FIELD_NUMBER = 65010 +stdtime = _descriptor.FieldDescriptor( + name='stdtime', full_name='gogoproto.stdtime', index=67, + number=65010, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) +STDDURATION_FIELD_NUMBER = 65011 +stdduration = _descriptor.FieldDescriptor( + name='stdduration', full_name='gogoproto.stdduration', index=68, + number=65011, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) + +DESCRIPTOR.extensions_by_name['goproto_enum_prefix'] = goproto_enum_prefix +DESCRIPTOR.extensions_by_name['goproto_enum_stringer'] = goproto_enum_stringer +DESCRIPTOR.extensions_by_name['enum_stringer'] = enum_stringer +DESCRIPTOR.extensions_by_name['enum_customname'] = enum_customname +DESCRIPTOR.extensions_by_name['enumdecl'] = enumdecl +DESCRIPTOR.extensions_by_name['enumvalue_customname'] = enumvalue_customname +DESCRIPTOR.extensions_by_name['goproto_getters_all'] = goproto_getters_all +DESCRIPTOR.extensions_by_name['goproto_enum_prefix_all'] = goproto_enum_prefix_all +DESCRIPTOR.extensions_by_name['goproto_stringer_all'] = goproto_stringer_all +DESCRIPTOR.extensions_by_name['verbose_equal_all'] = verbose_equal_all +DESCRIPTOR.extensions_by_name['face_all'] = face_all +DESCRIPTOR.extensions_by_name['gostring_all'] = gostring_all +DESCRIPTOR.extensions_by_name['populate_all'] = populate_all +DESCRIPTOR.extensions_by_name['stringer_all'] = stringer_all +DESCRIPTOR.extensions_by_name['onlyone_all'] = onlyone_all +DESCRIPTOR.extensions_by_name['equal_all'] = equal_all +DESCRIPTOR.extensions_by_name['description_all'] = description_all +DESCRIPTOR.extensions_by_name['testgen_all'] = testgen_all +DESCRIPTOR.extensions_by_name['benchgen_all'] = benchgen_all +DESCRIPTOR.extensions_by_name['marshaler_all'] = marshaler_all +DESCRIPTOR.extensions_by_name['unmarshaler_all'] = unmarshaler_all +DESCRIPTOR.extensions_by_name['stable_marshaler_all'] = stable_marshaler_all +DESCRIPTOR.extensions_by_name['sizer_all'] = sizer_all +DESCRIPTOR.extensions_by_name['goproto_enum_stringer_all'] = goproto_enum_stringer_all +DESCRIPTOR.extensions_by_name['enum_stringer_all'] = enum_stringer_all +DESCRIPTOR.extensions_by_name['unsafe_marshaler_all'] = unsafe_marshaler_all +DESCRIPTOR.extensions_by_name['unsafe_unmarshaler_all'] = unsafe_unmarshaler_all +DESCRIPTOR.extensions_by_name['goproto_extensions_map_all'] = goproto_extensions_map_all +DESCRIPTOR.extensions_by_name['goproto_unrecognized_all'] = goproto_unrecognized_all +DESCRIPTOR.extensions_by_name['gogoproto_import'] = gogoproto_import +DESCRIPTOR.extensions_by_name['protosizer_all'] = protosizer_all +DESCRIPTOR.extensions_by_name['compare_all'] = compare_all +DESCRIPTOR.extensions_by_name['typedecl_all'] = typedecl_all +DESCRIPTOR.extensions_by_name['enumdecl_all'] = enumdecl_all +DESCRIPTOR.extensions_by_name['goproto_registration'] = goproto_registration +DESCRIPTOR.extensions_by_name['goproto_getters'] = goproto_getters +DESCRIPTOR.extensions_by_name['goproto_stringer'] = goproto_stringer +DESCRIPTOR.extensions_by_name['verbose_equal'] = verbose_equal +DESCRIPTOR.extensions_by_name['face'] = face +DESCRIPTOR.extensions_by_name['gostring'] = gostring +DESCRIPTOR.extensions_by_name['populate'] = populate +DESCRIPTOR.extensions_by_name['stringer'] = stringer +DESCRIPTOR.extensions_by_name['onlyone'] = onlyone +DESCRIPTOR.extensions_by_name['equal'] = equal +DESCRIPTOR.extensions_by_name['description'] = description +DESCRIPTOR.extensions_by_name['testgen'] = testgen +DESCRIPTOR.extensions_by_name['benchgen'] = benchgen +DESCRIPTOR.extensions_by_name['marshaler'] = marshaler +DESCRIPTOR.extensions_by_name['unmarshaler'] = unmarshaler +DESCRIPTOR.extensions_by_name['stable_marshaler'] = stable_marshaler +DESCRIPTOR.extensions_by_name['sizer'] = sizer +DESCRIPTOR.extensions_by_name['unsafe_marshaler'] = unsafe_marshaler +DESCRIPTOR.extensions_by_name['unsafe_unmarshaler'] = unsafe_unmarshaler +DESCRIPTOR.extensions_by_name['goproto_extensions_map'] = goproto_extensions_map +DESCRIPTOR.extensions_by_name['goproto_unrecognized'] = goproto_unrecognized +DESCRIPTOR.extensions_by_name['protosizer'] = protosizer +DESCRIPTOR.extensions_by_name['compare'] = compare +DESCRIPTOR.extensions_by_name['typedecl'] = typedecl +DESCRIPTOR.extensions_by_name['nullable'] = nullable +DESCRIPTOR.extensions_by_name['embed'] = embed +DESCRIPTOR.extensions_by_name['customtype'] = customtype +DESCRIPTOR.extensions_by_name['customname'] = customname +DESCRIPTOR.extensions_by_name['jsontag'] = jsontag +DESCRIPTOR.extensions_by_name['moretags'] = moretags +DESCRIPTOR.extensions_by_name['casttype'] = casttype +DESCRIPTOR.extensions_by_name['castkey'] = castkey +DESCRIPTOR.extensions_by_name['castvalue'] = castvalue +DESCRIPTOR.extensions_by_name['stdtime'] = stdtime +DESCRIPTOR.extensions_by_name['stdduration'] = stdduration + +google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(goproto_enum_prefix) +google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(goproto_enum_stringer) +google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(enum_stringer) +google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(enum_customname) +google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(enumdecl) +google_dot_protobuf_dot_descriptor__pb2.EnumValueOptions.RegisterExtension(enumvalue_customname) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_getters_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_enum_prefix_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_stringer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(verbose_equal_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(face_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(gostring_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(populate_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(stringer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(onlyone_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(equal_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(description_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(testgen_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(benchgen_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(marshaler_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(unmarshaler_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(stable_marshaler_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(sizer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_enum_stringer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(enum_stringer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(unsafe_marshaler_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(unsafe_unmarshaler_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_extensions_map_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_unrecognized_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(gogoproto_import) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(protosizer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(compare_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(typedecl_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(enumdecl_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_registration) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(goproto_getters) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(goproto_stringer) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(verbose_equal) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(face) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(gostring) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(populate) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(stringer) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(onlyone) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(equal) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(description) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(testgen) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(benchgen) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(marshaler) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(unmarshaler) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(stable_marshaler) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(sizer) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(unsafe_marshaler) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(unsafe_unmarshaler) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(goproto_extensions_map) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(goproto_unrecognized) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(protosizer) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(compare) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(typedecl) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(nullable) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(embed) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(customtype) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(customname) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(jsontag) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(moretags) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(casttype) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(castkey) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(castvalue) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(stdtime) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(stdduration) + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\023com.google.protobufB\nGoGoProtos')) +# @@protoc_insertion_point(module_scope) diff --git a/bblfsh/launcher.py b/bblfsh/launcher.py new file mode 100644 index 0000000..3cc56c5 --- /dev/null +++ b/bblfsh/launcher.py @@ -0,0 +1,30 @@ +import socket +import sys +import time + +import docker + + +def ensure_bblfsh_is_running(): + client = docker.from_env(version="auto") + try: + client.containers.get("bblfsh") + return True + except docker.errors.NotFound: + container = client.containers.run( + "bblfsh/server", name="bblfsh", detach=True, privileged=True, + ports={9432: 9432} + ) + sys.stderr.write( + "Launched the Babelfish server (name bblfsh, id %s).\nStop it " + "with: docker rm -f bblfsh\n" % container.id) + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + result = -1 + while result != 0: + time.sleep(0.1) + result = sock.connect_ex(("0.0.0.0", 9432)) + sock.close() + sys.stderr.write("Babelfish server is up and running.\n") + return False + finally: + client.api.close() diff --git a/bblfsh/test.py b/bblfsh/test.py new file mode 100644 index 0000000..6422719 --- /dev/null +++ b/bblfsh/test.py @@ -0,0 +1,52 @@ +import unittest + +import docker + +from bblfsh import BblfshClient +from bblfsh.github.com.bblfsh.sdk.protocol.generated_pb2 import ParseUASTResponse +from github.com.bblfsh.sdk.uast.generated_pb2 import Node +from bblfsh.launcher import ensure_bblfsh_is_running + + +class BblfshTests(unittest.TestCase): + BBLFSH_SERVER_EXISTED = None + + @classmethod + def setUpClass(cls): + cls.BBLFSH_SERVER_EXISTED = ensure_bblfsh_is_running() + + @classmethod + def tearDownClass(cls): + if not cls.BBLFSH_SERVER_EXISTED: + client = docker.from_env(version="auto") + client.containers.get("bblfsh").remove(force=True) + client.api.close() + + def setUp(self): + self.client = BblfshClient("0.0.0.0:9432") + + def testUASTDefaultLanguage(self): + uast = self.client.parse_uast(__file__) + self._validate_uast(uast) + + def testUASTPython(self): + uast = self.client.parse_uast(__file__, language="Python") + self._validate_uast(uast) + + def testUASTFileContents(self): + with open(__file__) as fin: + contents = fin.read() + uast = self.client.parse_uast("file.py", contents=contents) + self._validate_uast(uast) + + def _validate_uast(self, uast): + self.assertIsNotNone(uast) + # self.assertIsInstance() does not work - must be some metaclass magic + self.assertEqual(type(uast).DESCRIPTOR.full_name, + ParseUASTResponse.DESCRIPTOR.full_name) + self.assertEqual(len(uast.errors), 0) + self.assertIsInstance(uast.uast, Node) + + +if __name__ == "__main__": + unittest.main() diff --git a/github.com/bblfsh/sdk/protocol/generated.proto b/github.com/bblfsh/sdk/protocol/generated.proto new file mode 100644 index 0000000..35d1047 --- /dev/null +++ b/github.com/bblfsh/sdk/protocol/generated.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; +package github.com.bblfsh.sdk.protocol; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/bblfsh/sdk/uast/generated.proto"; + +option (gogoproto.protosizer_all) = true; +option (gogoproto.sizer_all) = false; +option go_package = "protocol"; + +// ParseUASTRequest is a request to parse a file and get its UAST. +message ParseUASTRequest { + option (gogoproto.goproto_getters) = false; + option (gogoproto.typedecl) = false; + string filename = 1; + string language = 2; + string content = 3; +} + +// ParseUASTResponse is the reply to ParseUASTRequest. +message ParseUASTResponse { + option (gogoproto.goproto_getters) = false; + option (gogoproto.typedecl) = false; + github.com.bblfsh.sdk.protocol.Status status = 1; + repeated string errors = 2; + github.com.bblfsh.sdk.uast.Node uast = 3 [(gogoproto.customname) = "UAST"]; +} + +// Status is the status of a response. +enum Status { + option (gogoproto.enumdecl) = false; + option (gogoproto.goproto_enum_prefix) = false; + option (gogoproto.goproto_enum_stringer) = false; + // Ok status code. + OK = 0 [(gogoproto.enumvalue_customname) = "Ok"]; + // Error status code. It is replied when the driver has got the AST with errors. + ERROR = 1 [(gogoproto.enumvalue_customname) = "Error"]; + // Fatal status code. It is replied when the driver hasn't could get the AST. + FATAL = 2 [(gogoproto.enumvalue_customname) = "Fatal"]; +} + +service ProtocolService { + // ParseUAST uses DefaultParser to process the given UAST parsing request. + rpc ParseUAST (github.com.bblfsh.sdk.protocol.ParseUASTRequest) returns (github.com.bblfsh.sdk.protocol.ParseUASTResponse); +} + diff --git a/github.com/bblfsh/sdk/uast/generated.proto b/github.com/bblfsh/sdk/uast/generated.proto new file mode 100644 index 0000000..8590403 --- /dev/null +++ b/github.com/bblfsh/sdk/uast/generated.proto @@ -0,0 +1,416 @@ +syntax = "proto3"; +package github.com.bblfsh.sdk.uast; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.protosizer_all) = true; +option (gogoproto.sizer_all) = false; +option go_package = "uast"; + +// Node is a node in a UAST. +message Node { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.typedecl) = false; + string internal_type = 1; + map properties = 2; + repeated github.com.bblfsh.sdk.uast.Node children = 3; + string token = 4; + github.com.bblfsh.sdk.uast.Position start_position = 5; + github.com.bblfsh.sdk.uast.Position end_position = 6; + repeated github.com.bblfsh.sdk.uast.Role roles = 7; +} + +// Position represents a position in a source code file. +message Position { + option (gogoproto.goproto_getters) = false; + option (gogoproto.typedecl) = false; + uint32 offset = 1; + uint32 line = 2; + uint32 col = 3; +} + +// Role is the main UAST annotation. It indicates that a node in an AST can +// be interpreted as acting with certain language-independent role. +// +// go:generate stringer -type=Role +enum Role { + option (gogoproto.enumdecl) = false; + option (gogoproto.goproto_enum_prefix) = false; + option (gogoproto.goproto_enum_stringer) = false; + // SimpleIdentifier is the most basic form of identifier, used for variable + // names, functions, packages, etc. + SIMPLE_IDENTIFIER = 0 [(gogoproto.enumvalue_customname) = "SimpleIdentifier"]; + // QualifiedIdentifier is form of identifier composed of multiple + // SimpleIdentifier. One main identifier (usually the last one) and one + // or more qualifiers. + QUALIFIED_IDENTIFIER = 1 [(gogoproto.enumvalue_customname) = "QualifiedIdentifier"]; + // BinaryExpression is the parent node of all binary expressions of any type. It must have + // BinaryExpressionLeft, BinaryExpressionRight and BinaryExpressionOp children. + // Those children must have aditional roles specifying the specific type (e.g. Expression, + // QualifiedIdentifier or Literal for the left and right nodes and one of the specific operator roles + // for the binary operator). BinaryExpresion can be considered a derivation of Expression and thus + // could be its child or implemented as an additional node. + BINARY_EXPRESSION = 2 [(gogoproto.enumvalue_customname) = "BinaryExpression"]; + BINARY_EXPRESSION_LEFT = 3 [(gogoproto.enumvalue_customname) = "BinaryExpressionLeft"]; + BINARY_EXPRESSION_RIGHT = 4 [(gogoproto.enumvalue_customname) = "BinaryExpressionRight"]; + BINARY_EXPRESSION_OP = 5 [(gogoproto.enumvalue_customname) = "BinaryExpressionOp"]; + // Infix should mark the nodes which are parents of expression nodes using infix notation, e.g.: a+b. + // Nodes without Infix or Postfix mark are considered in prefix order by default. + INFIX = 6 [(gogoproto.enumvalue_customname) = "Infix"]; + // Postfix should mark the nodes which are parents of nodes using postfix notation, e.g.: ab+. + // Nodes without Infix or Postfix mark are considered in prefix order by default. + POSTFIX = 7 [(gogoproto.enumvalue_customname) = "Postfix"]; + // OpBitwiseLeftShift is the binary bitwise shift to the left operator (i.e. << in most languages) + OP_BITWISE_LEFT_SHIFT = 8 [(gogoproto.enumvalue_customname) = "OpBitwiseLeftShift"]; + // OpBitwiseRightShift is the binary bitwise shift to the right operator (i.e. >> in most languages) + OP_BITWISE_RIGHT_SHIFT = 9 [(gogoproto.enumvalue_customname) = "OpBitwiseRightShift"]; + // OpBitwiseUnsignedRightShift is the binary bitwise unsigned shift to the + // right operator (e.g. >>> in Java or C#) + OP_BITWISE_UNSIGNED_RIGHT_SHIFT = 10 [(gogoproto.enumvalue_customname) = "OpBitwiseUnsignedRightShift"]; + // OpBitwiseOr is the binary bitwise OR operator (i.e. | in most languages) + OP_BITWISE_OR = 11 [(gogoproto.enumvalue_customname) = "OpBitwiseOr"]; + // OpBitwiseXor is the binary bitwise Xor operator (i.e. ~ in most languages) + OP_BITWISE_XOR = 12 [(gogoproto.enumvalue_customname) = "OpBitwiseXor"]; + // OpBitwiseAnd is the binary bitwise And/complement operator (i.e. & in most languages) + OP_BITWISE_AND = 13 [(gogoproto.enumvalue_customname) = "OpBitwiseAnd"]; + EXPRESSION = 14 [(gogoproto.enumvalue_customname) = "Expression"]; + STATEMENT = 15 [(gogoproto.enumvalue_customname) = "Statement"]; + // OpEqual is the operator that tests for logical equality between two expressions + OP_EQUAL = 16 [(gogoproto.enumvalue_customname) = "OpEqual"]; + // OpEqual is the operator that tests for logical inequality between two expressions + // (i.e. != or != or <> in most languages). + OP_NOT_EQUAL = 17 [(gogoproto.enumvalue_customname) = "OpNotEqual"]; + // OpEqual is the operator that tests if the expression on the left is worth logically less + // than the expression on the right. (i.e. < in most languages). + OP_LESS_THAN = 18 [(gogoproto.enumvalue_customname) = "OpLessThan"]; + // OpEqual is the operator that tests if the expression on the left is worth logically less + // or has equality with the expression on the right. (i.e. >= in most languages). + OP_LESS_THAN_EQUAL = 19 [(gogoproto.enumvalue_customname) = "OpLessThanEqual"]; + // OpEqual is the operator that tests if the expression on the left is worth logically more + // than the expression on the right. (i.e. > in most languages). + OP_GREATER_THAN = 20 [(gogoproto.enumvalue_customname) = "OpGreaterThan"]; + // OpEqual is the operator that tests if the expression on the left is worth logically more + // or has equality with the expression on the right. (i.e. >= in most languages). + OP_GREATER_THAN_EQUAL = 21 [(gogoproto.enumvalue_customname) = "OpGreaterThanEqual"]; + // OpSame tests if the result of the expressions tested is the same object, like the "is" + // operator in node or === in Javascript. + OP_SAME = 22 [(gogoproto.enumvalue_customname) = "OpSame"]; + // OpNotSame tests if the result of the expressions tested are different objects, like the "is not" + // operator in node or !== in Javascript. + OP_NOT_SAME = 23 [(gogoproto.enumvalue_customname) = "OpNotSame"]; + // OpContains tests if the left expression result is contained inside, or has an item contained + // with equality, the result of the expression of the right which usually will be a container type + // (e.g. "in" in Python). + OP_CONTAINS = 24 [(gogoproto.enumvalue_customname) = "OpContains"]; + // OpNotContains tests if the left expression result is not contained inside + // the result of the expression of the right which usually will be a container type + // (e.g. "not in" in Python). + OP_NOT_CONTAINS = 25 [(gogoproto.enumvalue_customname) = "OpNotContains"]; + // OpPreIncrement increments in place the value before it is evaluated. It's + // typical of C-inspired languages (e. g. ++x). + OP_PRE_INCREMENT = 26 [(gogoproto.enumvalue_customname) = "OpPreIncrement"]; + // OpPostIncrement increments in place the value after it is evaluated. It's + // typical of C-inspired languages (e. g. x++). + OP_POST_INCREMENT = 27 [(gogoproto.enumvalue_customname) = "OpPostIncrement"]; + // OpPreDecrement decrement in place the value before it is evaluated. It's + // typical of C-inspired languages (e. g. --x). + OP_PRE_DECREMENT = 28 [(gogoproto.enumvalue_customname) = "OpPreDecrement"]; + // OpPostDecrement decrement in place the value after it is evaluated. It's + // typical of C-inspired languages (e. g. x--). + OP_POST_DECREMENT = 29 [(gogoproto.enumvalue_customname) = "OpPostDecrement"]; + // OpNegative changes the sign of the numeric type (e. g. -x in most languages). + OP_NEGATIVE = 30 [(gogoproto.enumvalue_customname) = "OpNegative"]; + // OpPositive usually is a no-op for basic numeric types but exists in the AST of some languages. + // On some languages like C it could perform an aritmetic conversion to a signed type without + // changing the sign or could be overloaded (e. g. +x). + OP_POSITIVE = 31 [(gogoproto.enumvalue_customname) = "OpPositive"]; + // OpBitwiseComplement will invert all the bits of a type. (e. g. ~x in C-inspired languages). + OP_BITWISE_COMPLEMENT = 32 [(gogoproto.enumvalue_customname) = "OpBitwiseComplement"]; + // OpDereference will get the actual value pointed by a pointer or reference type (e.g. *x). + OP_DEREFERENCE = 33 [(gogoproto.enumvalue_customname) = "OpDereference"]; + // OpTakeAddress will get the memory address of the associated variable which will usually be + // stored in a pointer or reference type (e. g. &x). + OP_TAKE_ADDRESS = 34 [(gogoproto.enumvalue_customname) = "OpTakeAddress"]; + // File is the root node of a single file AST. + FILE = 35 [(gogoproto.enumvalue_customname) = "File"]; + // OpBooleanAnd is the boolean AND operator (i.e. "and" or && in most languages) + OP_BOOLEAN_AND = 36 [(gogoproto.enumvalue_customname) = "OpBooleanAnd"]; + // OpBooleanOr is the boolean OR operator (i.e. "or" or || in most languages) + OP_BOOLEAN_OR = 37 [(gogoproto.enumvalue_customname) = "OpBooleanOr"]; + // OpBooleanNot is the boolean NOT operator (i.e. "NOT" or ! in most languages) + OP_BOOLEAN_NOT = 38 [(gogoproto.enumvalue_customname) = "OpBooleanNot"]; + // OpBooleanXor is the boolean XOR operator (i.e. "XOR" or ^ in most languages) + OP_BOOLEAN_XOR = 39 [(gogoproto.enumvalue_customname) = "OpBooleanXor"]; + // OpAdd is the binary add operator (i.e. + in most languages). + OP_ADD = 40 [(gogoproto.enumvalue_customname) = "OpAdd"]; + // OpSubstract is the binary subtract operator (i.e. - in most languages). + OP_SUBSTRACT = 41 [(gogoproto.enumvalue_customname) = "OpSubstract"]; + // OpMultiply is the binary multiply operator (i.e. * in most languages). + OP_MULTIPLY = 42 [(gogoproto.enumvalue_customname) = "OpMultiply"]; + // OpDivide is the binary division operator (i.e. / in most languages). + OP_DIVIDE = 43 [(gogoproto.enumvalue_customname) = "OpDivide"]; + // OpMod is the binary division module operator (i.e. % or "mod" in most languages). + OP_MOD = 44 [(gogoproto.enumvalue_customname) = "OpMod"]; + // PackageDeclaration identifies the package that all its children + // belong to. Its children include, at least, QualifiedIdentifier or + // SimpleIdentifier with the package name. + PACKAGE_DECLARATION = 45 [(gogoproto.enumvalue_customname) = "PackageDeclaration"]; + // ImportDeclaration represents the import of another package in the + // current scope. Its children may include an ImportPath and ImportInclude. + IMPORT_DECLARATION = 46 [(gogoproto.enumvalue_customname) = "ImportDeclaration"]; + // ImportPath is the (usually) fully qualified package name to import. + IMPORT_PATH = 47 [(gogoproto.enumvalue_customname) = "ImportPath"]; + // ImportAlias is an identifier used as an alias for an imported package + // in a certain scope. + IMPORT_ALIAS = 48 [(gogoproto.enumvalue_customname) = "ImportAlias"]; + // FunctionDeclaration is the parent node of all function or method declarations. It should have a + // FunctionDeclarationName, a FunctionDeclarationBody (except for pure declarations like the ones in C/C++ + // header files or forward declarations in other languages) and, if the function has formal arguments, + // FunctionDeclarationArgument children. + FUNCTION_DECLARATION = 49 [(gogoproto.enumvalue_customname) = "FunctionDeclaration"]; + // FunctionDeclarationBody is the grouping node for all nodes in the function body. + FUNCTION_DECLARATION_BODY = 50 [(gogoproto.enumvalue_customname) = "FunctionDeclarationBody"]; + // FunctionDeclarationName contains the unqualified name of the function. + FUNCTION_DECLARATION_NAME = 51 [(gogoproto.enumvalue_customname) = "FunctionDeclarationName"]; + // FunctionDeclarationReceiver is the target Type of a method or struct. + FUNCTION_DECLARATION_RECEIVER = 52 [(gogoproto.enumvalue_customname) = "FunctionDeclarationReceiver"]; + // FunctionDeclarationArgument is the parent node for the function formal arguments. The name will be + // specified as the token of the child FunctionDeclarationArgumentName and depending on the language it + // could have one or more child nodes of different types to implement them in the UAST like + // FunctionDeclarationArgumentDefaultValue, type declarations (TODO), annotations (TODO), etc. + // FunctionDeclarationArguments + FUNCTION_DECLARATION_ARGUMENT = 53 [(gogoproto.enumvalue_customname) = "FunctionDeclarationArgument"]; + // FunctionDeclarationArgumentName is the symbolic name of the argument. On languages that support + // argument passing by name this will be the name used by the CallNamedArgument roles. + FUNCTION_DECLARATION_ARGUMENT_NAME = 54 [(gogoproto.enumvalue_customname) = "FunctionDeclarationArgumentName"]; + // For languages that support setting a default value for a formal argument, + // FunctionDeclarationArgumentDefaultValue is the node that contains the default value. + // Depending on the language his child node representing the actual value could be some kind or + // literal or even expressions that can resolved at runtime (if interpreted) or compile time. + FUNCTION_DECLARATION_ARGUMENT_DEFAULT_VALUE = 55 [(gogoproto.enumvalue_customname) = "FunctionDeclarationArgumentDefaultValue"]; + // FunctionDeclarationVarArgsList is the node representing whatever syntax the language has to + // indicate that from that point in the argument list the function can get a variable number + // of arguments (e.g. "..." in C-ish languages, "Object..." in Java, "*args" in Python, etc). + FUNCTION_DECLARATION_VAR_ARGS_LIST = 56 [(gogoproto.enumvalue_customname) = "FunctionDeclarationVarArgsList"]; + // TypeDeclaration is the declaration of a type. It could be a class or + // interface in Java, a struct, interface or alias in Go, etc. Except for pure or forward declarations + // it will usually have a TypeDeclarationBody child and for OOP languages a TypeDeclarationBases and/or + // TypeDeclarationInterfaces. + TYPE_DECLARATION = 57 [(gogoproto.enumvalue_customname) = "TypeDeclaration"]; + TYPE_DECLARATION_BODY = 58 [(gogoproto.enumvalue_customname) = "TypeDeclarationBody"]; + // TypeDeclarationBases are the Types that the current inherits from in OOP languages. + TYPE_DECLARATION_BASES = 59 [(gogoproto.enumvalue_customname) = "TypeDeclarationBases"]; + // TypeDeclarationImplements are the Types (usually interfaces) that the Type implements. + TYPE_DECLARATION_IMPLEMENTS = 60 [(gogoproto.enumvalue_customname) = "TypeDeclarationImplements"]; + // VisibleFromInstance marks modifiers that declare visibility from instance. + VISIBLE_FROM_INSTANCE = 61 [(gogoproto.enumvalue_customname) = "VisibleFromInstance"]; + // VisibleFromType marks modifiers that declare visibility from the same + // type (e.g. class, trait). + // Implies VisibleFromInstance. + VISIBLE_FROM_TYPE = 62 [(gogoproto.enumvalue_customname) = "VisibleFromType"]; + // VisibleFromSubtype marks modifiers that declare visibility from + // subtypes (e.g. subclasses). + // Implies VisibleFromInstance and VisibleFromType. + VISIBLE_FROM_SUBTYPE = 63 [(gogoproto.enumvalue_customname) = "VisibleFromSubtype"]; + // VisibleFromSubpackage marks modifiers that declare visibility from the + // same package. + VISIBLE_FROM_PACKAGE = 64 [(gogoproto.enumvalue_customname) = "VisibleFromPackage"]; + // VisibleFromSubpackage marks modifiers that declare visibility from + // subpackages. + // Implies VisibleFromInstance, VisibleFromType and VisibleFromPackage. + VISIBLE_FROM_SUBPACKAGE = 65 [(gogoproto.enumvalue_customname) = "VisibleFromSubpackage"]; + // VisibleFromModule marks modifiers that declare visibility from the + // same module (e.g. Java JAR). + // Implies VisibleFromInstance and VisibleFromType. + VISIBLE_FROM_MODULE = 66 [(gogoproto.enumvalue_customname) = "VisibleFromModule"]; + // VisibleFromFriend marks modifiers that declare visibility from friends + // (e.g. C++ friends). + // Implies VisibleFromInstance and VisibleFromType. + VISIBLE_FROM_FRIEND = 67 [(gogoproto.enumvalue_customname) = "VisibleFromFriend"]; + // VisibleFromWorld implies full public visibility. Implies all other + // visibility levels. + VISIBLE_FROM_WORLD = 68 [(gogoproto.enumvalue_customname) = "VisibleFromWorld"]; + // If is used for if-then[-else] statements or expressions. + // An if-then tree will look like: + // + // IfStatement { + // **[non-If nodes] { + // IfCondition { + // [...] + // } + // } + // **[non-If* nodes] { + // IfBody { + // [...] + // } + // } + // **[non-If* nodes] { + // IfElse { + // [...] + // } + // } + // } + // + // The IfElse node is optional. The order of IfCondition, IfBody and + // IfElse is not defined. + IF = 69 [(gogoproto.enumvalue_customname) = "If"]; + // IfCondition is a condition in an IfStatement or IfExpression. + IF_CONDITION = 70 [(gogoproto.enumvalue_customname) = "IfCondition"]; + // IfBody is the code following a then clause in an IfStatement or + // IfExpression. + IF_BODY = 71 [(gogoproto.enumvalue_customname) = "IfBody"]; + // IfBody is the code following a else clause in an IfStatement or + // IfExpression. + IF_ELSE = 72 [(gogoproto.enumvalue_customname) = "IfElse"]; + // Switch is used to represent a broad of switch flavors. An expression + // is evaluated and then compared to the values returned by different + // case expressions, executing a body associated to the first case that + // matches. Similar constructions that go beyond expression comparison + // (such as pattern matching in Scala's match) should not be annotated + // with Switch. + // + // TODO: We still have to decide how to annotate fallthrough and + // non-fallthrough variants. As well as crazy variants such as Perl + // and Bash with its optional fallthrough. + SWITCH = 73 [(gogoproto.enumvalue_customname) = "Switch"]; + SWITCH_CASE = 74 [(gogoproto.enumvalue_customname) = "SwitchCase"]; + SWITCH_CASE_CONDITION = 75 [(gogoproto.enumvalue_customname) = "SwitchCaseCondition"]; + SWITCH_CASE_BODY = 76 [(gogoproto.enumvalue_customname) = "SwitchCaseBody"]; + SWITCH_DEFAULT = 77 [(gogoproto.enumvalue_customname) = "SwitchDefault"]; + FOR = 78 [(gogoproto.enumvalue_customname) = "For"]; + FOR_INIT = 79 [(gogoproto.enumvalue_customname) = "ForInit"]; + FOR_EXPRESSION = 80 [(gogoproto.enumvalue_customname) = "ForExpression"]; + FOR_UPDATE = 81 [(gogoproto.enumvalue_customname) = "ForUpdate"]; + FOR_BODY = 82 [(gogoproto.enumvalue_customname) = "ForBody"]; + FOR_EACH = 83 [(gogoproto.enumvalue_customname) = "ForEach"]; + WHILE = 84 [(gogoproto.enumvalue_customname) = "While"]; + WHILE_CONDITION = 85 [(gogoproto.enumvalue_customname) = "WhileCondition"]; + WHILE_BODY = 86 [(gogoproto.enumvalue_customname) = "WhileBody"]; + DO_WHILE = 87 [(gogoproto.enumvalue_customname) = "DoWhile"]; + DO_WHILE_CONDITION = 88 [(gogoproto.enumvalue_customname) = "DoWhileCondition"]; + DO_WHILE_BODY = 89 [(gogoproto.enumvalue_customname) = "DoWhileBody"]; + BREAK = 90 [(gogoproto.enumvalue_customname) = "Break"]; + CONTINUE = 91 [(gogoproto.enumvalue_customname) = "Continue"]; + GOTO = 92 [(gogoproto.enumvalue_customname) = "Goto"]; + // Block is a group of statements. If the source language has block scope, + // it should be annotated both with Block and BlockScope. + BLOCK = 93 [(gogoproto.enumvalue_customname) = "Block"]; + // BlockScope is a block with its own block scope. + // TODO: Should we replace BlockScope with a more general Scope role that + // can be combined with Block? + BLOCK_SCOPE = 94 [(gogoproto.enumvalue_customname) = "BlockScope"]; + // Return is a return statement. It might have a child expression or not + // as with naked returns in Go or return in void methods in Java. + RETURN = 95 [(gogoproto.enumvalue_customname) = "Return"]; + TRY = 96 [(gogoproto.enumvalue_customname) = "Try"]; + TRY_BODY = 97 [(gogoproto.enumvalue_customname) = "TryBody"]; + TRY_CATCH = 98 [(gogoproto.enumvalue_customname) = "TryCatch"]; + TRY_FINALLY = 99 [(gogoproto.enumvalue_customname) = "TryFinally"]; + THROW = 100 [(gogoproto.enumvalue_customname) = "Throw"]; + // Assert checks if an expression is true and if it is not, it signals + // an error/exception, possibly stopping the execution. + ASSERT = 101 [(gogoproto.enumvalue_customname) = "Assert"]; + // Call is any call, whether it is a function, procedure, method or macro. + // In its simplest form, a call will have a single child with a function + // name (CallCallee). Arguments are marked with CallPositionalArgument + // and CallNamedArgument. In OO languages there is usually a CallReceiver + // too. + CALL = 102 [(gogoproto.enumvalue_customname) = "Call"]; + // CallReceiver is an optional expression receiving the call. This + // corresponds to the method invocant in OO languages, receiving in Go, etc. + CALL_RECEIVER = 103 [(gogoproto.enumvalue_customname) = "CallReceiver"]; + // CallCallee is the callable being called. It might be the name of a + // function or procedure, it might be a method, it might a simple name + // or qualified with a namespace. + CALL_CALLEE = 104 [(gogoproto.enumvalue_customname) = "CallCallee"]; + // CallPositionalArgument is a positional argument in a call. + CALL_POSITIONAL_ARGUMENT = 105 [(gogoproto.enumvalue_customname) = "CallPositionalArgument"]; + // CallNamedArgument is a named argument in a call. It should have a + // child with role CallNamedArgumentName and another child with role + // CallNamedArgumentValue. + CALL_NAMED_ARGUMENT = 106 [(gogoproto.enumvalue_customname) = "CallNamedArgument"]; + // CallNamedArgumentName is the name of a named argument. + CALL_NAMED_ARGUMENT_NAME = 107 [(gogoproto.enumvalue_customname) = "CallNamedArgumentName"]; + // CallNamedArgumentValue is the value of a named argument. + CALL_NAMED_ARGUMENT_VALUE = 108 [(gogoproto.enumvalue_customname) = "CallNamedArgumentValue"]; + NOOP = 109 [(gogoproto.enumvalue_customname) = "Noop"]; + // BooleanLiteral is a boolean literal. It is expected that BooleanLiteral + // nodes contain a token with some form of boolean literal (e.g. true, + // false, yes, no, 1, 0). + BOOLEAN_LITERAL = 110 [(gogoproto.enumvalue_customname) = "BooleanLiteral"]; + // ByteLiteral is a single-byte literal. For example, in Rust. + BYTE_LITERAL = 111 [(gogoproto.enumvalue_customname) = "ByteLiteral"]; + // ByteStringLiteral is a literal for a raw byte string. For example, in Rust. + BYTE_STRING_LITERAL = 112 [(gogoproto.enumvalue_customname) = "ByteStringLiteral"]; + // CharacterLiteral is a character literal. It is expected that + // CharacterLiteral nodes contain a token with a single character with + // optional quoting (e.g. c, 'c', "c"). + CHARACTER_LITERAL = 113 [(gogoproto.enumvalue_customname) = "CharacterLiteral"]; + // ListLiteral is a literal array or list. + LIST_LITERAL = 114 [(gogoproto.enumvalue_customname) = "ListLiteral"]; + // MapLiteral is a literal map-like structure. + MAP_LITERAL = 115 [(gogoproto.enumvalue_customname) = "MapLiteral"]; + // NullLiteral is a null literal. It is expected that NullLiteral nodes + // contain a token equivalent to null (e.g. null, nil, None). + NULL_LITERAL = 116 [(gogoproto.enumvalue_customname) = "NullLiteral"]; + // NumberLiteral is a numeric literal. This applies to any numeric literal + // whether it is integer or float, any base, scientific notation or not, + // etc. + NUMBER_LITERAL = 117 [(gogoproto.enumvalue_customname) = "NumberLiteral"]; + // RegexpLiteral is a literal for a regular expression. + REGEXP_LITERAL = 118 [(gogoproto.enumvalue_customname) = "RegexpLiteral"]; + // SetLiteral is a literal for a set. For example, in Python 3. + SET_LITERAL = 119 [(gogoproto.enumvalue_customname) = "SetLiteral"]; + // StringLiteral is a string literal. This applies both to single-line and + // multi-line literals and it does not imply any particular encoding. + // + // TODO: Decide what to do with interpolated strings. + STRING_LITERAL = 120 [(gogoproto.enumvalue_customname) = "StringLiteral"]; + // TupleLiteral is a literal for a tuple. For example, in Python and Scala. + TUPLE_LITERAL = 121 [(gogoproto.enumvalue_customname) = "TupleLiteral"]; + // TypeLiteral is a literal that identifies a type. It might contain a + // token with the type literal itself, or children that define the type. + TYPE_LITERAL = 122 [(gogoproto.enumvalue_customname) = "TypeLiteral"]; + // OtherLiteral is a literal of a type not covered by other literal + // annotations. + OTHER_LITERAL = 123 [(gogoproto.enumvalue_customname) = "OtherLiteral"]; + // MapEntry is the expression pairing a map key and a value usually on MapLiteral expressions. It must + // have both a MapKey and a MapValue children (e.g. {"key": "value", "otherkey": "otherval"} in Python). + MAP_ENTRY = 124 [(gogoproto.enumvalue_customname) = "MapEntry"]; + MAP_KEY = 125 [(gogoproto.enumvalue_customname) = "MapKey"]; + MAP_VALUE = 126 [(gogoproto.enumvalue_customname) = "MapValue"]; + TYPE = 127 [(gogoproto.enumvalue_customname) = "Type"]; + // TODO: should we distinguish between primitive and builtin types? + PRIMITIVE_TYPE = 128 [(gogoproto.enumvalue_customname) = "PrimitiveType"]; + // Assignment represents a variable assignment or binding. + // The variable that is being assigned to is annotated with the + // AssignmentVariable role, while the value is annotated with + // AssignmentValue. + ASSIGNMENT = 129 [(gogoproto.enumvalue_customname) = "Assignment"]; + ASSIGNMENT_VARIABLE = 130 [(gogoproto.enumvalue_customname) = "AssignmentVariable"]; + ASSIGNMENT_VALUE = 131 [(gogoproto.enumvalue_customname) = "AssignmentValue"]; + // AugmentedAssignment is an augmented assignment usually combining the equal operator with + // another one (e. g. +=, -=, *=, etc). It is expected that children contains an + // AugmentedAssignmentOperator with a child or aditional role for the specific Bitwise or + // Arithmetic operator used. The AugmentedAssignmentVariable and AugmentedAssignmentValue roles + // have the same meaning than in Assignment. + AUGMENTED_ASSIGNMENT = 132 [(gogoproto.enumvalue_customname) = "AugmentedAssignment"]; + AUGMENTED_ASSIGNMENT_OPERATOR = 133 [(gogoproto.enumvalue_customname) = "AugmentedAssignmentOperator"]; + AUGMENTED_ASSIGNMENT_VARIABLE = 134 [(gogoproto.enumvalue_customname) = "AugmentedAssignmentVariable"]; + AUGMENTED_ASSIGNMENT_VALUE = 135 [(gogoproto.enumvalue_customname) = "AugmentedAssignmentValue"]; + // This represents the self-reference of an object instance in + // one of its methods. This corresponds to the `this` keyword + // (e.g. Java, C++, PHP), `self` (e.g. Smalltalk, Perl, Swift) and `Me` + // (e.g. Visual Basic). + THIS = 136 [(gogoproto.enumvalue_customname) = "This"]; + COMMENT = 137 [(gogoproto.enumvalue_customname) = "Comment"]; + // Documentation is a node that represents documentation of another node, + // such as function or package. Documentation is usually in the form of + // a string in certain position (e.g. Python docstring) or comment + // (e.g. Javadoc, godoc). + DOCUMENTATION = 138 [(gogoproto.enumvalue_customname) = "Documentation"]; + // Whitespace + WHITESPACE = 139 [(gogoproto.enumvalue_customname) = "Whitespace"]; +} + diff --git a/github.com/gogo/protobuf/gogoproto/gogo.proto b/github.com/gogo/protobuf/gogoproto/gogo.proto new file mode 100644 index 0000000..fbca44c --- /dev/null +++ b/github.com/gogo/protobuf/gogoproto/gogo.proto @@ -0,0 +1,132 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package gogoproto; + +import "google/protobuf/descriptor.proto"; + +option java_package = "com.google.protobuf"; +option java_outer_classname = "GoGoProtos"; + +extend google.protobuf.EnumOptions { + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; +} + +extend google.protobuf.EnumValueOptions { + optional string enumvalue_customname = 66001; +} + +extend google.protobuf.FileOptions { + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; +} + +extend google.protobuf.MessageOptions { + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; + + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; + + optional bool sizer = 64020; + + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; + + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; + + optional bool protosizer = 64028; + optional bool compare = 64029; + + optional bool typedecl = 64030; +} + +extend google.protobuf.FieldOptions { + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; +} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ef73ef1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +grpcio>=1.3,<=2.0 +grpcio-tools>=1.3,<2.0 +docker>=2.0,<3.0 \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..2c89484 --- /dev/null +++ b/setup.py @@ -0,0 +1,30 @@ +from setuptools import setup, find_packages + + +setup( + name="bblfsh", + description="Fetches Universal Abstract Syntax Trees from Babelfish.", + version="1.0.0", + license="Apache 2.0", + author="Vadim Markovtsev", + author_email="vadim@sourced.tech", + url="https://github.com/bblfsh/client-python", + download_url='https://github.com/bblfsh/client-python', + packages=find_packages(), + exclude=["bblfsh/test.py"], + keywords=["babelfish", "uast"], + install_requires=["grpcio", "docker"], + package_data={"": ["LICENSE", "README.md"]}, + classifiers=[ + "Development Status :: 3 - Alpha", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Operating System :: POSIX", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Topic :: Software Development :: Libraries" + ] +)