From d0d5c015bd03d24cf130ccf7a29be89ff7b370a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcial=20Gai=C3=9Fert?= Date: Fri, 20 Oct 2023 11:34:30 +0200 Subject: [PATCH] Parser: Only parseExpr for now --- examples/casestudies/parser.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/casestudies/parser.md b/examples/casestudies/parser.md index 1afe285f2a..0cc51e84e2 100644 --- a/examples/casestudies/parser.md +++ b/examples/casestudies/parser.md @@ -242,19 +242,19 @@ Having implemented a handler for the `Parser` effect, we can run our example "gr def println(p: ParseResult[Int]): Unit = println(showPR(p){ x => show(x) }) def println(p: ParseResult[Tree]): Unit = println(showPR(p){ x => show(x) }) def main() = { - println(parse("42") { parseCalls() }) +// println(parse("42") { parseCalls() }) // println(parse("foo(1)") { parseCalls() }) // println(parse("foo(1, 2)") { parseCalls() }) // println(parse("foo(1, 2, 3, 4)") { parseCalls() }) // println(parse("foo(1, 2, bar(4, 5))") { parseCalls() }) // println(parse("foo(1, 2,\nbar(4, 5))") { parseCalls() }) -// println(parse("}42") { parseExpr() }) -// println(parse("42") { parseExpr() }) -// println(parse("let x = 4 in 42") { parseExpr() }) -// println(parse("let x = let y = 2 in 1 in 42") { parseExpr() }) -// println(parse("let x = (let y = 2 in 1) in 42") { parseExpr() }) -// println(parse("let x = (let y = f(42) in 1) in 42") { parseExpr() }) -// println(parse("let x = (let y = f(let z = 1 in z) in 1) in 42") { parseExpr() }) + println(parse("}42") { parseExpr() }) + println(parse("42") { parseExpr() }) + println(parse("let x = 4 in 42") { parseExpr() }) + println(parse("let x = let y = 2 in 1 in 42") { parseExpr() }) + println(parse("let x = (let y = 2 in 1) in 42") { parseExpr() }) + println(parse("let x = (let y = f(42) in 1) in 42") { parseExpr() }) + println(parse("let x = (let y = f(let z = 1 in z) in 1) in 42") { parseExpr() }) } ``` \ No newline at end of file