Skip to content

Variables Siblings

Benedict Albrecht edited this page May 20, 2026 · 3 revisions

Variables: :siblings Scope

The :siblings scope makes a variable visible only for siblings' elements — no downstream visibility.

Syntax

<< name:siblings >>

Example

class C1 ( ) {
  aaa();
  {
    aaa();
    aaa();
  }
  aaa();
}

With :siblings scope

<:sub:> { <-ref,sub-> } <:>
<:ref:>  <<name:siblings>> ( ) ; <:>

The aaa variable is visible to sibling elements at the same level, but not to elements nested inside child blocks.

Compared to default (:following)

<:sub:> { <-ref,sub-> } <:>
<:ref:>  <<name>> ( ) ; <:>

With default scope, aaa would also be visible inside the nested { } block (downstream elements).

Clone this wiki locally