Skip to content

Commit

Permalink
chore(es/parser): Typo (#6228)
Browse files Browse the repository at this point in the history
  • Loading branch information
punkeel committed Oct 21, 2022
1 parent 67c5af7 commit 61e63df
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 28 deletions.
@@ -1,54 +1,54 @@
//// [privateNameAndPropertySignature.ts]
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 2 | #foo: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 3 | #bar(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 7 | #foo: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 8 | #bar(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 12 | #foo: number;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 14 | #baz: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 15 | #taz(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 17 | #baz(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 20 | declare const y: [{ qux: { #quux: 3 } }];
//! : ^^^^^
Expand Down
@@ -1,54 +1,54 @@
//// [privateNameAndPropertySignature.ts]
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 2 | #foo: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 3 | #bar(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 7 | #foo: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 8 | #bar(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 12 | #foo: number;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 14 | #baz: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 15 | #taz(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 17 | #baz(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 20 | declare const y: [{ qux: { #quux: 3 } }];
//! : ^^^^^
Expand Down
4 changes: 2 additions & 2 deletions crates/swc_ecma_parser/src/error.rs
Expand Up @@ -280,7 +280,7 @@ impl SyntaxError {
pub fn msg(&self) -> Cow<'static, str> {
match self {
SyntaxError::PrivateNameInInterface => {
"private names are now allowed in interface".into()
"private names are not allowed in interface".into()
}
SyntaxError::TopLevelAwait => "top level await requires target to es2017 or higher \
and topLevelAwait:true for ecmascript"
Expand Down Expand Up @@ -512,7 +512,7 @@ impl SyntaxError {
SyntaxError::TS2703 => {
"The operand of a delete operator must be a property reference.".into()
}
SyntaxError::DeclNotAllowed => "Declaration is now allowed".into(),
SyntaxError::DeclNotAllowed => "Declaration is not allowed".into(),
SyntaxError::InvalidSuperCall => "Invalid `super()`".into(),
SyntaxError::InvalidSuper => "Invalid access to super".into(),
SyntaxError::InvalidSuperPrivateName => {
Expand Down
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/665ab370012f20cf.js:1:1]
1 | with(true) function a(){}
: ^^^^^^^^
Expand Down
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/6cd36f7e68bdfb7a.js:1:1]
1 | for(;;) function a(){}
: ^^^^^^^^
Expand Down
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/971cf622ebaef28e.js:1:1]
1 | with(true) class a {}
: ^^^^^
Expand Down
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/c7ad2478fd72bffe.js:1:1]
1 | for(a in b) function c(){}
: ^^^^^^^^
Expand Down
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/e808e347646c2670.js:1:1]
1 | for(a of b) function c(){}
: ^^^^^^^^
Expand Down
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/efcb54b62e8f0e06.js:1:1]
1 | while (1) function foo(){}
: ^^^^^^^^
Expand Down
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/f2db53245b89c72f.js:1:1]
1 | while(true) function a(){}
: ^^^^^^^^
Expand Down
@@ -1,5 +1,5 @@

x private names are now allowed in interface
x private names are not allowed in interface
,-[$DIR/tests/typescript-errors/issue-1211-1/input.ts:2:5]
2 | #bar()
: ^^^^
Expand Down

1 comment on commit 61e63df

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 61e63df Previous: 8b6b9c0 Ratio
es/full/bugs-1 344659 ns/iter (± 58655) 358893 ns/iter (± 27903) 0.96
es/full/minify/libraries/antd 1763024993 ns/iter (± 41243845) 1882436450 ns/iter (± 75932641) 0.94
es/full/minify/libraries/d3 395332176 ns/iter (± 30802578) 436504689 ns/iter (± 37519743) 0.91
es/full/minify/libraries/echarts 1513960726 ns/iter (± 27279797) 1644882972 ns/iter (± 59477808) 0.92
es/full/minify/libraries/jquery 96085146 ns/iter (± 4272598) 113828447 ns/iter (± 7612837) 0.84
es/full/minify/libraries/lodash 124221774 ns/iter (± 33430190) 138402919 ns/iter (± 7782604) 0.90
es/full/minify/libraries/moment 59098084 ns/iter (± 2512245) 63510766 ns/iter (± 5946527) 0.93
es/full/minify/libraries/react 19228140 ns/iter (± 308378) 21372978 ns/iter (± 1085880) 0.90
es/full/minify/libraries/terser 284935298 ns/iter (± 3849592) 345721715 ns/iter (± 96136079) 0.82
es/full/minify/libraries/three 557622115 ns/iter (± 32410860) 584865550 ns/iter (± 46065999) 0.95
es/full/minify/libraries/typescript 3325883354 ns/iter (± 58154515) 3608172677 ns/iter (± 1960266803) 0.92
es/full/minify/libraries/victory 781637165 ns/iter (± 23852358) 884160610 ns/iter (± 33334030) 0.88
es/full/minify/libraries/vue 147558217 ns/iter (± 17014846) 183323291 ns/iter (± 20542186) 0.80
es/full/codegen/es3 33338 ns/iter (± 929) 34053 ns/iter (± 2559) 0.98
es/full/codegen/es5 33347 ns/iter (± 1449) 34127 ns/iter (± 3573) 0.98
es/full/codegen/es2015 33163 ns/iter (± 1364) 34027 ns/iter (± 2975) 0.97
es/full/codegen/es2016 33040 ns/iter (± 1144) 33947 ns/iter (± 1660) 0.97
es/full/codegen/es2017 32539 ns/iter (± 661) 33980 ns/iter (± 2257) 0.96
es/full/codegen/es2018 32713 ns/iter (± 552) 33967 ns/iter (± 1550) 0.96
es/full/codegen/es2019 33198 ns/iter (± 905) 35294 ns/iter (± 5248) 0.94
es/full/codegen/es2020 32566 ns/iter (± 1031) 34233 ns/iter (± 2767) 0.95
es/full/all/es3 185450719 ns/iter (± 7122511) 230888591 ns/iter (± 19255944) 0.80
es/full/all/es5 176648556 ns/iter (± 9748255) 215946523 ns/iter (± 17620913) 0.82
es/full/all/es2015 141243913 ns/iter (± 3748977) 159275171 ns/iter (± 19241456) 0.89
es/full/all/es2016 140373835 ns/iter (± 8625788) 166115875 ns/iter (± 16063214) 0.85
es/full/all/es2017 143748915 ns/iter (± 10618450) 167798156 ns/iter (± 13333001) 0.86
es/full/all/es2018 141307936 ns/iter (± 10894477) 155669293 ns/iter (± 12885154) 0.91
es/full/all/es2019 139028697 ns/iter (± 3783130) 163461986 ns/iter (± 18344356) 0.85
es/full/all/es2020 134901726 ns/iter (± 8130817) 156196325 ns/iter (± 14845520) 0.86
es/full/parser 709739 ns/iter (± 32116) 744128 ns/iter (± 46464) 0.95
es/full/base/fixer 25580 ns/iter (± 675) 26867 ns/iter (± 1231) 0.95
es/full/base/resolver_and_hygiene 89450 ns/iter (± 3912) 93865 ns/iter (± 7440) 0.95
serialization of ast node 211 ns/iter (± 3) 215 ns/iter (± 20) 0.98
serialization of serde 216 ns/iter (± 4) 222 ns/iter (± 13) 0.97

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.