Timothy Flynn
26f9666191
LibJS: Do not override hour, minute, and second format field lengths
...
This was an oversight in e42d954743
.
These fields should always follow the locale preference in the CLDR.
Overriding these fields would permit formats like "h:mm:ss" to result in
strings like "1:2:3" instead of "1:02:03".
2021-12-08 11:29:36 +00:00
Timothy Flynn
9f7c727720
LibJS+LibUnicode: Generate missing patterns with fractionalSecondDigits
...
TR-35's Matching Skeleton algorithm dictates how user requests including
fractional second digits should be handled when the CLDR format pattern
does not include that field. When the format pattern contains {second},
but does not contain {fractionalSecondDigits}, generate a second pattern
which appends "{decimal}{fractionalSecondDigits}" to the {second} field.
2021-12-08 11:29:36 +00:00
Timothy Flynn
20b6ffef4f
LibJS: Add tests for calendar fields of DateTimeFormat's resolvedOptions
...
These are (mostly) testable now that LibUnicode parses format patterns.
2021-12-06 15:46:34 +01:00
Timothy Flynn
bf79c73158
LibUnicode: Do not generate data for "generic" calendars
...
This is not a calendar supported by ECMA-402, so let's not waste space
with its data.
Further, don't generate "gregorian" as a valid Unicode locale extension
keyword. It's an invalid type identifier, thus cannot be used in locales
such as "en-u-ca-gregorian".
2021-12-01 16:36:26 +00:00
Linus Groh
5ca242ce30
LibJS/Tests: Fix typo in a test description
2021-11-30 20:42:04 +00:00
davidot
5010d4c20c
LibJS: Don't match async \n function as an async function declaration
2021-11-30 17:05:32 +00:00
davidot
c2ebaa9d87
LibJS: Replace the verify in private identifier with a syntax error
...
Since sometimes expressions are parsed without checking we can hit this
expression without it being followed by an 'in'.
2021-11-30 17:05:32 +00:00
davidot
4d7e79fb72
LibJS: Stop parsing an expression on comma after a yield
2021-11-30 17:05:32 +00:00
davidot
156dfe3d62
LibJS: Disallow member expression in binding pattern as parameters
2021-11-30 17:05:32 +00:00
davidot
51e23cd043
LibJS: Disallow shorthand properties with reserved names
2021-11-30 17:05:32 +00:00
davidot
e491fc0e81
LibJS: Allow defining class fields with "keyword" names
2021-11-30 17:05:32 +00:00
davidot
cbbfcd35e7
LibJS: Disallow await keywords in static init blocks
...
In static init blocks 'await' cannot be used. Note that this does not
cover all the cases since the parser currently cannot distinguish
between expressions within parenthesis and direct expressions.
2021-11-30 17:05:32 +00:00
davidot
7624c3de0e
LibJS: Disallow '\8' and '\9' in strict mode due to being octal escapes
2021-11-30 17:05:32 +00:00
davidot
c57721cf83
LibJS: Allow escaped 'async' as identifier
...
Since 'async' is only special if it occurs before a function it can be
used as escaped identifier in all cases.
2021-11-30 17:05:32 +00:00
davidot
e751dcea43
LibJS: Treat private identifier as divisible token
...
And also make sure private identifiers are correctly checked when
synthesizing a binding pattern.
2021-11-30 17:05:32 +00:00
davidot
afde1821b5
LibJS: Disallow numerical separators in octal numbers and after '.'
2021-11-30 17:05:32 +00:00
davidot
32016d3924
LibJS: Allow object properties called 'async'
2021-11-30 17:05:32 +00:00
davidot
450dedabd1
LibJS: Add messages to the toEval and toEvalTo tests
...
This makes it a lot easier to understand what is going wrong when an
eval test fails. As an example instead of just getting:
`ExpectationError`
You would now get:
`ExpectationError: Expected _1_2E+0_1_ to eval to _12_ but got _120_`.
2021-11-30 17:05:32 +00:00
Luke Wilde
2cea4ad508
LibJS: Implement Temporal.Duration.prototype.subtract
2021-11-29 22:56:35 +00:00
Luke Wilde
ac8c3919cb
LibJS: Implement Temporal.Duration.prototype.add
2021-11-29 22:56:35 +00:00
Luke Wilde
acf8729a81
LibJS: Implement Temporal.Duration.prototype.round
2021-11-29 22:56:35 +00:00
Timothy Flynn
4a08fd2be2
LibJS: Implement Intl.DateTimeFormat.prototype.resolvedOptions
2021-11-29 22:48:46 +00:00
Timothy Flynn
d0e1997e07
LibJS: Implement Intl.DateTimeFormat.supportedLocalesOf
2021-11-29 22:48:46 +00:00
Timothy Flynn
16151aa7d5
LibJS+LibUnicode: Implement the Intl.DateTimeFormat constructor
2021-11-29 22:48:46 +00:00
Timothy Flynn
75b2a09a2f
LibJS: Implement a nearly empty Intl.DateTimeFormat object
...
This adds plumbing for the Intl.DateTimeFormat object, constructor, and
prototype.
Note that unlike other Intl objects, the Intl.DateTimeFormat object has
a LibUnicode structure as a base. This is to prevent wild amounts of
code duplication between LibUnicode, Intl.DateTimeFormat, and other
not-yet-defined Intl structures, because there's 12 fields shared
between them.
2021-11-29 22:48:46 +00:00
davidot
e69276e704
LibJS: Implement parsing and executing for-await-of loops
2021-11-29 15:20:07 +00:00
Linus Groh
f7ba81ac52
LibJS: Implement parsing of TemporalDurationString
2021-11-28 10:32:28 +00:00
Linus Groh
8f99c05f97
LibJS: Implement Temporal.PlainYearMonth.prototype.since()
2021-11-27 19:11:31 +00:00
Linus Groh
bdd2c357fd
LibJS: Implement Temporal.PlainYearMonth.prototype.until()
2021-11-27 19:11:31 +00:00
Linus Groh
6f2e0b3355
LibJS: Implement Temporal.PlainYearMonth.prototype.subtract()
2021-11-27 17:48:04 +00:00
Linus Groh
acbcd64cdc
LibJS: Implement Temporal.PlainYearMonth.prototype.add()
2021-11-27 17:48:04 +00:00
Idan Horowitz
957f54d96f
LibJS: Throw InternalErrors instead of Errors on CallStackSizeExceeded
...
These seem more appropriate.
2021-11-27 01:58:05 +02:00
Linus Groh
de69f5dbf4
LibJS: Implement Temporal.ZonedDateTime.prototype.since()
2021-11-24 17:53:00 +00:00
Linus Groh
7a2eeae8c6
LibJS: Implement Temporal.ZonedDateTime.prototype.until()
2021-11-24 17:53:00 +00:00
Linus Groh
78724fdd33
LibJS: Don't accept UTC designators in strings for plain Temporal types
...
This is a normative change in the Temporal spec.
See: cd2dc7d
2021-11-24 08:56:03 +00:00
Linus Groh
836ce8ee5d
LibJS: Fix parse ErrorType used in parse_temporal_date_string()
...
TemporalInvalidDateString, not TemporalInvalidDateTimeString.
2021-11-24 08:38:50 +00:00
davidot
0982a73d1d
LibJS: Parse async generator functions
2021-11-21 21:46:39 +00:00
davidot
de46a2cff1
LibJS: Parse async arrow functions
2021-11-21 21:46:39 +00:00
Linus Groh
0619c34703
LibJS: Implement Temporal.PlainDateTime.prototype.since()
2021-11-21 20:04:19 +00:00
Linus Groh
803eddbb62
LibJS: Implement Temporal.PlainDateTime.prototype.until()
2021-11-21 20:04:19 +00:00
Linus Groh
aed444253c
LibJS: Implement Temporal.PlainTime.prototype.since()
2021-11-21 20:04:19 +00:00
Linus Groh
2ac1774fd3
LibJS: Implement Temporal.PlainTime.prototype.until()
2021-11-21 20:04:19 +00:00
Linus Groh
783222f87a
LibJS: Implement parsing of TemporalInstantString
2021-11-20 23:10:09 +00:00
Linus Groh
79a18b058f
LibJS: Implement parsing of TemporalCalendarString
2021-11-20 23:10:09 +00:00
Linus Groh
1583c7257c
LibJS: Implement parsing of TemporalRelativeToString
2021-11-20 23:10:09 +00:00
Linus Groh
98b876ad3f
LibJS: Implement parsing of TemporalZonedDateTimeString
2021-11-20 23:10:09 +00:00
Linus Groh
3b1de431cc
LibJS: Implement parsing of TemporalYearMonthString
2021-11-20 23:10:09 +00:00
Linus Groh
3ddab2f4fe
LibJS: Implement parsing of TemporalMonthDayString
2021-11-20 23:10:09 +00:00
Linus Groh
453c78215c
LibJS: Implement parsing of TemporalTimeString
2021-11-20 23:10:09 +00:00
Linus Groh
b42b7d5f16
LibJS: Implement parsing of TemporalDateTimeString
2021-11-20 23:10:09 +00:00