Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

158 lines (115 sloc) 3.033 kb
.include [ .module piqi.org/piqi-lang ]
.extend [
.typedef import
.with.field [
.type piqi
.optional
]
]
.variant [
.name namespace
.option [ .type piqi ]
.option [ .type import ]
]
.extend [
(.typedef record variant alias list)
.with.field [
.name parent
.type namespace
.optional
]
]
.extend [
.typedef record
% record's fields ordered by integer wire code
.with.field [
.name wire-field
.type field
.repeated
]
]
.extend [
.typedef piqi
.with.field [ .name extended-piqdef .type piqdef .repeated ]
.with.field [ .name resolved-piqdef .type piqdef .repeated ]
.with.field [ .name imported-piqdef .type piqdef .repeated ]
.with.field [ .name resolved-import .type import .repeated ]
.with.field [ .name extended-import .type import .repeated ]
.with.field [ .name resolved-func .type function .repeated ]
.with.field [ .name extended-func .type function .repeated ]
.with.field [ .name included-piqi .type piqi .repeated ]
.with.field [ .name original-piqi .type piqi .optional ]
.with.field [ .name ast .type ast .optional ]
]
.extend [
.typedef function
.with.field [
.name resolved-input
.type piqdef
.optional
]
.with.field [
.name resolved-output
.type piqdef
.optional
]
.with.field [
.name resolved-error
.type piqdef
.optional
]
]
.extend [
(.typedef alias record variant list)
% if type definition is a function parameter, i.e. was defined inside
% function definition
.with.field [
.name is-func-param
.optional
]
]
.extend [
.typedef ast
% These two token types are used only in several special cases, and can't be
% represented in Piq text format directly.
.with.option [
% Raw word -- a valid utf8 Piq word: may be parsed as either of these:
% word, bool, number, string, binary
.name raw-word
.type word
]
.with.option [
% Raw binary -- just a sequence of bytes: may be parsed as either binary
% or utf8 string
.name raw-binary
.type binary
]
]
.extend [
.typedef any
% These fields are used for processing default values represented as JSON or
% XML data structures
.with.field [
.name type
.ocaml-name "typename"
.type word
.optional
]
.with.field [
.name ref % reference to JSON or XML value/parse tree
.type int
.optional
]
]
% Alternative name for field and option. It is used by Piq parse
% (piqobj_of_piqi) if a field or an option can be referred using an alternative
% name. An example of such alternative name can be .getopt-letter defined in
% piqi.org/piqi-getopt.piqi
.extend [
(.typedef field option)
.with.field [
.name alt-name
.type word
.optional
]
]
Jump to Line
Something went wrong with that request. Please try again.