Refactor primary expression parsing