A new syntax has been added to Gleam, the attribute syntax
@target(erlang)
pub fn main() { todo }
Attributes proceed imports or definitions in modules. The compiler only accepts @target(erlang) and @target(javascript) but I believe the tree sitter should accept any name that would be a valid function name in place of target and any comma-delimited sequence of optionally labelled constant expressions within the ().
@deprecated(since: "1.2.0", replacement: wobble)
pub fn wibble() { todo }
Hello!
A new syntax has been added to Gleam, the attribute syntax
Attributes proceed imports or definitions in modules. The compiler only accepts
@target(erlang)
and@target(javascript)
but I believe the tree sitter should accept any name that would be a valid function name in place oftarget
and any comma-delimited sequence of optionally labelled constant expressions within the()
.