Skip to content

Commit

Permalink
Add example in doc comment of 'RecExpr' (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrossel authored Apr 3, 2024
1 parent 3231b86 commit 6401363
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ impl LanguageChildren for Id {
/// a list of enodes.
///
/// [`RecExpr`]s must satisfy the invariant that enodes' children must refer to
/// elements that come before it in the list.
/// elements that come before it in the list. For example, the expression
/// `(+ (* x 5) x)` could be represented by a recursive expression of the form
/// `[Num(5), Var("x"), Mul(1, 0), Add(2, 1)]`.
///
/// If the `serde-1` feature is enabled, this implements
/// [`serde::Serialize`](https://docs.rs/serde/latest/serde/trait.Serialize.html).
Expand Down

0 comments on commit 6401363

Please sign in to comment.