Skip to content

[FEATURE] Add if cascade without braces #408

Description

@Math-O5

Is your feature request related to a problem? Please describe.
Extension of #27, the goal is implement if cascade statement when the command use no braces, as follows:

Should be allowed

Sim-C:

if (expression)
    if(expression)
        cmd
     else
         cmd
else
    cmd 

Plus, you should ensure that when if (expresion) is called without braces and followed of else, only and necessary one instruction is between both.

Should NOT be allowed

if (expression)
    if(expression)
        cmd
        cmd 
     else
         cmd
else
    cmd 
if (expression)
    if(expression)
        cmd
     else
         // missing command here
else
    cmd 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmoderateModerate problem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions