Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you do one-symbol-lookahead with things like function hoisting?

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...



Not clear how hoisting is related to parsing really ...

Compiler builds table of variables (registers map) of the function to generate proper bytecodes to access registers. At this point hoisting has some effect. But it has nothing with parse/AST phase.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: