Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
82 lines (61 sloc) 1.62 KB
% Copyright 2009, 2010, 2011, 2012, 2013, 2014 Anton Lavrik
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS,
% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
% See the License for the specific language governing permissions and
% limitations under the License.
%
% OCaml-specific Piqi extensions
%
.include [ .module piqi ]
% generate piqic_piqi.ml instead of piqi_piqi.ml so that we don't conflict with
% piqi_piqi.ml that comes with the piqilib library
.ocaml-module "Piqic_piqi"
.custom-field ocaml-module
.extend [
.typedef* [ record field variant option enum alias list import function ]
.with.field [
.name ocaml-name
.type string
.optional
]
]
.extend [
.typedef* [ piqi import ]
.with.field [
.name ocaml-module
.type string
.optional
]
]
.extend [
.typedef alias
.with.field [
.name ocaml-type
.type string
.optional
]
]
% flag for representing repeated fields and lists as OCaml arrays
.extend [
.typedef* [ field list ]
.with.field [
.name ocaml-array
.optional
]
]
% flag for representing optional fields with defaults as 'a option instead of 'a
.extend [
.typedef field
.with.field [
.name ocaml-optional
.optional
]
]