mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- $foreach "()" replaced by trailing ":" $foreach ($x, $y : $foo) -> $foreach $x, $y : $foo:
- `$for` "()" replaced by trailing ":" `$for (var $x = 0; $x < FOO; $x++)` -> `$for var $x = 0; $x < FOO; $x++:` - `$switch` "()" replaced by trailing ":" `$switch ($Type)` -> `$switch $Type:` - Empty `$switch` requires trailing ":" `$switch` -> `$switch:`
This commit is contained in:
@@ -69,7 +69,7 @@ fn void switch_subtyping()
|
||||
default:
|
||||
assert(false);
|
||||
}
|
||||
$switch (Bar.typeid)
|
||||
$switch Bar.typeid:
|
||||
$case Foo:
|
||||
assert(true);
|
||||
$case Bar:
|
||||
|
||||
@@ -4,7 +4,7 @@ import std::io;
|
||||
|
||||
macro test(start, ...)
|
||||
{
|
||||
$for (var $i = 0; $i < $vacount; $i++)
|
||||
$for var $i = 0; $i < $vacount; $i++:
|
||||
for ($vatype[$i] i = ($vatype[$i])start; i < 5; i+=2)
|
||||
{
|
||||
assert(math::is_even(i));
|
||||
|
||||
Reference in New Issue
Block a user