=================================================
if block with boolean
=================================================

if (1) {
  print "hello";
}

---

(source_file
  (if_statement (parenthesized_expression (integer))
    (block
      (call_expression (identifier) (argument (string_double_quoted))) (semi_colon)
    )
  )
)

=================================================
if else block with boolean
=================================================

if (1) {
  print "hello";
}
else {
  print "else";
}

---

(source_file
  (if_statement (parenthesized_expression (integer))
    (block
      (call_expression (identifier) (argument (string_double_quoted))) (semi_colon)
    )
    (block
      (call_expression (identifier) (argument (string_double_quoted))) (semi_colon)
    )
  )
)

=================================================
Simple while statement
=================================================

my $i = 0;
while ($i < 10) {
  print "hello $i";

  $i++;
}

---

(source_file
  (variable_declaration (scope) (single_var_declaration (scalar_variable)) (integer) (semi_colon))
  (while_statement (empty_parenthesized_expression (binary_expression (scalar_variable) (integer)))
    (block
      (call_expression (identifier) (argument (string_double_quoted (interpolation (scalar_variable))))) (semi_colon)
      (unary_expression (scalar_variable)) (semi_colon)
    )
  )
)

=================================================
while statement with label
=================================================

my $i = 0;
MEOW: while ($i < 10) {
  print "hello $i";
  
  next MEOW;

  $i++;
}

---

(source_file
  (variable_declaration (scope) (single_var_declaration (scalar_variable)) (integer) (semi_colon))
  (while_statement (identifier) (empty_parenthesized_expression (binary_expression (scalar_variable) (integer)))
    (block
      (call_expression (identifier) (argument (string_double_quoted (interpolation (scalar_variable))))) (semi_colon) (loop_control_statement (loop_control_keyword) (identifier) (semi_colon)) (unary_expression (scalar_variable)) (semi_colon))
  )
)

=================================================
single line for loop
=================================================

my @array = (1, 3, 4);
print "in a loop" for @array;

---

(source_file
  (variable_declaration (scope) (single_var_declaration (array_variable)) (array (integer) (integer) (integer)) (semi_colon))
  (single_line_statement (call_expression (identifier) (argument (string_double_quoted))) (for_simple_statement (array_variable) (semi_colon)))
)

=================================================
simple for loop TODO: this is failing
=================================================

for (my $i=1; $i < 10; $i++) {
}

---

(source_file
  (for_statement_1 (binary_expression (call_expression (identifier) (argument (scalar_variable))) (integer)) (semi_colon) (binary_expression (scalar_variable) (integer)) (semi_colon) (unary_expression (scalar_variable))
    (block)
  )
)

=================================================
for ever loop
=================================================

for (;;) {
  print "hello";
}

---

(source_file
  (for_statement_1 (semi_colon) (semi_colon)
    (block
      (call_expression (identifier) (argument (string_double_quoted))) (semi_colon)
    )
  )
)

=================================================
foreach loop
=================================================

foreach my $single (@array) {
}

---

(source_file
  (foreach_statement (scope) (scalar_variable) (array_variable)
    (block)
  )
)
