Macro stark::sail_fn[][src]

macro_rules! sail_fn {
    ( const $array:ident; $reg:ident $tbl:ident $env:ident;
      $( $name:literal $argct:literal [ $($args:ident),* ] $body:block )+
    ) => { ... };
    ( let $array:ident; $reg:ident $tbl:ident $env:ident;
      $( $name:literal $argct:literal [ $($args:ident),* ] $body:block )+
    ) => { ... };
}
Expand description

Generates a slice of native Sail function pointers along with names and argument counts

This may be a constant or may be local to a Rust scope. The syntax used is quite similar to that of regular functions but eases access to arguments in the body. All native functions must return a valid Sail object.

TODO: type checks and variable length arglists for native functions TODO: generate these functions somehow else if macros won’t cut it