Skip to content

Commit

Permalink
Merge pull request #673 from jnoortheen/patch-1
Browse files Browse the repository at this point in the history
Update tutorial.md for v0.9.3
  • Loading branch information
zesterer authored Sep 25, 2024
2 parents 9031baf + 212527f commit 8151341
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ expression definition. However, we also want to be able to chain `let`s together
definition. We call it `decl` ('declaration') because we're eventually going to be adding `fn` syntax too.

```rust
let ident = text::ascii::ident()
let ident = text::ident()
.padded();

let expr = recursive(|expr| {
Expand Down Expand Up @@ -576,7 +576,7 @@ let expr = recursive(|expr| {
});

let decl = recursive(|decl| {
let r#let = text::ascii::keyword("let")
let r#let = text::keyword("let")
.ignore_then(ident)
.then_ignore(just('='))
.then(expr.clone())
Expand Down Expand Up @@ -685,7 +685,7 @@ looks very much like the existing definition of `r#let`:

```rust
let decl = recursive(|decl| {
let r#let = text::ascii::keyword("let")
let r#let = text::keyword("let")
.ignore_then(ident)
.then_ignore(just('='))
.then(expr.clone())
Expand All @@ -697,7 +697,7 @@ let decl = recursive(|decl| {
then: Box::new(then),
});

let r#fn = text::ascii::keyword("fn")
let r#fn = text::keyword("fn")
.ignore_then(ident)
.then(ident.repeated())
.then_ignore(just('='))
Expand Down

0 comments on commit 8151341

Please sign in to comment.