Basically, if there is a compilation error, then you can't run it.
A syntax error means the compiler / interpreter is saying "I do not know what you mean by this", so it cannot generate any code or execute any commands until you have fixed it.
It's a bit like me telling you to
Go coffee kitchen (cup make milk) sugar two and six
Go kitchen and make six cup coffee (milk two sugar)