diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index f7d1fbf..69af682 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,6 +47,25 @@ fn parse_args() -> Args { args } +#[sylt_macro::extern_link] +pub fn f(x: sylt::Value, _typecheck: bool) -> Result<sylt::Value, sylt::error::ErrorKind> { + Ok(x) +} + +#[sylt_macro::extern_link(g)] +pub fn f2(x: sylt::Value, _typecheck: bool) -> Result<sylt::Value, sylt::error::ErrorKind> { + Ok(x) +} + +mod m1 { + mod m2 { + #[sylt_macro::extern_link(h)] + pub fn f2(x: sylt::Value, _typecheck: bool) -> Result<sylt::Value, sylt::error::ErrorKind> { + Ok(x) + } + } +} + sylt_macro::extern_function!( extern_test [sylt::Value::Float(x), sylt::Value::Float(y)] -> sylt::Type::Float => { |
