mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
Compare commits
2 commits
0a6e04ae5f
...
a07a4ab021
Author | SHA1 | Date | |
---|---|---|---|
azur | a07a4ab021 | ||
azur | 6f11fa8ccc |
2
a.hlm
2
a.hlm
|
@ -1,4 +1,4 @@
|
|||
func add x: num -> num = x + 1;
|
||||
func add (x: num) num = (\a: num -> a + 1)(x);
|
||||
|
||||
println(
|
||||
{
|
||||
|
|
|
@ -446,12 +446,16 @@ pub fn stmt_parser() -> impl P<Spanned<PStmt>> {
|
|||
let func = just(Token::Func)
|
||||
.ignore_then(symbol_parser())
|
||||
.then(
|
||||
symbol_parser()
|
||||
.then_ignore(just(Token::Colon))
|
||||
.then(type_parser())
|
||||
.separated_by(just(Token::Comma))
|
||||
nested_parser(
|
||||
symbol_parser()
|
||||
.then_ignore(just(Token::Colon))
|
||||
.then(type_parser())
|
||||
.separated_by(just(Token::Comma))
|
||||
.allow_trailing(),
|
||||
Delim::Paren,
|
||||
|_| Vec::new(),
|
||||
)
|
||||
)
|
||||
.then_ignore(just(Token::Arrow))
|
||||
.then(type_parser())
|
||||
.then_ignore(just(Token::Assign))
|
||||
.then(expr_parser().map(Box::new))
|
||||
|
|
Loading…
Reference in a new issue