language mp - checks for correct declaration ending