Age | Commit message (Collapse) | Author |
|
|
|
|
|
scope for arrow functions
|
|
functions
|
|
constructor
|
|
|
|
HackStudio uses a TreeView to display the list of current variables
while debugging, and when the program completes, it sets that view's
model to a null model. This would trip an assertion if the TreeView
had something selected at the time, so this patch lessens the
assertion into a simple null check.
Additionally, the cursor would look laggy when moving about the
editor because the code was waiting for a window repaint to update
the cursor's look when it makes more sense to update the cursor
when it actually moves. This change also requires the base
GUI::TextEditor to expose a getter to tell if its currently in a drag
selection.
Finally, requesting a context menu in the line ruler on the side of
the editor would also place/remove breakpoints, which was counter
intuitive, so this requires a left click to modify breakpoint placement.
|
|
|
|
The parser was chomping on commas present after the arrow function expression. eg. [x=>x,2] would parse as [x=>(x,2)] instead of [(x=>x),2].
This is not the case anymore. I've added a small test to prove this.
|
|
Previously, all Markdown blocks had a virtual parse method which has
been swapped out for a static parse method returning an OwnPtr of
that block's type.
The Text class also now has a static parse method that will return an
Optional<Text>.
|
|
Markdown documents are now obtained via the static Document::parse
method, which returns a RefPtr<Document>, or nullptr on failure.
|
|
|
|
Previously, if the cursor moved out of the visible area while text
was being inserted, the text editor would never scroll the cursor
back into view until the arrow keys were pressed to move the cursor.
This was caused by the TextEditor's reflow deferral system stopping
visual line recomputation until the end of text insertion, so now
when reflow deferral is completed, the TextEditor will make sure
the cursor is visible.
|
|
Previously, the TextEditor would crash when selecting a line with
no codepoints due to a null dereference, so this patch makes sure
there is actually any text to render before giving it to the painter.
|
|
|
|
|
|
The interpreter now considers a statement or block's label when
considering whether or not to break. All statements can be labelled.
|
|
|
|
All statements now have an optional label string that can be null.
|
|
|
|
As suggested in #2431's code review.
|
|
|
|
|
|
|
|
|
|
.. and make travis run it.
I renamed check-license-headers.sh to check-style.sh and expanded it so
that it now also checks for the presence of "#pragma once" in .h files.
It also checks the presence of a (single) blank line above and below the
"#pragma once" line.
I also added "#pragma once" to all the files that need it: even the ones
we are not check.
I also added/removed blank lines in order to make the script not fail.
I also ran clang-format on the files I modified.
|
|
This fixes the following from parsing incorrectly due to the comma
that occurs after the conditional:
let o = {
foo: true ? 1 : 2,
bar: 'baz',
};
|
|
This makes it possible to change flags of a mount after the fact, with the
caveats outlined in the man page.
|
|
We have a hierarchical filesystem, let's make use of it :^)
|
|
Now that the Shell uses Core::EventLoop, we can't afford to just crash if /tmp
is unwritable.
|
|
This adds support for MS_RDONLY, a mount flag that tells the kernel to disallow
any attempts to write to the newly mounted filesystem. As this flag is
per-mount, and different mounts of the same filesystems (such as in case of bind
mounts) can have different mutability settings, you have to go though a custody
to find out if the filesystem is mounted read-only, instead of just asking the
filesystem itself whether it's inherently read-only.
This also adds a lot of checks we were previously missing; and moves some of
them to happen after more specific checks (such as regular permission checks).
One outstanding hole in this system is sys$mprotect(PROT_WRITE), as there's no
way we can know if the original file description this region has been mounted
from had been opened through a readonly mount point. Currently, we always allow
such sys$mprotect() calls to succeed, which effectively allows anyone to
circumvent the effect of MS_RDONLY. We should solve this one way or another.
|
|
That's where the other similar definitions reside. Also, use bit shift
operations for MS_* values.
|
|
|
|
Some things are specced to "stop parsing", which basically just means
to stop fetching tokens and jump to "The end"
|
|
|
|
|
|
|
|
It's tedious to make character tokens manually all the time.
|
|
This widget doesn't just view HTML, it views a web page. :^)
|
|
|
|
This should only be done for the corresponding start tags.
|
|
|
|
Previously, the relational operators where casting any value to double
and comparing the results according to C++ semantics.
This patch makes the relational operators in JS behave according to the
standard specification.
Since we don't have BigInt yet, the implementation doesn't take it into
account.
Moved PreferredType from Object to Value. Value::to_primitive now
passes preferred_type to Object::to_primitive.
|
|
|
|
Adds the ability for a scope (either a function or the entire program)
to be in strict mode. Scopes default to non-strict mode.
There are two ways to determine the strict-ness of the JS engine:
1. In the parser, this can be accessed with the parser_state variable
m_is_strict_mode boolean. If true, the Parser is currently parsing in
strict mode. This is done so that the Parser can generate syntax
errors at parse time, which is required in some cases.
2. With Interpreter.is_strict_mode(). This allows strict mode checking
at runtime as opposed to compile time.
Additionally, in order to test this, a global isStrictMode() function
has been added to the JS ReplObject under the test-mode flag.
|
|
This patch adds an IndexedProperties object for storing indexed
properties within an Object. This accomplishes two goals: indexed
properties now have an associated descriptor, and objects now gracefully
handle sparse properties.
The IndexedProperties class is a wrapper around two other classes, one
for simple indexed properties storage, and one for general indexed
property storage. Simple indexed property storage is the common-case,
and is simply a vector of properties which all have attributes of
default_attributes (writable, enumerable, and configurable).
General indexed property storage is for a collection of indexed
properties where EITHER one or more properties have attributes other
than default_attributes OR there is a property with a large index (in
particular, large is '200' or higher).
Indexed properties are now treated relatively the same as storage within
the various Object methods. Additionally, there is a custom iterator
class for IndexedProperties which makes iteration easy. The iterator
skips empty values by default, but can be configured otherwise.
Likewise, it evaluates getters by default, but can be set not to.
|
|
|
|
|
|
also add missing "#pragma once" in StylePropertiesModel.h
|
|
This seems to have a higher chance of generating somewhat recognizable
content compared to inline layout. This problem will gradually go away
as we implement more display values.
|