add simple semantic analysis, check variables declaration