Skip to content

Commit 7516847

Browse files
fix(dep): remove support for comments in class contant decl
This is a feature regression, but it's needed to workaround a defect in php-parser introduced in v3.2.2. I feel like this is an acceptable regression that we can un-regress once the pending fix is merged and released in php-parser. Ref: glayzzle/php-parser#1152
1 parent 3c60f72 commit 7516847

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

tests/comments/__snapshots__/jsfmt.spec.mjs.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,6 @@ $var = new class {
10211021
const
10221022
// Comment 1
10231023
CONSTANT
1024-
// Comment 2
10251024
=
10261025
// Comment 3
10271026
'string';
@@ -1033,7 +1032,6 @@ $var = new class {
10331032
const
10341033
// Comment 2
10351034
CONSTANT
1036-
// Comment 3
10371035
=
10381036
// Comment 4
10391037
'string';
@@ -1058,7 +1056,6 @@ $var = new class {
10581056
$var = new class {
10591057
// Comment 1
10601058
const CONSTANT =
1061-
// Comment 2
10621059
// Comment 3
10631060
"string";
10641061
};
@@ -1067,7 +1064,6 @@ $var = new class {
10671064
// Comment 1
10681065
// Comment 2
10691066
public const CONSTANT =
1070-
// Comment 3
10711067
// Comment 4
10721068
"string";
10731069
};

tests/comments/classconstant.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
const
1818
// Comment 1
1919
CONSTANT
20-
// Comment 2
2120
=
2221
// Comment 3
2322
'string';
@@ -29,7 +28,6 @@
2928
const
3029
// Comment 2
3130
CONSTANT
32-
// Comment 3
3331
=
3432
// Comment 4
3533
'string';

0 commit comments

Comments
 (0)