Replace method memorizeType with existing checkType()
Made only locally used methods private
Added clarifying comment for name with ambiguous meaning
Added already existing but missing context checks to parse tree
Replaced all return statements with breaks in Parser

This reduces the risk of getting unreachable code