Add comments about data parameter in lesser blocks.

This commit is contained in:
Tom Alexander 2023-04-21 18:08:10 -04:00
parent f5218a6c31
commit fa4766b64e
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -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");