decided to make it fail on the undeclared var semantic error
looks like we are currently using a diff scan_file func