Skip to content

Conversation

@AsbjoernJC
Copy link
Collaborator

@AsbjoernJC AsbjoernJC commented Jun 23, 2023

  • Static scoping
  • Added case to VisitSymbol to handle last case of exprnode
    This fixes stuff like:
bool changedDir = false;
int offSet = 5;

if(offSet>= 5 and !changedDir){}
  • Added visit to blocknode in ifstatement
    This fixes stuff like not discovering undeclared vars in if block
bool changedDir = false;
int offSet = 5;

if(!changedDir) {
    offset = -offset;
}
  • Added condition to test whether unvisited child are type correct
bool changedDir = false;

loop (int i from 1 .. 8) {
    if(i >= 5 and !changedDir) {
        changedDir = true;
    }
}
  • Found bug in TypeCheckVisitor where operators set parent operator to && or ||. This is fixed which
    allows stuff like
if((1 + 1) == 2 != true and 0 == 0) {
}

Copy link
Collaborator

@JonasGLund99 JonasGLund99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

Copy link
Collaborator

@FredTheNoob FredTheNoob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meget flot gren

@FredTheNoob FredTheNoob merged commit a87958a into main Jun 25, 2023
@FredTheNoob FredTheNoob deleted the staticscope branch June 25, 2023 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants