3 ms·
It's not hard. Obviously the parser has to do that things that aren't a single token like parenthesized expressions. Even for things where the nesting does hap
by munificent 9y ago
It's not hard. Obviously the parser has to do that things that aren't a single token like parenthesized expressions.
Even for things where the nesting does happen during lexical analysis, it's pretty trivial to keep a count in your lexer. Lots of languages support nesting comment syntax or string interpolation, which both have equivalent difficulty.