Finish If Statement Parsing

Reporter: FaresAtef1  |  Status: open  |  Last Modified: March 08, 2024, 06:06:34 am

This PR finalizes the tasks initiated in #2375. It addresses the remaining semicolon issues and incorporates additional fixes to the parser.

Modified Expressions

  • Unary Prefix
  • Binary

Testing

  • Add new if statement tests.
  • Create a new type cast method AST::Node::As.
  • Create a new header file for all the matchers.

To be done

  • Fix the infinite loop error in the binary expression.
  • Modify the matchers for for loop.
  • Use AST cast routine instead of dynamic_cast.
  • Handle the following cases:
for(i=0;i<3;i++)

{k+;}

fn(i , j+2 ;)

fn(i , j ;)
Please sign in to post comments, or you can view this issue on GitHub.