mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibJS: Add NativeFunction, a callable wrapper around a C++ lambda
This can be used to implement arbitrary functionality, callable from JavaScript. To make this work, I had to change the way CallExpression passes arguments to the callee. Instead of a HashMap<String, Value>, we now pass an ordered list of Argument { String name; Value value; }. This patch includes a native "print(argument)" function. :^)
This commit is contained in:
parent
cc8e3048bc
commit
7912f33ea0
Notes:
sideshowbarker
2024-07-19 08:20:25 +09:00
Author: https://github.com/awesomekling
Commit: 7912f33ea0
9 changed files with 129 additions and 17 deletions
|
@ -29,6 +29,7 @@
|
|||
namespace JS {
|
||||
|
||||
class ASTNode;
|
||||
class Argument;
|
||||
class Cell;
|
||||
class Expression;
|
||||
class Heap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue