Reserved words are valid ecmascript in certain contexts, referred to
by the IdentifierName syntax rule. For example, while throw is a
keyword, using throw as a property accessor such as foo.throw is valid.
While this implementation isn't quite correct, it is an improvement. For
an example of how th
Per section 19.2.4.3 of the 2020 ECMAScript specification, functions
that can be used as a constructor must have a fresh prototype.
* module/language/ecmascript/compile-tree-il.scm: Use make-js-function
procedure when creating an ecmascript function. This provides the
function with a fresh pro
Implement ecmascript try/catch using
with-exception-handler/rais-exception respectively so that it is
straight-forward to interact with ecmascript exceptions from scheme.
* module/language/ecmascript/compile-tree-il.scm: Compile try/catch
* module/language/ecmascript/impl.scm: Provide js-try and j
as such if anyone has any thoughts about other
improvements to the ECMAScript compiler I would be all ears!
Happy Hacking!
Sean
Sean Lynch (4):
Support ecmascript return operator with no operand.
Implement ecmascript try/catch.
Implement ecmascript function prototype.
Fix some reserved word
* module/language/ecmascript/compile-tree-il.scm: Support return
operator with no operand.
---
module/language/ecmascript/compile-tree-il.scm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/module/language/ecmascript/compile-tree-il.scm
b/module/language/ecmascript/compile-tree-il.scm
ind