refactoring function argument handling during semantic analysis