Add an example exploring indentation with comments.

This commit is contained in:
Tom Alexander 2023-04-15 16:34:33 -04:00
parent 1b10b197f2
commit 26e0ad5800
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,5 @@
# Comment
# indented line
# At the top of the file
foo
# Another comment

View File

@ -1 +1,10 @@
use super::Context;
use crate::parser::error::Res;
use crate::parser::util::start_of_line;
use crate::parser::Comment;
#[tracing::instrument(ret, level = "debug")]
pub fn comment<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Comment<'s>> {
start_of_line(context, input)?;
todo!()
}