struct Novika::StructLayoutParser

Overview

Parses types in struct layouts. Similar to FFI::ValueTypeParser, but does some bookkeeping to stay away from deep recursion/ensure no cycles exist for inline structs/unions.

Included Modules

Defined in:

novika/forms/foreign.cr

Constructors

Instance Method Summary

Instance methods inherited from module Novika::FFI::TypeParser::ForbidsNothing

on_primitive(type : Nothing.class) on_primitive

Instance methods inherited from struct Novika::FFI::TypeParser

on_inline_struct(form : StructLayoutForm) : ForeignType on_inline_struct, on_primitive(type : ForeignType) : ForeignType on_primitive, on_struct_reference(form : StructLayoutForm) : ForeignType on_struct_reference, on_union(form : StructLayoutForm) : ForeignType on_union, parse : ForeignType parse

Constructor methods inherited from struct Novika::FFI::TypeParser

new(this : Block, typename : Word) new

Constructor Detail

def self.new(this, typename, field : Word, current : StructLayoutForm, outerset : Set(UInt64) | Nil = nil) #

[View source]

Instance Method Detail

def on_inline_struct(form : StructLayoutForm) : FFI::ForeignType #
Description copied from struct Novika::FFI::TypeParser

Inline struct-annotated struct layout middleware.


[View source]
def on_struct_reference(form : StructLayoutForm) : FFI::ForeignType #
Description copied from struct Novika::FFI::TypeParser

Struct reference-annotated struct layout middleware.


[View source]
def on_union(form : StructLayoutForm) : FFI::ForeignType #
Description copied from struct Novika::FFI::TypeParser

Union-annotated struct layout middleware.


[View source]