Updated test cases for testing if-statement parsing

if_statement_parsing
Tristan B. V. Kildaire 2021-03-20 18:41:35 +02:00
parent 35132be9d6
commit 88a5528070
2 changed files with 170 additions and 0 deletions

View File

@ -48,6 +48,21 @@ class clazz_2_1
print("Bhjkfd");
}
if(1)
{
print("Hello");
}
else if(1)
{
print("Bruh");
}
else
{
print("Bhjkfd");
}
}

View File

@ -0,0 +1,155 @@
int x;
ubyte y;
ubyte k = 1;
class clazz1
{
print("Hello world");
}
class clazz_2_1
{
class clazz_2_2
{
class clazz_2_2_1
{
}
}
class clazz_2_3
{
class clazz_2_3_1
{
if(1)
{
print("Hello");
}
else if(1)
{
print("Bruh");
}
else
{
print("Bhjkfd");
}
if(1)
{
print("Hello");
}
else if(1)
{
print("Bruh");
}
else
{
print("Bhjkfd");
}
if(1)
{
print("Hello");
}
else
{
print("Bruh");
}
else if(1)
{
print("Bhjkfd");
}
}
print("Hello");
}
}
void main(int hello, byte d)
{
ubyte thing = "Hello";
print("Hello world");
print(1+1);
print(1+1);
ubyte eish = 1+1;
ubyte poes = ((1+1));
if(1+1)
{
if(1)
{
if((1))
{
print("Hello");
}
print("Hello");
}
}
if(((2)))
{
print(1+1);
}
if(2+222222/2)
{
while(1)
{
while(2+2)
{
}
}
}
}
void k(int j, int k)
{
ubyte thing = "Hello";
print("Hello world");
print(1+1);
print(1+1);
ubyte eish = 1+1;
ubyte poes = ((1+1));
if(1+1)
{
if(1)
{
if((1))
{
print("Hello");
}
print("Hello");
}
}
if(((2)))
{
print(1+1);
}
if(2+222222/2)
{
while(1)
{
while(2+2)
{
}
}
}
}