Permalink
Browse files

support braced variable variable interpolation in double quoted strings

Summary:
fixes #8223

The only fixes 'not permissive enough', not 'too permissive'

Reviewed By: oulgen, alexeyt

Differential Revision: D8543351

fbshipit-source-id: 9e6d9cf40dc4d394664c7a3564d38f0c7b32fd6f
  • Loading branch information...
fredemmott committed Jun 21, 2018
1 parent 251bab5 commit e539f3254db8bd2da0f27bb25593208b91b5e5f4
@@ -609,6 +609,7 @@ module WithStatementAndDeclAndTypeParser
let (_, token) = next_token_in_string parser1 literal_kind in
(* TODO: What about "{$$}" ? *)
match Token.kind token with
| Dollar
| Variable ->
(* Parse any expression followed by a close brace.
TODO: We do not actually support all possible expressions;
@@ -0,0 +1,5 @@
<?php
$foo = 'hello';
$bar = 'foo';
echo "{$$bar}\n";
echo $$bar."\n";
@@ -0,0 +1,2 @@
hello
hello

0 comments on commit e539f32

Please sign in to comment.