adding support to detect loop-until and begin-end errors