handle more pedantic lua syntax and have better error messages