Skip to content

Commit 46d602e

Browse files
committed
Fix PHP 5.3 compatibility
1 parent d97455b commit 46d602e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/JsPhpize/JsPhpizeOptions.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public function __construct(array $options = array())
3535
new Pattern(30, 'string', '"(?:\\\\.|[^"\\\\])*"|\'(?:\\\\.|[^\'\\\\])*\''),
3636
new Pattern(40, 'number', '0[bB][01]+|0[oO][0-7]+|0[xX][0-9a-fA-F]+|(\d+(\.\d*)?|\.\d+)([eE]-?\d+)?'),
3737
new Pattern(50, 'lambda', '=>'),
38-
new Pattern(60, 'operator', ['delete', 'typeof', 'void'], true),
39-
new Pattern(70, 'operator', ['>>>=', '<<=', '>>=', '**=']),
40-
new Pattern(80, 'operator', ['++', '--', '&&', '||', '**', '>>>', '<<', '>>']),
41-
new Pattern(90, 'operator', ['===', '!==', '>=', '<=', '<>', '!=', '==', '>', '<']),
38+
new Pattern(60, 'operator', array('delete', 'typeof', 'void'), true),
39+
new Pattern(70, 'operator', array('>>>=', '<<=', '>>=', '**=')),
40+
new Pattern(80, 'operator', array('++', '--', '&&', '||', '**', '>>>', '<<', '>>')),
41+
new Pattern(90, 'operator', array('===', '!==', '>=', '<=', '<>', '!=', '==', '>', '<')),
4242
new Pattern(100, 'operator', '[\\|\\^&%\\/\\*\\+\\-]='),
4343
new Pattern(110, 'operator', '[\\[\\]\\{\\}\\(\\)\\:\\.\\/\\*~\\!\\^\\|&%\\?,;\\+\\-]'),
44-
new Pattern(120, 'keyword', ['as', 'async', 'await', 'break', 'case', 'catch', 'class', 'const', 'continue', 'debugger', 'default', 'do', 'else', 'enum', 'export', 'extends', 'finally', 'for', 'from', 'function', 'get', 'if', 'implements', 'import', 'in', 'instanceof', 'interface', 'let', 'new', 'of', 'package', 'private', 'protected', 'public', 'return', 'set', 'static', 'super', 'switch', 'throw', 'try', 'var', 'while', 'with', 'yield', 'yield*'], true),
44+
new Pattern(120, 'keyword', array('as', 'async', 'await', 'break', 'case', 'catch', 'class', 'const', 'continue', 'debugger', 'default', 'do', 'else', 'enum', 'export', 'extends', 'finally', 'for', 'from', 'function', 'get', 'if', 'implements', 'import', 'in', 'instanceof', 'interface', 'let', 'new', 'of', 'package', 'private', 'protected', 'public', 'return', 'set', 'static', 'super', 'switch', 'throw', 'try', 'var', 'while', 'with', 'yield', 'yield*'), true),
4545
new Pattern(130, 'constant', 'null|undefined|Infinity|NaN|true|false|Math\.[A-Z][A-Z0-9_]*|[A-Z][A-Z0-9\\\\_\\x7f-\\xff]*|[\\\\\\x7f-\\xff_][A-Z0-9\\\\_\\x7f-\\xff]*[A-Z][A-Z0-9\\\\_\\x7f-\\xff]*', true),
4646
new Pattern(130, 'variable', '[a-zA-Z\\\\\\x7f-\\xff\\$_][a-zA-Z0-9\\\\_\\x7f-\\xff\\$]*', '$'),
4747
new Pattern(140, 'operator', '[\\s\\S]'),

0 commit comments

Comments
 (0)