-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kek kek kek
committed
Oct 23, 2023
1 parent
e3d9739
commit b282634
Showing
9 changed files
with
196 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
fn main() { | ||
if false { | ||
(); | ||
(); | ||
} | ||
|
||
if false // lone if comment | ||
{ | ||
(); | ||
(); | ||
} | ||
|
||
let a = if 0 > 1 { 0 } else { 0 }; | ||
|
||
if true { | ||
(); | ||
} else if false { | ||
(); | ||
(); | ||
} else { | ||
(); | ||
(); | ||
(); | ||
} | ||
|
||
if true // else-if-chain if comment | ||
{ | ||
(); | ||
} | ||
else if false // else-if-chain else-if comment | ||
{ | ||
(); | ||
(); | ||
} else // else-if-chain else comment | ||
{ | ||
(); | ||
(); | ||
(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
fn nested_if_else() { | ||
if false { 1 } else if false { 2 } else { 3 } | ||
if false { | ||
1 | ||
} else if false { | ||
2 | ||
} else { | ||
3 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
fn main() { | ||
if false | ||
{ | ||
(); | ||
(); | ||
} | ||
|
||
if false // lone if comment | ||
{ | ||
(); | ||
(); | ||
} | ||
|
||
|
||
let a = | ||
if 0 > 1 { | ||
0 | ||
} | ||
else | ||
{ | ||
0 | ||
}; | ||
|
||
|
||
if true | ||
{ | ||
(); | ||
} else if false { | ||
(); | ||
(); | ||
} | ||
else { | ||
(); | ||
(); | ||
(); | ||
} | ||
|
||
if true // else-if-chain if comment | ||
{ | ||
(); | ||
} | ||
else if false // else-if-chain else-if comment | ||
{ | ||
(); | ||
(); | ||
} else // else-if-chain else comment | ||
{ | ||
(); | ||
(); | ||
(); | ||
} | ||
} |