mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 21:45:20 +00:00
Now that we have the beginnings of a parser, let's take the script to run as a command-line argument and move all the test scripts into /home/anon/js :^) To run a script, simply use "js": $ js my-script.js To get an AST dump before execution, you can use "js -A"
7 lines
85 B
JavaScript
7 lines
85 B
JavaScript
c = 1;
|
|
function foo() {
|
|
var a = 5;
|
|
var b = 7;
|
|
return a + b + c;
|
|
}
|
|
foo();
|