Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Same kind of issue as #1271.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
At last we can parse "hello friends".length :^)
|
|
This still includes the double-quote characters (") but at least the
AST comes out right.
|
|
|
|
|
|
Also, the switch-case flow is simplified for IO access within a Generic
address strucuture's handling.
|
|
|
|
|
|
See https://github.com/SerenityOS/serenity/pull/1410 for the motivation.
|
|
|
|
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.
|
|
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"
|
|
|
|
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.:
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
Return a nullptr to signal an error instead.
|
|
|
|
|
|
|
|
Previously, we were assuming all declared variables were bound to a
block scope, now, with the addition of declaration types, we can bind
a variable to a block scope using `let`, or a function scope (the scope
of the inner-most enclosing function of a `var` declaration) using
`var`.
|
|
The above snippet is a MemberExpression that necessitates the implicit
construction of a StringObject wrapper around a PrimitiveString.
We then do a property lookup (a "get") on the StringObject, where we
find the "length" property. This is pretty neat! :^)
|
|
This object will (soon) be implicitly created to wrap a primitive
string when one is used in a context that requires an object.
|
|
|
|
|
|
|
|
|
|
Change the date in the copyright.
|
|
|
|
|
|
|
|
There is a possibility that the same card gets added twice to
m_focused_cards when first mousedown_event fires and then
doubleclick_event, without the cards redrawing first. This would cause
mouseup_event to try to pop too many cards from the stack, causing an
assertion to fail.
When the system is laggy there is also a high possibility that
mousedown_event would fire twice without redrawing the cards first,
causing another assertion to fail. Addditional mousedown_events will
just be ignored now.
|