make scope tree in compiler to check runtime errors