Skip to content

Commit

Permalink
Parser: Only parseExpr for now
Browse files Browse the repository at this point in the history
  • Loading branch information
marzipankaiser committed Oct 20, 2023
1 parent 46eeab6 commit d0d5c01
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions examples/casestudies/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() })
}
```

0 comments on commit d0d5c01

Please sign in to comment.