Description
This issue proposes adding conditional control directives to improve the templating syntax. Instead of mixing plain PHP if statements, implementing @if directives will provide a cleaner, modern syntax closer to popular template engines.
Proposed Syntax
@if($user->isAdmin())
<p>Welcome, Admin!</p>
@elseif($user->isEditor())
<p>Welcome, Editor!</p>
@else
<p>Welcome, User!</p>
@endif
Expected Behavior
The compiler should seamlessly translate these directives into standard PHP conditional statements (, , etc.).
Checklist
Description
This issue proposes adding conditional control directives to improve the templating syntax. Instead of mixing plain PHP
ifstatements, implementing@ifdirectives will provide a cleaner, modern syntax closer to popular template engines.Proposed Syntax
Expected Behavior
The compiler should seamlessly translate these directives into standard PHP conditional statements (, , etc.).
Checklist