1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-10-16 02:37:40 -05:00

C-style comment

This commit is contained in:
Natapat Samutpong 2022-02-17 13:50:32 +07:00
parent 6242f7a2e3
commit db773bf735
2 changed files with 3 additions and 2 deletions

View file

@ -1,4 +1,5 @@
fun foo a b = a == b; fun foo a b = a == b;
fun bar a b = { a == b }; fun bar a b = { a == b };
let res = foo(34, 35); let res = foo(34, 35);
let res = { foo(34, 35) }; let res = { foo(34, 35) };
/* comment */

View file

@ -83,7 +83,7 @@ pub fn lexer() -> impl Parser<char, Vec<(Token, Span)>, Error = Simple<char>> {
.or(keyword) .or(keyword)
.recover_with(skip_then_retry_until([])); .recover_with(skip_then_retry_until([]));
let comment = just("//").then(take_until(just('\n'))) let comment = just("/*").then(take_until(just("*/")))
.padded() .padded()
.ignored(); .ignored();