Skip to content

Commit 53f47b4

Browse files
committed
fix php worker bogus error on use keyword
1 parent 86ef553 commit 53f47b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/parser/lexer.js

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ PHP.Lexer = function( src, ini ) {
1616
openTag = (ini === undefined || (/^(on|true|1)$/i.test(ini.short_open_tag) ) ? /(\<\?php\s|\<\?|\<\%|\<script language\=('|")?php('|")?\>)/i : /(\<\?php\s|<\?=|\<script language\=('|")?php('|")?\>)/i),
1717
openTagStart = (ini === undefined || (/^(on|true|1)$/i.test(ini.short_open_tag)) ? /^(\<\?php\s|\<\?|\<\%|\<script language\=('|")?php('|")?\>)/i : /^(\<\?php\s|<\?=|\<script language\=('|")?php('|")?\>)/i),
1818
tokens = [
19+
{
20+
value: PHP.Constants.T_USE,
21+
re: /^use(?=\s)/i
22+
},
1923
{
2024
value: PHP.Constants.T_ABSTRACT,
2125
re: /^abstract(?=\s)/i

0 commit comments

Comments
 (0)