abstract struct Novika::FFI::TypeParser

Overview

An object used to translate Words (representing a foreign type) into actual ForeignTypes.

Direct Known Subclasses

Defined in:

novika/ffi.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(this : Block, typename : Word) #

Initializes a parser object from this, a block that will be asked for word definitions in case they are needed, and typename, which is the word-to-be-parsed itself.


[View source]

Instance Method Detail

def on_inline_struct(form : StructLayoutForm) : ForeignType #

Inline struct-annotated struct layout middleware.


[View source]
def on_primitive(type : ForeignType) : ForeignType #

Primitive type middleware.


[View source]
def on_struct_reference(form : StructLayoutForm) : ForeignType #

Struct reference-annotated struct layout middleware.


[View source]
def on_union(form : StructLayoutForm) : ForeignType #

Union-annotated struct layout middleware.


[View source]
def parse : ForeignType #

Performs the parsing. Returns the resulting type.


[View source]