msrpce_parse_transform
.
msrpce_parse_transform
.
array_type() = {fixed_array, count(), rpce_type()} | {conformant_array, rpce_type()} | {varying_array, rpce_type()} | {array, rpce_type()}
basic_type() = int_type() | string_type() | array_type() | pointer_type()
bit_type() = {bitset, int_type(), #{atom() => bitnum()}}
bitnum() = integer()
bytes() = integer()
count() = integer()
custom_type() = {custom, rpce_type(), expr(), expr()} | {builtin, rpce_type(), expr(), expr()}
endian_type() = {le, rpce_type()} | {be, rpce_type()}
expr() = erl_syntax:syntaxTree()
field_spec() = {record_field(), rpce_type()}
form() = erl_syntax:syntaxTree()
int_type() = boolean | uint8 | uint16 | uint32 | uint64 | int8 | int16 | int32 | int64
loc() = erl_syntax:annotation_or_location()
A source location, used as an annotation to make sure compiler errors have a line number and filename.
options() = #{endian => big | little, pointer_aliasing => boolean()}
Compiler options, which determine how structures and streams will be compiled.
endian |
big | little |
Sets the endianness (byte order) of all multi-byte integers. |
pointer_aliasing |
boolean() |
If true , then if a stream or struct contains multiple
pointers that reference the same value, they will use the same
referent (and that value will be represented only once in the
stream). Not all implementations support this. |
pointer_type() = {pointer, rpce_type()}
record_field() = atom()
record_name() = atom()
rpce_type() = basic_type() | struct_type() | bit_type() | custom_type() | endian_type() | size_type() | type_name()
The top-level intermediate representation of an RPCE type.
size_type() = {size_of, record_field(), int_type()} | {length_of, record_field(), int_type()}
abstract datatype: state()
string_type() = unicode | varying_unicode | string | {fixed_string, bytes()} | varying_string | binary | {fixed_binary, bytes()} | varying_binary | {fixed_binary, Size::bytes(), Alignment::bytes()}
struct_type() = {struct, record_name(), [field_spec()]}
type_name() = atom()
type_options() = options() | #{location => loc()}
compile_stream/4 | Compiles a stream. |
compile_type/3 | Compiles a type or struct. |
define_type/3 | Defines a type or struct. |
func_forms/1 | Returns the compiled forms. |
new/0 | Creates a new blank compiler state. |
new/1 | Creates a new compiler state with the specified initial options. |
set_options/2 | Changes the options on a compiler state. |
compile_stream(Name::type_name(), Structs::[type_name()], TOpts::type_options(), S0::state()) -> {ok, state()} | {error, term()}
Compiles a stream.
compile_type(Name::type_name(), TOpts::type_options(), S0::state()) -> {ok, state()} | {error, term()}
Compiles a type or struct.
define_type(Name::type_name(), Type::rpce_type(), S0::state()) -> {ok, state()} | {error, term()}
Defines a type or struct.
Returns the compiled forms.
new() -> state()
Creates a new blank compiler state.
Creates a new compiler state with the specified initial options.
Changes the options on a compiler state.
These options will only affect subsequent calls tocompile_type/3
,
not the result of any previous calls.
Generated by EDoc