mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
DEV: Remove the shape specifier for a funcion.
This commit is contained in:
parent
577aa5e72a
commit
8b3552e491
@ -112,13 +112,15 @@ assert t.ok{
|
|||||||
desc = "You can cast true into a string",
|
desc = "You can cast true into a string",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Shapes and their specifiers
|
||||||
|
|
||||||
let mystr::"" = "a string";
|
let mystr::"" = "a string";
|
||||||
|
|
||||||
let struct_shape = {
|
let struct_shape = {
|
||||||
foo :: "" = "",
|
foo :: "" = "",
|
||||||
};
|
};
|
||||||
|
|
||||||
let func_shape = func(arg :: "", arg2 :: "") => arg + arg2 :: "";
|
let func_shape = func(arg :: "", arg2 :: "") => arg + arg2;
|
||||||
|
|
||||||
let module_shape = module{self={}} => (result :: {}) {
|
let module_shape = module{self={}} => (result :: {}) {
|
||||||
let result :: {} = self;
|
let result :: {} = self;
|
||||||
|
@ -437,7 +437,6 @@ fn func_expression(input: SliceIter<Token>) -> Result<SliceIter<Token>, Expressi
|
|||||||
_ => must!(punct!(")")),
|
_ => must!(punct!(")")),
|
||||||
_ => must!(punct!("=>")),
|
_ => must!(punct!("=>")),
|
||||||
map => trace_parse!(expression),
|
map => trace_parse!(expression),
|
||||||
_ => optional!(shape_suffix),
|
|
||||||
(pos, arglist, map)
|
(pos, arglist, map)
|
||||||
);
|
);
|
||||||
match parsed {
|
match parsed {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user