Commit 282c20c6 authored by Jeffery To's avatar Jeffery To

php.lang: Add support for Unicode identifiers

Fixes #10.
parent c5fe3f91
......@@ -58,6 +58,8 @@
<definitions>
<define-regex id="identifier">[a-zA-Z_\x{80}-\x{10ffff}][a-zA-Z0-9_\x{80}-\x{10ffff}]*</define-regex>
<context id="bash-line-comment" style-ref="comment" end-at-line-end="true" extend-parent="false" class="comment" class-disabled="no-spell-check">
<start>#</start>
<include>
......@@ -89,7 +91,7 @@
</context>
<context id="variable" style-ref="variable">
<match>[$]+[a-zA-Z_][a-zA-Z0-9_]*</match>
<match>[$]+\%{identifier}</match>
</context>
<context id="array-operators" style-ref="variable">
......@@ -147,7 +149,7 @@
</context>
<context id="here-doc-string" style-ref="here-doc" extend-parent="true">
<start>(&lt;&lt;&lt;)\s?([a-zA-Z_][a-zA-Z0-9_]*)</start>
<start>(&lt;&lt;&lt;)\s?(\%{identifier})</start>
<end>^(\%{2@start});?$</end>
<include>
<context sub-pattern="0" where="start" style-ref="here-doc-bound"/>
......@@ -159,7 +161,7 @@
</context>
<context id="now-doc-string" style-ref="here-doc" extend-parent="true">
<start>(&lt;&lt;&lt;)\s?'([a-zA-Z_][a-zA-Z0-9_]*)'</start>
<start>(&lt;&lt;&lt;)\s?'(\%{identifier})'</start>
<end>^(\%{2@start});?$</end>
<include>
<context sub-pattern="0" where="start" style-ref="here-doc-bound"/>
......@@ -172,7 +174,7 @@
</context>
<context id="identifier" style-ref="identifier">
<match>[a-zA-Z_][a-zA-Z0-9_]*</match>
<match>\%{identifier}</match>
</context>
<context id="keywords" style-ref="keyword">
......
<?php
$i = 1;
$數 = 1;
$i數 = 1;
$str <<<extrémité
text
extrémité
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment