diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 123cb83a..878d1170 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -77,6 +77,8 @@ A number of AST nodes have been renamed or moved in the AST hierarchy: * `Node\Scalar\LNumber` is now `Node\Scalar\Int_`. * `Node\Scalar\DNumber` is now `Node\Scalar\Float_`. + * `Node\Scalar\EncapsedStringPart` is now `Node\InterpolatedStringPart` and no longer extends + `Node\Scalar` or `Node\Expr`. * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`. * `Node\Stmt\StaticVar` is now `Node\StaticVar` and no longer extends `Node\Stmt`. diff --git a/grammar/php.y b/grammar/php.y index c9b66f5a..af75f826 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1127,7 +1127,7 @@ exit_expr: backticks_expr: /* empty */ { $$ = array(); } | T_ENCAPSED_AND_WHITESPACE - { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`')]); } + { $$ = array(Node\InterpolatedStringPart[Scalar\String_::parseEscapeSequences($1, '`')]); } | encaps_list { parseEncapsed($1, '`', true); $$ = $1; } ; @@ -1325,7 +1325,7 @@ encaps_list: ; encaps_string_part: - T_ENCAPSED_AND_WHITESPACE { $$ = Scalar\EncapsedStringPart[$1]; } + T_ENCAPSED_AND_WHITESPACE { $$ = Node\InterpolatedStringPart[$1]; } ; encaps_str_varname: diff --git a/grammar/phpyLang.php b/grammar/phpyLang.php index 4c4382e2..7a416396 100644 --- a/grammar/phpyLang.php +++ b/grammar/phpyLang.php @@ -106,7 +106,7 @@ function resolveMacros($code) { if ('parseEncapsed' === $name) { assertArgs(3, $args, $name); - return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) {' + return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\InterpolatedStringPart) {' . ' $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, ' . $args[1] . ', ' . $args[2] . '); } }'; } diff --git a/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/lib/PhpParser/Node/InterpolatedStringPart.php similarity index 68% rename from lib/PhpParser/Node/Scalar/EncapsedStringPart.php rename to lib/PhpParser/Node/InterpolatedStringPart.php index 46530b06..0d6f0abd 100644 --- a/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +++ b/lib/PhpParser/Node/InterpolatedStringPart.php @@ -1,15 +1,15 @@ attributes = $attributes; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 15f657cf..f881497f 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2707,10 +2707,10 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = array(); }, 505 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 506 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 507 => function ($stackPos) { $this->semValue = array(); @@ -2768,7 +2768,7 @@ class Php7 extends \PhpParser\ParserAbstract }, 524 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); }, 525 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); @@ -2982,7 +2982,7 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 594 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 595 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index b9ba3516..90370cc5 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2725,10 +2725,10 @@ class Php8 extends \PhpParser\ParserAbstract $this->semValue = array(); }, 505 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 506 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 507 => function ($stackPos) { $this->semValue = array(); @@ -2786,7 +2786,7 @@ class Php8 extends \PhpParser\ParserAbstract }, 524 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); }, 525 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); @@ -3000,7 +3000,7 @@ class Php8 extends \PhpParser\ParserAbstract $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 594 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 595 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index eeb06406..4b59f083 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -777,7 +777,7 @@ abstract class ParserAbstract implements Parser { return new String_($contents, $attributes); } else { assert(count($contents) > 0); - if (!$contents[0] instanceof Node\Scalar\EncapsedStringPart) { + if (!$contents[0] instanceof Node\InterpolatedStringPart) { // If there is no leading encapsed string part, pretend there is an empty one $this->stripIndentation( '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() @@ -786,7 +786,7 @@ abstract class ParserAbstract implements Parser { $newContents = []; foreach ($contents as $i => $part) { - if ($part instanceof Node\Scalar\EncapsedStringPart) { + if ($part instanceof Node\InterpolatedStringPart) { $isLast = $i === \count($contents) - 1; $part->value = $this->stripIndentation( $part->value, $indentLen, $indentChar, diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index f704d264..ae8c31bc 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -168,7 +168,7 @@ class Standard extends PrettyPrinterAbstract { $label = $node->getAttribute('docLabel'); if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { if (count($node->parts) === 1 - && $node->parts[0] instanceof Scalar\EncapsedStringPart + && $node->parts[0] instanceof Node\InterpolatedStringPart && $node->parts[0]->value === '' ) { return "<<<$label\n$label" . $this->docStringEndToken; @@ -238,10 +238,6 @@ class Standard extends PrettyPrinterAbstract { return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; } - protected function pScalar_EncapsedStringPart(Scalar\EncapsedStringPart $node) { - throw new \LogicException('Cannot directly print EncapsedStringPart'); - } - // Assignments protected function pExpr_Assign(Expr\Assign $node) { @@ -1001,7 +997,7 @@ class Standard extends PrettyPrinterAbstract { protected function pEncapsList(array $encapsList, $quote) { $return = ''; foreach ($encapsList as $element) { - if ($element instanceof Scalar\EncapsedStringPart) { + if ($element instanceof Node\InterpolatedStringPart) { $return .= $this->escapeString($element->value, $quote); } else { $return .= '{' . $this->p($element) . '}'; @@ -1064,7 +1060,7 @@ class Standard extends PrettyPrinterAbstract { foreach ($parts as $i => $part) { $atStart = $i === 0; $atEnd = $i === count($parts) - 1; - if ($part instanceof Scalar\EncapsedStringPart + if ($part instanceof Node\InterpolatedStringPart && $this->containsEndLabel($part->value, $label, $atStart, $atEnd) ) { return true; diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 97211550..60901fac 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -975,7 +975,7 @@ abstract class PrettyPrinterAbstract { } break; case self::FIXUP_ENCAPSED: - if (!$subNode instanceof Scalar\EncapsedStringPart + if (!$subNode instanceof Node\InterpolatedStringPart && !$this->origTokens->haveBraces($subStartPos, $subEndPos) ) { return '{' . $this->p($subNode) . '}'; diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 80b19831..0cf0c06f 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -6,7 +6,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Name; use PhpParser\Node\Scalar\Float_; use PhpParser\Node\Scalar\Encapsed; -use PhpParser\Node\Scalar\EncapsedStringPart; +use PhpParser\Node\InterpolatedStringPart; use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; @@ -115,17 +115,17 @@ class PrettyPrinterTest extends CodeTestAbstract { // Empty doc string variations (encapsed variant does not occur naturally) [new String_("", $nowdoc), "<<<'STR'\nSTR\n"], [new String_("", $heredoc), "<<prettyPrint($stmts); } - public function testPrettyPrintEncapsedStringPart() { - $this->expectException(\LogicException::class); - $this->expectExceptionMessage('Cannot directly print EncapsedStringPart'); - $expr = new Node\Scalar\EncapsedStringPart('foo'); - $prettyPrinter = new PrettyPrinter\Standard(); - $prettyPrinter->prettyPrintExpr($expr); - } - /** * @dataProvider provideTestFormatPreservingPrint * @covers \PhpParser\PrettyPrinter\Standard diff --git a/test/code/parser/expr/shellExec.test b/test/code/parser/expr/shellExec.test index 115d9f0a..ccb110e4 100644 --- a/test/code/parser/expr/shellExec.test +++ b/test/code/parser/expr/shellExec.test @@ -17,7 +17,7 @@ array( 1: Stmt_Expression( expr: Expr_ShellExec( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: test ) ) @@ -26,7 +26,7 @@ array( 2: Stmt_Expression( expr: Expr_ShellExec( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: test ) 1: Expr_Variable( @@ -38,7 +38,7 @@ array( 3: Stmt_Expression( expr: Expr_ShellExec( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: test ` ) ) @@ -47,7 +47,7 @@ array( 4: Stmt_Expression( expr: Expr_ShellExec( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: test \" ) ) diff --git a/test/code/parser/expr/uvs/misc.test b/test/code/parser/expr/uvs/misc.test index bcb4f2d8..bc22061e 100644 --- a/test/code/parser/expr/uvs/misc.test +++ b/test/code/parser/expr/uvs/misc.test @@ -25,7 +25,7 @@ array( expr: Expr_ArrayDimFetch( var: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: foo ) 1: Expr_Variable( @@ -42,7 +42,7 @@ array( expr: Expr_MethodCall( var: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: foo ) 1: Expr_Variable( diff --git a/test/code/parser/scalar/docString.test b/test/code/parser/scalar/docString.test index 2775be75..2b95e82d 100644 --- a/test/code/parser/scalar/docString.test +++ b/test/code/parser/scalar/docString.test @@ -66,7 +66,7 @@ array( 4: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: Test ) 1: Expr_Variable( @@ -84,13 +84,13 @@ array( 5: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: Test ) 1: Expr_Variable( name: a ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: and ) 3: Expr_PropertyFetch( @@ -101,7 +101,7 @@ array( name: c ) ) - 4: Scalar_EncapsedStringPart( + 4: InterpolatedStringPart( value: test ) ) diff --git a/test/code/parser/scalar/docStringNewlines.test b/test/code/parser/scalar/docStringNewlines.test index 9eae2338..db65de8a 100644 --- a/test/code/parser/scalar/docStringNewlines.test +++ b/test/code/parser/scalar/docStringNewlines.test @@ -37,7 +37,7 @@ array( 0: Expr_Variable( name: var ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: ) @@ -67,11 +67,11 @@ array( 0: Expr_Variable( name: var ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: ) ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/scalar/encapsedString.test b/test/code/parser/scalar/encapsedString.test index 31f0f4b7..28c55bbe 100644 --- a/test/code/parser/scalar/encapsedString.test +++ b/test/code/parser/scalar/encapsedString.test @@ -223,13 +223,13 @@ array( 15: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: \{ ) 1: Expr_Variable( name: A ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: } ) ) @@ -238,13 +238,13 @@ array( 16: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: \{ ) 1: Expr_Variable( name: A ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: } ) ) @@ -253,7 +253,7 @@ array( 17: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: \ ) 1: Expr_Variable( @@ -265,13 +265,13 @@ array( 18: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: \{ ) 1: Expr_Variable( name: A ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: } ) ) @@ -285,7 +285,7 @@ array( name: A ) ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: [B] ) ) @@ -294,7 +294,7 @@ array( 20: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: $ ) 1: Expr_ArrayDimFetch( @@ -311,13 +311,13 @@ array( 21: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: A ) 1: Expr_Variable( name: B ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: C ) ) diff --git a/test/code/parser/scalar/flexibleDocString.test b/test/code/parser/scalar/flexibleDocString.test index 251308d3..100d0f41 100644 --- a/test/code/parser/scalar/flexibleDocString.test +++ b/test/code/parser/scalar/flexibleDocString.test @@ -166,7 +166,7 @@ array( 5: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: a b @@ -174,7 +174,7 @@ array( 1: Expr_Variable( name: test ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: d e @@ -200,7 +200,7 @@ array( 7: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: a @@{ "\t" }@@a @@ -212,7 +212,7 @@ array( 1: Expr_Variable( name: test ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: d @@ -229,7 +229,7 @@ array( 0: Expr_Variable( name: one ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) ) @@ -241,7 +241,7 @@ array( 0: Expr_Variable( name: two ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) ) @@ -253,7 +253,7 @@ array( 0: Expr_Variable( name: three ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) ) @@ -265,7 +265,7 @@ array( 0: Expr_Variable( name: four ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) 2: Expr_Variable( @@ -280,13 +280,13 @@ array( 0: Expr_Variable( name: five ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) 2: Expr_Variable( name: five ) - 3: Scalar_EncapsedStringPart( + 3: InterpolatedStringPart( value: - ) ) @@ -298,13 +298,13 @@ array( 0: Expr_Variable( name: six ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) 2: Expr_Variable( name: six ) - 3: Scalar_EncapsedStringPart( + 3: InterpolatedStringPart( value: - ) 4: Expr_Variable( @@ -319,7 +319,7 @@ array( 0: Expr_Variable( name: seven ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) @@ -332,7 +332,7 @@ array( 0: Expr_Variable( name: eight ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) diff --git a/test/code/parser/scalar/flexibleDocStringErrors.test b/test/code/parser/scalar/flexibleDocStringErrors.test index 25b7484b..01ec36f9 100644 --- a/test/code/parser/scalar/flexibleDocStringErrors.test +++ b/test/code/parser/scalar/flexibleDocStringErrors.test @@ -80,7 +80,7 @@ array( 5: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: Foo ) @@ -103,7 +103,7 @@ array( exprs: array( 0: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: a ) @@ -114,4 +114,4 @@ array( ) ) ) -) \ No newline at end of file +)