package ocaml-protoc
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=8a294e86c6202b8ec8016e71d19264cb
sha512=67020bef50b59c6590c1b25d85a75d6e19d6cd37d42b87c94aef798bff51a45f38fe7024b4c67d71c22c13d3f2776bec83acd77794a518f1c4a7eddfc30b6d0b
doc/ocaml-protoc.compiler-lib/Ocaml_protoc_compiler_lib/Pb_field_type/index.html
Module Ocaml_protoc_compiler_lib.Pb_field_typeSource
Protobuffer Field type
Scope path of a type used for a message field.
For instance in the following field defintion:
required foo.bar.Msg1 f = 1
The type_path would be ["foo"; "bar"]
type unresolved = {type_path : type_path;type_name : string;from_root : bool;(*from_root indicates that the scope for the type is from the root of the type system. (ie starts with '.')
*)
}In the first phase of the compilation the field of message type are not resolved but only properly parsed.
The following type summarizes the information of a field type.
In the following field definition:
required foo.bar.Msg1 f = 1
The unresolved type would be: { scope=["foo";"bar"]; type_name="Msg1"; from_root = false }
After phase 2 compilation the field type is resolved to an known message which can be uniquely identified by its id.
Floating point builtin types
Unsigned integer builtin types
Signed integer builtin types
Integer builtin types
type builtin_type = [ | builtin_type_floating_point| builtin_type_int| `Bool| `String| `Bytes
]Builtin type defined in protobuf
field type.
The 'a type is for re-using the same type definition for the 2 compilation phases.
After Phase 1 'a is unresolved while after Phase2 'a is resolved.