protected function yyn328($attributes) { foreach ($this->yyastk[$this->stackPos - (3 - 2)] as &$s) { if (is_string($s)) { $s = PHPParser_Node_Scalar_String::parseEscapeSequences($s, null); } } $s = preg_replace('~(\\r\\n|\\n|\\r)$~', '', $s); if ('' === $s) { array_pop($this->yyastk[$this->stackPos - (3 - 2)]); } $this->yyval = new PHPParser_Node_Scalar_Encapsed($this->yyastk[$this->stackPos - (3 - 2)], $attributes); }
/** * @dataProvider provideTestParseEscapeSequences */ public function testParseEscapeSequences($expected, $string, $quote) { $this->assertEquals($expected, PHPParser_Node_Scalar_String::parseEscapeSequences($string, $quote)); }