summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-13LibJS: Split Function into subclasses NativeFunction and ScriptFunctionAndreas Kling
Both types of functions are now Function and implement calling via: virtual Value call(Interpreter&, Vector<Value> arguments); This removes the need for CallExpression::execute() to care about which kind of function it's calling. :^)
2020-03-13Solitaire: Fix automatic moving of cardsTill Mayer
A previous change trying to fix an assertion error completely broke the automatic moving of cards, this commit will fix this problem
2020-03-13Solitaire: Minor tweaks to animation x_velocity and bouncynessTill Mayer
2020-03-13Solitaire: Add about dialog and 32x32 iconTill Mayer
2020-03-12LibJS: Move GlobalObject to its own Object subclassAndreas Kling
This is mostly for tidiness at the moment.
2020-03-12LibJS: Replace $gc() hack with a NativeFunction on the global objectAndreas Kling
To make this work, also start passing Interpreter& to native functions.
2020-03-12LibJS: Fix broken parsing of 0-argument CallExpressionAndreas Kling
2020-03-12LibJS: Allow implicit Value construction from GC-allocated thingsAndreas Kling
2020-03-12LibJS: Add NativeFunction, a callable wrapper around a C++ lambdaAndreas Kling
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. :^)
2020-03-12LibJS: Fix NumericLiteral::dump() outputAndreas Kling
2020-03-12LibJS: Parse CallExpression argumentsAndreas Kling
2020-03-12LibJS: Dump CallExpression arguments (if any)Andreas Kling
2020-03-12HackStudio: Abstract over syntax highlighterOriko
2020-03-12HackStudio: Underline header linksOriko
2020-03-12LibGUI: Add underlines to highlightingOriko
2020-03-12LibGUI: Take scroll offset into account on ItemView rubberband selectionTibor Nagy
Same kind of issue as #1271.
2020-03-12LibJS: Implement const variable declarations0xtechnobabble
This also tightens the means of redeclaration of a variable by proxy, since we now have a way of knowing how a variable was initially declared, we can check if it was declared using `let` or `const` and not tolerate redeclaration like we did previously.
2020-03-12LibJS: Implement update expressions0xtechnobabble
Note that currently only the non-prefixed variant is supported (i.e i++ not ++i), this variant returns the value of the argument before the update.
2020-03-12LibJS/Parser: Parse let declarations0xtechnobabble
2020-03-12LibJS: Tweak AssignmentOp namesAndreas Kling
2020-03-12LibJS: Fix some coding style mistakes in LexerAndreas Kling
2020-03-12Meta: Add for-loop JavaScript test programConrad Pankoff
2020-03-12LibJS: Implement for statementConrad Pankoff
2020-03-12LibJS: Parse === and !== binary operatorsConrad Pankoff
2020-03-12LibJS: Parse > and < binary operatorsConrad Pankoff
2020-03-12LibJS: Implement +=, -=, *=, and /= assignment operatorsConrad Pankoff
2020-03-12LibJS: Implement <= and >= binary operatorsConrad Pankoff
2020-03-12LibJS: Implement multiplication and division operatorsConrad Pankoff
2020-03-12LibJS: Add test for function with argumentshowar6hill
2020-03-12LibJS: Implement basic MemberExpression parsingAndreas Kling
At last we can parse "hello friends".length :^)
2020-03-12LibJS: Implement basic lexing + parsing of StringLiteralAndreas Kling
This still includes the double-quote characters (") but at least the AST comes out right.
2020-03-12HackStudio: Add header navigationOriko
2020-03-12LibGUI: Parse #include statements separatelyOriko
2020-03-12ACPI: Examine bit width in Generic address structure before assertingLiav A
Also, the switch-case flow is simplified for IO access within a Generic address strucuture's handling.
2020-03-12ACPI: Keep common flags in structures for later usageLiav A
2020-03-12Ext2FS: Reset the found_a_group flagmarprok
2020-03-12LibGUI: Track window visibility with a separate flag (#1424)Alex Muscar
See https://github.com/SerenityOS/serenity/pull/1410 for the motivation.
2020-03-12LibJS: Allow functions to take arguments (#1405)howar6hill
2020-03-12LibJS: Defer Value construction until a Literal is executedAndreas Kling
Remove the need to construct a full Value during parsing. This means we don't have to worry about plumbing the heap into the parser. The Literal ASTNode now has a bunch of subclasses that synthesize a Value on demand.
2020-03-12js: Take the script file as a command-line argumentAndreas Kling
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"
2020-03-12LibJS: Forgot to move add/sub/typed_eq to Value.cppAndreas Kling
2020-03-12LibJS: Add Javascript lexer and parserStephan Unverwerth
This adds a basic Javascript lexer and parser. It can parse the currently existing demo programs. More work needs to be done to turn it into a complete parser than can parse arbitrary JS Code. The lexer outputs tokens with preceeding whitespace and comments in the trivia member. This should allow us to generate the exact source code by concatenating the generated tokens. The parser is written in a way that it always returns a complete syntax tree. Error conditions are represented as nodes in the tree. This simplifies the code and allows it to be used as an early stage parser, e.g for parsing JS documents in an IDE while editing the source code.:
2020-03-12LibJS: Fix string roots not being collectedFlorian Stellbrink
Previously objects were the only heap allocated value. Now there are also strings. This replaces a usage of is_object with is_cell. Without this change strings could be garbage collected while still being used in an active scope.
2020-03-11Userland: Set the mask of a network adapter with ifconfig (#1388)Marios Prokopakis
A new IP address or a new network mask can be specified in the command line arguments of ifconfig to replace the old values of a given network adapter. Additionally, more information is being printed for each adapter.
2020-03-11LibGUI: Don't update windows that aren't visible (#1410)Alex Muscar
Because the ID of a hidden window is 0, the window server will fail to update them when the system theme is changed. This manifests when an application has multiple windows, some of which are hidden, and the system theme is changed (see https://github.com/SerenityOS/serenity/issues/1378). This PR changes the window code to ignore update messages if the window has the ID 0--is hidden. Ideally the window ID would not change, and visibility would be managed separately.
2020-03-11LibWeb: Skip non-font files when looking for fonts instead of assertingTibor Nagy
2020-03-11LibGfx: Do not assert on failed font file loadsTibor Nagy
Return a nullptr to signal an error instead.
2020-03-11LibGUI: Skip non-font files in the FontDatabase constructorTibor Nagy
2020-03-11LibGUI: Highlight various number literalsOriko
2020-03-11js: Oopsie, fix buildAndreas Kling