removing semantic analysis code from the AST structure