Allow whitespace in else if

Issue #24 resolved
Fabian Maurer created an issue

The suggestion would be to allow more than one space between 'else' and 'if', als long as they are in the same line.
To avoid this problem:

label Start
    $test = 1;
    if($test == 1) then
        say "Creeper" "Hi.";
    else  if($test == 2) then // the 2 whitespace here prevent it from beein recognised as "else if", so the parser compains in the last line about a missing "end"
        say "Creeper" "Hello.";
    end
end //complains here

Comments (3)

  1. Log in to comment