Populate inline babel call fields.
This commit is contained in:
parent
6bc6fdc87b
commit
0d0b9863c3
@ -34,10 +34,11 @@ pub(crate) fn inline_babel_call<'b, 'g, 'r, 's>(
|
||||
input: OrgSource<'s>,
|
||||
) -> Res<OrgSource<'s>, InlineBabelCall<'s>> {
|
||||
let (remaining, _) = tag_no_case("call_")(input)?;
|
||||
let (remaining, _name) = name(context, remaining)?;
|
||||
let (remaining, _header1) = opt(parser_with_context!(header)(context))(remaining)?;
|
||||
let (remaining, _argument) = argument(context, remaining)?;
|
||||
let (remaining, _header2) = opt(parser_with_context!(header)(context))(remaining)?;
|
||||
let (remaining, name) = name(context, remaining)?;
|
||||
let (remaining, inside_header) = opt(parser_with_context!(header)(context))(remaining)?;
|
||||
let (remaining, arguments) = argument(context, remaining)?;
|
||||
let (remaining, end_header) = opt(parser_with_context!(header)(context))(remaining)?;
|
||||
let value = get_consumed(input, remaining);
|
||||
let (remaining, _trailing_whitespace) =
|
||||
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
let source = get_consumed(input, remaining);
|
||||
@ -45,11 +46,15 @@ pub(crate) fn inline_babel_call<'b, 'g, 'r, 's>(
|
||||
remaining,
|
||||
InlineBabelCall {
|
||||
source: source.into(),
|
||||
value: todo!(),
|
||||
call: todo!(),
|
||||
inside_header: todo!(),
|
||||
arguments: todo!(),
|
||||
end_header: todo!(),
|
||||
value: value.into(),
|
||||
call: name.into(),
|
||||
inside_header: inside_header.map(Into::<&str>::into),
|
||||
arguments: if arguments.len() > 0 {
|
||||
Some(arguments.into())
|
||||
} else {
|
||||
None
|
||||
},
|
||||
end_header: end_header.map(Into::<&str>::into),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user