From fa4766b64e390a45df2ef7f80d2f62529dc25afc Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 21 Apr 2023 18:08:10 -0400 Subject: [PATCH] Add comments about data parameter in lesser blocks. --- src/parser/lesser_block.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/parser/lesser_block.rs b/src/parser/lesser_block.rs index 39fa05e..e330840 100644 --- a/src/parser/lesser_block.rs +++ b/src/parser/lesser_block.rs @@ -173,6 +173,7 @@ pub fn export_block<'r, 's>( input: &'s str, ) -> Res<&'s str, ExportBlock<'s>> { let (remaining, name) = lesser_block_begin("export")(context, input)?; + // TODO: Data is mandatory and must be a single word let (remaining, parameters) = opt(tuple((space1, data)))(remaining)?; let (remaining, _nl) = line_ending(remaining)?; let lesser_block_end_specialized = lesser_block_end("export"); @@ -211,6 +212,7 @@ pub fn export_block<'r, 's>( #[tracing::instrument(ret, level = "debug")] pub fn src_block<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, SrcBlock<'s>> { let (remaining, name) = lesser_block_begin("src")(context, input)?; + // TODO: DATA is mandatory and must follow the LANGUAGE SWITCHES ARGUMENTS pattern let (remaining, parameters) = opt(tuple((space1, data)))(remaining)?; let (remaining, _nl) = line_ending(remaining)?; let lesser_block_end_specialized = lesser_block_end("src");