diff --git a/js/src/builtin/temporal/TemporalParser.cpp b/js/src/builtin/temporal/TemporalParser.cpp index a4e64aab7bc2..f88d6295ebbc 100644 --- a/js/src/builtin/temporal/TemporalParser.cpp +++ b/js/src/builtin/temporal/TemporalParser.cpp @@ -4385,18 +4385,12 @@ TZChar : / / -Alpha -/ -/ -. +TZLeadingChar / / - / / -_ -/ -/ [ + Legacy @@ -4694,41 +4688,65 @@ true } / / -AValChar +AnnotationValueComponent : / / Alpha +AnnotationValueComponent +? / / DecimalDigit +AnnotationValueComponent +? bool -aValChar +annotationValueComponent ( ) { -if +size_t +index += +reader_ +. +index ( -! +) +; +size_t +i += +0 +; +for +( +; +index ++ +i +< reader_ . -hasMore +length ( -1 ) +; +i ++ ++ ) { -return -false -; -} -CharT +auto ch = reader_ . -current +at ( +index ++ +i ) ; if @@ -4743,6 +4761,18 @@ ch ) ) { +break +; +} +} +if +( +i += += +0 +) +{ return false ; @@ -4751,7 +4781,7 @@ reader_ . advance ( -1 +i ) ; return @@ -5161,11 +5191,6 @@ timeZoneIANAName ( ) ; -bool -annotationValueComponent -( -) -; mozilla : : @@ -5637,31 +5662,15 @@ DateYear : / / -DateFourDigitYear -/ -/ -DateExtendedYear -/ -/ -DateFourDigitYear -: -/ -/ DecimalDigit { -1 4 } / / -DateExtendedYear -: -/ -/ Sign DecimalDigit { -1 6 } if @@ -6024,14 +6033,32 @@ TimeHour / / Hour +[ ++ +Padded +] / / / / Hour +[ +Padded +] : / / +[ +~ +Padded +] +DecimalDigit +/ +/ +[ +~ +Padded +] 0 DecimalDigit / @@ -7061,6 +7088,17 @@ TimeZoneIANAName / / TimeZoneUTCOffsetName +[ ++ +Extended +] +/ +/ +TimeZoneUTCOffsetName +[ +~ +Extended +] if ( ! @@ -7241,32 +7279,21 @@ Legacy ] / / -TimeZoneIANALegacyName -/ -/ -/ -/ -UnpaddedHour -: -/ -/ -DecimalDigit -/ -/ -1 -DecimalDigit -/ -/ -20 -/ -/ -21 -/ -/ -22 +TimeZoneIANANameTail +[ ++ +Legacy +] +but +only +if +IsLegacyIANATimeZoneName +of / / -23 +TimeZoneIANANameTail +is +true / / / @@ -7296,49 +7323,6 @@ TimeZoneIANANameTail ? Legacy ] -/ -/ -/ -/ -TimeZoneIANALegacyName -: -/ -/ -Etc -/ -GMT -ASCIISign -UnpaddedHour -/ -/ -Etc -/ -GMT0 -/ -/ -GMT0 -/ -/ -GMT -- -0 -/ -/ -GMT -+ -0 -/ -/ -EST5EDT -/ -/ -CST6CDT -/ -/ -MST7MDT -/ -/ -PST8PDT size_t start = @@ -7376,14 +7360,14 @@ but doesn ' t -match +pass the / / | -TimeZoneIANALegacyName +IsLegacyIANATimeZoneName | -production +test it ' ll @@ -8419,6 +8403,17 @@ TimeZoneIANAName / / TimeZoneUTCOffsetName +[ ++ +Extended +] +/ +/ +TimeZoneUTCOffsetName +[ +~ +Extended +] if ( hasTzLeadingChar @@ -11694,64 +11689,6 @@ template typename CharT > -bool -TemporalParser -< -CharT -> -: -: -annotationValueComponent -( -) -{ -/ -/ -AnnotationValueComponent -: -/ -/ -AValChar -AnnotationValueComponent -? -/ -/ -/ -/ -AValChar -: -/ -/ -Alpha -/ -/ -DecimalDigit -bool -hasOne -= -false -; -while -( -aValChar -( -) -) -{ -hasOne -= -true -; -} -return -hasOne -; -} -template -< -typename -CharT -> mozilla : : @@ -11777,19 +11714,10 @@ AnnotationKey / / AKeyLeadingChar -AnnotationKeyTail -? -/ -/ -/ -/ -AnnotationKeyTail -: / / +AnnotationKey AKeyChar -AnnotationKeyTail -? size_t start = @@ -11880,21 +11808,12 @@ AnnotationValue : / / -AnnotationValueTail -/ -/ -/ -/ -AnnotationValueTail -: -/ -/ AnnotationValueComponent / / AnnotationValueComponent - -AnnotationValueTail +AnnotationValue size_t start = @@ -13760,31 +13679,15 @@ DateYear : / / -DateFourDigitYear -/ -/ -DateExtendedYear -/ -/ -DateFourDigitYear -: -/ -/ DecimalDigit { -1 4 } / / -DateExtendedYear -: -/ -/ Sign DecimalDigit { -1 6 } if @@ -14029,22 +13932,18 @@ DateSpecMonthDay : / / -TwoDashes -? +- +- DateMonth - ? DateDay / / -/ -/ -TwoDashes -: -/ -/ -- +DateMonth - +? +DateDay PlainDate result =