Closed gchiu closed 2 years ago
This is actually kind of a menace to think about how to support, considering how ad-hoc the scanner is, and how grafted in the support for generic TUPLE! was.
The truth is--and has always been--that the scanner should be a proper clean state machine of some kind. Red has gone down that road somewhat. I have really tried to only touch the scanner when absolutely necessary to coax it into doing something for a new feature.
I've put in a terrible hack that will notice when a generic TUPLE! is scanned, and has an email address inside of it. So it would originally see a tuple like:
as tuple! [graham chiu@mdh.health.nz]
This was producing an error, since email addresses aren't legal in tuples. But what I'm doing in the scanner is actually saying that if there is one (and only one) email address in a tuple, then rather than raise an error it is formed into an email address via DELIMIT with {.}
Horrible solution, but hopefully enough to get past any troubles people are having with email addresses that have dots in them.
https://github.com/metaeducation/ren-c/commit/26752e701d9585a7dd5bb1c4cb2e78c901908c5b