Macro fungi_lang::fgi_nametm
source · macro_rules! fgi_nametm {
{ fromast $ast:expr } => { ... };
{ ^ $ast:expr } => { ... };
{ ( $($nmtm:tt)+ ) } => { ... };
{ @@$s:ident } => { ... };
{ @$n:expr } => { ... };
{ @@ } => { ... };
{ # $var:ident : $sort:tt . $($body:tt)+ } => { ... };
{ [$($nmfn:tt)+] $par:tt } => { ... };
{ [$($nmfn:tt)+] $par:tt $($pars:tt)+ } => { ... };
{ $var:ident } => { ... };
{ ~ $var:ident } => { ... };
{ $n:tt * $m:tt } => { ... };
{ $($nmtms:tt)+ } => { ... };
{ $($any:tt)* } => { ... };
}
Expand description
Parser for Name Terms
M,N ::=
fromast ast_expr (inject ast nodes)
(N) (parens)
@@ (write scope; sort Nm -> Nm)
@12345 (name literal)
@@hello (name literal)
#a:g.M (abstraction)
[M] N ... (curried application)
a (Variable)
~x (Value variable)
M * N (binary composition)
M * N * ... (extended binary composition)
n (literal Name)