ShadowNode
ShadowNode copied to clipboard
jerry: support const/let
The keyword const
and let
are such important features in JavaScript community, let's do support them!
work perhaps should do:
- find all enter and exit of block scope
- organize symbol table. Jerry has no AST, keep one literal pool for per function, and patch literal index in parser_post_processing(). The difficulty is how to keep low memory footprint and do not rewrite too much code. JS var hoisting makes things worse. We should record all vars in a scope, and can not drop them, which makes scope index base not known before function parse complete.
any progress?