Refactor PEG grammar rule `primary`