2 ms·
In pattern matching, how do you discriminate between literal patterns and variables patterns? I'm especially curious about how `true' and `false' vs `result' a
by eru 13y ago
In pattern matching, how do you discriminate between literal patterns and variables patterns? I'm especially curious about how `true' and `false' vs `result' are handled.
- paf31 13y agoThis is handled in the parser. There are two productions, identifier and reserved and the two don't intersect. Reserved identifiers like true and false match more eagerly than regular identifiers.