Allow and/or statements to attach to the if/while header

For example:

  if false; or true; echo hello; end

will output 'hello' now.

Fixes #1428
This commit is contained in:
ridiculousfish
2015-12-19 14:45:45 -08:00
parent 0a6f62358b
commit 594b460ba2
8 changed files with 68 additions and 24 deletions

View File

@@ -32,8 +32,8 @@ if false ; end ; echo $status
if false ; or true ; echo "success1" ; end
if false ; and false ; echo "failure1" ; end
while false ; and false ; or true ; echo "success2"; break ; end
while false; or begin ; false; or true; end; echo "success3"; end
if false ; else if false ; and true ; else if false ; and false ; else if false; or true; echo "success 4"; end
while false; or begin ; false; or true; end; echo "success3"; break ; end
if false ; else if false ; and true ; else if false ; and false ; else if false; or true; echo "success4"; end
if false ; else if false ; and true ; else if false ; or false ; else if false; echo "failure 4"; end
if false ; or true | false ; echo "failure5" ; end