3 ms·
Yeah I see what you mean. There is some stuff that doesn't look like a recursive descent parser to me, but that's probably because there are some JavaScript id
by chubot 9y ago
Yeah I see what you mean. There is some stuff that doesn't look like a recursive descent parser to me, but that's probably because there are some JavaScript idioms and that's not my main language.
- BrendanEich 9y agoThe code you mentioned, pushTarget in particular, is for semantic checking, nothing to do with purely syntactic analysis AKA parsing. In particular, pushTarget is for break to label and continue to label (the "Target" is a labeled statement's exit or continue point).
- chubot 9y agoOK interesting, thanks. Yes that definitely could be part of my confusion -- that the code is doing more than parsing; it's also doing some semantic analysis in the same pass.