Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> I still like the idea of hanging on to the original string form of the
>> constant long enough so that parser_typecast can feed that directly to
>> the target type's xxx_in() routine, and not have to worry about
>> conversion errors.
> I agree. I'm just worried about losing the typing hints provided by
> scan.l if we went to a "string only" solution.
No no, I didn't say that you can't keep T_Integer and T_Float nodes
separate. I was just suggesting that the *value* of one of these nodes
might be kept as a string (or, perhaps, both as a string and the numeric
format). That way, if you need to convert to some other type, you start
from the original string and don't have to risk a "lossy compression"
into floating point.
regards, tom lane