Skip to content

Commit 4f58488

Browse files
authored
fix: flexible heredoc/nowdoc syntax (#1269)
* feat: flexible heredoc/nowdoc syntax * fix parser commit ref * adapt variable name
1 parent b2a0766 commit 4f58488

4 files changed

Lines changed: 22 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"linguist-languages": "^7.5.1",
1515
"mem": "^6.0.1",
16-
"php-parser": "glayzzle/php-parser#8ddd319ff32fe56afc3fdb0bd82a65ad0943c747"
16+
"php-parser": "glayzzle/php-parser#42c28cdd8e8dbc3423d72d49bd86db8249e01fe5"
1717
},
1818
"devDependencies": {
1919
"@babel/preset-env": "^7.7.5",

tests/nowdoc/__snapshots__/jsfmt.spec.js.snap

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,12 @@ string
946946
EOD
947947
];
948948
949+
$php73FlexibleNowdoc = <<<'EOD'
950+
Example of string
951+
spanning multiple lines
952+
using nowdoc syntax.
953+
EOD;
954+
949955
=====================================output=====================================
950956
<?php
951957
@@ -1966,6 +1972,13 @@ string
19661972
EOD
19671973
];
19681974
1975+
$php73FlexibleNowdoc = <<<'EOD'
1976+
Example of string
1977+
spanning multiple lines
1978+
using nowdoc syntax.
1979+
1980+
EOD;
1981+
19691982
================================================================================
19701983
`;
19711984

tests/nowdoc/nowdoc.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,3 +937,9 @@ function generator()
937937
string
938938
EOD
939939
];
940+
941+
$php73FlexibleNowdoc = <<<'EOD'
942+
Example of string
943+
spanning multiple lines
944+
using nowdoc syntax.
945+
EOD;

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4046,9 +4046,9 @@ performance-now@^2.1.0:
40464046
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
40474047
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
40484048

4049-
php-parser@glayzzle/php-parser#8ddd319ff32fe56afc3fdb0bd82a65ad0943c747:
4049+
php-parser@glayzzle/php-parser#42c28cdd8e8dbc3423d72d49bd86db8249e01fe5:
40504050
version "3.0.0-prerelease.9"
4051-
resolved "https://codeload.github.com/glayzzle/php-parser/tar.gz/8ddd319ff32fe56afc3fdb0bd82a65ad0943c747"
4051+
resolved "https://codeload.github.com/glayzzle/php-parser/tar.gz/42c28cdd8e8dbc3423d72d49bd86db8249e01fe5"
40524052

40534053
pify@^2.0.0:
40544054
version "2.3.0"

0 commit comments

Comments
 (0)