3 ms·
> 1k lines per day sounds like the opposite of productive Having built a compiler before, this seems normal, especially since the parser is written manually (a
by aylmao 6y ago
> 1k lines per day sounds like the opposite of productive
Having built a compiler before, this seems normal, especially since the parser is written manually (as opposed to generated). Parsers are always a lot of lines of code.
Not all of them are the most complex, and in fact a lot will just be defining all the different nodes of your AST and branching on them, which, as blocks do, tend to inflate code a lot. I wouldn't expect a JavaScript parser to be any more compact though, or the development (especially in a codebase with few contributors) to be any less "thrashy".