File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -788,6 +788,7 @@ private Token readRegexp() {
788788 String validFlags = "gim" ;
789789 if (this .options .ecmaVersion () >= 6 ) validFlags = "gimuy" ;
790790 if (this .options .ecmaVersion () >= 9 ) validFlags = "gimsuy" ;
791+ if (this .options .ecmaVersion () >= 12 ) validFlags = "gimsuyv" ;
791792 if (!mods .matches ("^[" + validFlags + "]*$" ))
792793 this .raise (start , "Invalid regular expression flag" );
793794 if (mods .indexOf ('u' ) >= 0 ) {
Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ public static enum ECMAVersion {
4141 ECMA2017 (2017 , 8 ),
4242 ECMA2018 (2018 , 9 ),
4343 ECMA2019 (2019 , 10 ),
44- ECMA2020 (2020 , 11 );
44+ ECMA2020 (2020 , 11 ),
45+ ECMA2021 (2021 , 12 );
4546
4647 private final int version ;
4748 public final int legacyVersion ;
@@ -232,7 +233,7 @@ public Set<String> getPredefinedGlobals() {
232233 private VirtualSourceRoot virtualSourceRoot ;
233234
234235 public ExtractorConfig (boolean experimental ) {
235- this .ecmaVersion = experimental ? ECMAVersion .ECMA2020 : ECMAVersion .ECMA2019 ;
236+ this .ecmaVersion = experimental ? ECMAVersion .ECMA2021 : ECMAVersion .ECMA2019 ;
236237 this .platform = Platform .AUTO ;
237238 this .jsx = true ;
238239 this .sourceType = SourceType .AUTO ;
You can’t perform that action at this time.
0 commit comments