mnbujold / c415-compiler

Fall 2012 CMPUT 415 Compiler Course
0 stars 3 forks source link

Types and variable names cannot be the same in same scope #40

Closed James-Osgood closed 11 years ago

James-Osgood commented 11 years ago

In test se15.pal, variable declarations of the form

var name : name;

are not caught. We need to check the scope of the type of variables finer.

James-Osgood commented 11 years ago

Similarly in test se16.pal.

James-Osgood commented 11 years ago

Actually, the error in se16.pal is INCORRECTLY labelled an error.

James-Osgood commented 11 years ago

This is fixed, but this isn't: procedure g (integer : integer);

James-Osgood commented 11 years ago

But now it IS!

James-Osgood commented 11 years ago

This is all fixed, but we should put ifs around symExistError()s to not output an error if the defined type is already of error type.

James-Osgood commented 11 years ago

Should be all fixed now!