package ocaml-protoc
Pure OCaml compiler for .proto files
Install
Dune Dependency
Authors
Maintainers
Sources
ocaml-protoc-3.0.1.tbz
sha256=33904442e655b259e18386be2ccc335bfaf69e5ecaf02085b6aa327f5c82c365
sha512=d39b027d6b96f14c08789095990abbdad918ae54eba4ab094bef51931ea6f60c89c8e33cd35c0263c7d54e684deeb53c3272985cecb85d83bf546f3a1cd58af0
doc/ocaml-protoc.compiler-lib/Ocaml_protoc_compiler_lib/Pb_parsing_parse_tree/index.html
Module Ocaml_protoc_compiler_lib.Pb_parsing_parse_tree
Source
Protobuf parse tree
A field property defining its occurence
Oneof field fields label
Oneof fields have no label, they are simply choices for the oneof fiel they belong to.
Source
type 'a field = {
field_name : string;
field_number : int;
field_label : 'a;
field_type : Pb_field_type.unresolved_t;
field_options : Pb_option.set;
}
message field.
Note this field is parametrized with the label type so that it can be used both by normal field and one of field since the only difference between the 2 is the label.
Source
type map_field = {
map_name : string;
map_number : int;
map_key_type : Pb_field_type.map_key_type;
map_value_type : Pb_field_type.unresolved_t;
map_options : Pb_option.set;
}
oneof entity
Source
type extension_range =
| Extension_single_number of int
| Extension_range of extension_range_from * extension_range_to
Source
type message_body_content =
| Message_field of message_field
| Message_map_field of map_field
| Message_oneof_field of oneof
| Message_sub of message
| Message_enum of enum
| Message_extension of extension_range list
| Message_reserved of extension_range list
| Message_option of Pb_option.t
Body content defines all the possible consituant of a message.
Message entity.
Note the ID is simply for uniquely (and easily) identifying a type. It is expected to be generated by a parser. The later compilation functions expects this id to be unique.
Source
type rpc = {
rpc_name : string;
rpc_options : Pb_option.set;
rpc_req_stream : bool;
rpc_req : Pb_field_type.unresolved_t;
rpc_res_stream : bool;
rpc_res : Pb_field_type.unresolved_t;
}
Source
type proto = {
proto_file_name : string option;
syntax : string option;
imports : import list;
file_options : Pb_option.set;
package : string option;
messages : message list;
services : service list;
enums : enum list;
extends : extend list;
}
Definition of a protobuffer message file.
Source
val pp_message_field_label :
Format.formatter ->
[< `Nolabel | `Optional | `Repeated | `Required ] ->
unit
Source
val pp_message_field :
Format.formatter ->
[< `Nolabel | `Optional | `Repeated | `Required ] field ->
unit
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>