3 ms·
>* "foo" is a keyword in type signatures, but a normal identifier otherwise Isn't this decision something that should be punted out of the tokenizer and into t
by statictype 17y ago
>* "foo" is a keyword in type signatures, but a normal identifier otherwise
Isn't this decision something that should be punted out of the tokenizer and into the parser?
- camccann 17y agoYou can punt as much into the parsing stage as you like, of course. It's not like there's even any requirement that the two stages be separated. All of the stuff I mentioned gives you the choice of either more work during parsing (which is usually hard enough already), or building a crazy Rube Goldberg-esque tokenizer--neither of which is appealing.
- tptacek 17y agoI'd rather complicate a lexer a little bit than debug parser conflicts.