Add sections (type, var, let, const, using) support for reorder pragma (#6326)

This commit is contained in:
BigEpsilon 2017-10-28 11:33:35 +02:00 • committed by Andreas Rumpf
commit e2af486434
10 changed files with 551 additions and 129 deletions

View file

@ -9,7 +9,6 @@ defined
{.reorder: on.}
{.experimental.}
{.push callconv: stdcall.}
proc bar(x: T)
proc foo() =
@ -22,15 +21,16 @@ proc bar(x: T) =
echo "works ", x
foo(x)
when defined(testdef):
proc whendep() = echo "defined"
else:
proc whendep() = echo "undefined"
foo()
type
T = int
when defined(testdef):
proc whendep() = echo "defined"
else:
proc whendep() = echo "undefined"
when not declared(goo):
proc goo(my, omy) = echo my
@ -42,5 +42,3 @@ using
my, omy: int
goo(3, 4)
{.pop.}