Y
Yan Huang
When I was looking at Narcissus (a JS interpreter written in JS,
shipped with Mozilla Firefox) code, I noticed that it puts all JS
functions into 3 categories, implied by this line of code:
const DECLARED_FORM = 0, EXPRESSED_FORM = 1, STATEMENT_FORM = 2;
For DECLARED_FORM and EXPRESSED_FORM, I can guess what they are and
verify my guess by running narcissus parser.
function f(){} ------ DECLARED_FORM
f = function(){} --------- EXPRESSED_FORM
Does anyone know what a STATEMENT_FORM JavaScript function could be?
Thanks,
Yan Huang
shipped with Mozilla Firefox) code, I noticed that it puts all JS
functions into 3 categories, implied by this line of code:
const DECLARED_FORM = 0, EXPRESSED_FORM = 1, STATEMENT_FORM = 2;
For DECLARED_FORM and EXPRESSED_FORM, I can guess what they are and
verify my guess by running narcissus parser.
function f(){} ------ DECLARED_FORM
f = function(){} --------- EXPRESSED_FORM
Does anyone know what a STATEMENT_FORM JavaScript function could be?
Thanks,
Yan Huang