summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/snippets/php/variable_variable.txt45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/snippets/php/variable_variable.txt b/tests/snippets/php/variable_variable.txt
new file mode 100644
index 00000000..6ad748ca
--- /dev/null
+++ b/tests/snippets/php/variable_variable.txt
@@ -0,0 +1,45 @@
+---input---
+<?php
+${'whatever'} = '';
+${$whatever} = '';
+${${'whatever' . 'whatever'}} = '';
+
+---tokens---
+'<?php' Comment.Preproc
+'\n' Text
+
+'${' Name.Variable
+"'whatever'" Literal.String.Single
+'}' Name.Variable
+' ' Text
+'=' Operator
+' ' Text
+"''" Literal.String.Single
+';' Punctuation
+'\n' Text
+
+'${' Name.Variable
+'$whatever' Name.Variable
+'}' Name.Variable
+' ' Text
+'=' Operator
+' ' Text
+"''" Literal.String.Single
+';' Punctuation
+'\n' Text
+
+'${' Name.Variable
+'${' Name.Variable
+"'whatever'" Literal.String.Single
+' ' Text
+'.' Operator
+' ' Text
+"'whatever'" Literal.String.Single
+'}' Name.Variable
+'}' Name.Variable
+' ' Text
+'=' Operator
+' ' Text
+"''" Literal.String.Single
+';' Punctuation
+'\n' Text