diff mbox series

cil_container_statements.md: clarify in-statement limitations

Message ID 20210812115243.224604-1-dominick.grift@defensec.nl (mailing list archive)
State Superseded
Headers show
Series cil_container_statements.md: clarify in-statement limitations | expand

Commit Message

Dominick Grift Aug. 12, 2021, 11:52 a.m. UTC
in-statements are resolved before inheritance and this is
unintuitive. Explain that one can instead re-declare blocks and macros
that were inherited, effectively yielding similar results.

Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
---
 secilc/docs/cil_container_statements.md | 2 ++
 1 file changed, 2 insertions(+)

Comments

James Carter Aug. 12, 2021, 1:36 p.m. UTC | #1
On Thu, Aug 12, 2021 at 8:33 AM Dominick Grift
<dominick.grift@defensec.nl> wrote:
>
> in-statements are resolved before inheritance and this is
> unintuitive. Explain that one can instead re-declare blocks and macros
> that were inherited, effectively yielding similar results.
>
> Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>

I am working on an optional extension of the behavior of the
in-statement that I hope to send out soon. If that works out, then the
documentation is going to change, so let's hold off on this patch for
now to see how that turns out.

Thanks,
Jim

> ---
>  secilc/docs/cil_container_statements.md | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/secilc/docs/cil_container_statements.md b/secilc/docs/cil_container_statements.md
> index 41a4612c..0259778c 100644
> --- a/secilc/docs/cil_container_statements.md
> +++ b/secilc/docs/cil_container_statements.md
> @@ -282,6 +282,8 @@ Allows the insertion of CIL statements into a named container ([`block`](cil_con
>
>  Not allowed in [`macro`](cil_call_macro_statements.md#macro), [`booleanif`](cil_conditional_statements.md#booleanif), and other [`in`](cil_container_statements.md#in) blocks.
>
> +Note that [`in`](cil_container_statements.md#in) statements referencing blocks and macros that were inherited cannot be resolved and that instead it is allowed to re-declare blocks and macros that were inherited, resulting in similar behavior.
> +
>  [`tunable`](cil_conditional_statements.md#tunable) and [`in`](cil_container_statements.md#in) statements are not allowed in [`in`](cil_container_statements.md#in) blocks.
>
>  **Statement definition:**
> --
> 2.32.0
>
diff mbox series

Patch

diff --git a/secilc/docs/cil_container_statements.md b/secilc/docs/cil_container_statements.md
index 41a4612c..0259778c 100644
--- a/secilc/docs/cil_container_statements.md
+++ b/secilc/docs/cil_container_statements.md
@@ -282,6 +282,8 @@  Allows the insertion of CIL statements into a named container ([`block`](cil_con
 
 Not allowed in [`macro`](cil_call_macro_statements.md#macro), [`booleanif`](cil_conditional_statements.md#booleanif), and other [`in`](cil_container_statements.md#in) blocks.
 
+Note that [`in`](cil_container_statements.md#in) statements referencing blocks and macros that were inherited cannot be resolved and that instead it is allowed to re-declare blocks and macros that were inherited, resulting in similar behavior.
+
 [`tunable`](cil_conditional_statements.md#tunable) and [`in`](cil_container_statements.md#in) statements are not allowed in [`in`](cil_container_statements.md#in) blocks.
 
 **Statement definition:**