Skip to content

Commit

Permalink
Include other example functions in rendered doc example.
Browse files Browse the repository at this point in the history
  • Loading branch information
olson-sean-k committed Nov 19, 2024
1 parent 1fd0082 commit bc78ccb
Showing 1 changed file with 30 additions and 15 deletions.
45 changes: 30 additions & 15 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
//! #
//! # impl ast { /*
//! mod ast {
//! ...
//! # */
//! pub fn parse(expression: &str) -> DiagnosticResult<'_, Ast<'_>> {
//! # tardar::Diagnosed::ok(Ast(expression)) /*
Expand All @@ -39,21 +40,35 @@
//! # } /*
//! }
//! # */
//! # impl rule {
//! # pub fn check<'t>(tree: Ast<'t>) -> DiagnosticResult<'t, Checked<Ast<'t>>> {
//! # tardar::Diagnosed::ok(Checked(tree))
//! # }
//! # }
//! # impl hint {
//! # pub fn check<'c, 't>(
//! # tree: &'c Checked<Ast<'t>>,
//! # ) -> impl 'c + Iterator<Item = tardar::BoxedDiagnostic<'t>>
//! # where
//! # 't: 'c,
//! # {
//! # Option::<_>::None.into_iter()
//! # }
//! # }
//! # impl rule { /*
//! mod rule {
//! ...
//! # */
//! pub fn check<'t>(tree: Ast<'t>) -> DiagnosticResult<'t, Checked<Ast<'t>>> {
//! # tardar::Diagnosed::ok(Checked(tree)) /*
//! ...
//! # */
//! }
//! # } /*
//! }
//! # */
//! # impl hint { /*
//! mod hint {
//! ...
//! # */
//! pub fn check<'c, 't>(
//! tree: &'c Checked<Ast<'t>>,
//! ) -> impl 'c + Iterator<Item = tardar::BoxedDiagnostic<'t>>
//! where
//! 't: 'c,
//! {
//! # Option::<_>::None.into_iter() /*
//! ...
//! # */
//! }
//! # } /*
//! }
//! # */
//!
//! pub fn parse_and_check(expression: &str) -> DiagnosticResult<'_, Checked<Ast<'_>>> {
//! ast::parse(expression)
Expand Down

0 comments on commit bc78ccb

Please sign in to comment.