summaryrefslogtreecommitdiff
path: root/tests/query/highlights/hack/xhp.hack
diff options
context:
space:
mode:
Diffstat (limited to 'tests/query/highlights/hack/xhp.hack')
-rw-r--r--tests/query/highlights/hack/xhp.hack10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/query/highlights/hack/xhp.hack b/tests/query/highlights/hack/xhp.hack
new file mode 100644
index 00000000..992296b9
--- /dev/null
+++ b/tests/query/highlights/hack/xhp.hack
@@ -0,0 +1,10 @@
+$user_name = 'Fred';
+echo "<tt>Hello <strong>$user_name</tt></strong>";
+
+// XHP: Typechecked, well-formed, and secure
+$user_name = 'Andrew';
+$xhp = <tt>Hello <strong>{$user_name}</strong></tt>;
+// ^ tag
+// ^ tag
+// ^ string
+echo await $xhp->toStringAsync();