mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-23 02:25:11 +00:00
goto detection improvements
This commit is contained in:
@@ -37,9 +37,11 @@ package
|
||||
TestForIn;
|
||||
TestForXml;
|
||||
TestGotos;
|
||||
TestGotos2;
|
||||
TestHello;
|
||||
TestIf;
|
||||
TestIfElse;
|
||||
TestIfInIf;
|
||||
TestInc2;
|
||||
TestIncDec;
|
||||
TestInlineFunctions;
|
||||
|
||||
34
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestGotos2.as
vendored
Normal file
34
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestGotos2.as
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package tests
|
||||
{
|
||||
public class TestGotos2
|
||||
{
|
||||
|
||||
public function run() :int
|
||||
{
|
||||
var a : Boolean = true;
|
||||
var b : Boolean = false;
|
||||
var c : Boolean = true;
|
||||
|
||||
if (a)
|
||||
{
|
||||
|
||||
if (b)
|
||||
{
|
||||
trace("A");
|
||||
if (c)
|
||||
{
|
||||
trace("B");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
trace("E");
|
||||
}
|
||||
return 5;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
34
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestIfInIf.as
vendored
Normal file
34
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestIfInIf.as
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestIfInIf
|
||||
{
|
||||
|
||||
public function run() : int
|
||||
{
|
||||
var k:int = 5;
|
||||
if (k > 5 && k <20)
|
||||
{
|
||||
trace("A");
|
||||
|
||||
if (k < 4)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (k > 4 && k<10)
|
||||
{
|
||||
trace("B");
|
||||
if (k < 7)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
trace("C");
|
||||
return 7;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user