feat($parse): handle `Infinity` and `NaN`

Closes #9492