From 60b4aa6b75c60b436d1f3a539cd75956fbb98b3e Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sun, 27 Nov 2016 10:14:18 +0100 Subject: [PATCH] Enhance Function List for PHP and JavaScript Support interface and trait in PHP. Support space between function name and opening parenthesis in PHP and JavaScript. Fixes at least #1919 and #2604. About the JavaScript regex: Current: function(\s+[A-Za-z_]?\w*\([^\)\(]*\)|\([^\)\(]*\)) There are 2 parts, for named and anonymous functions. Note there is some duplication, let's simplify it: function(\s+[A-Za-z_]?\w*)?\([^\)\(]*\) The first character of function name is not optional (of course when the function is named), let's fix it: function(\s+[A-Za-z_]\w*)?\([^\)\(]*\) Finally let's support the possible spaces before opening parenthesis, for both named and anonymous functions: function(\s+[A-Za-z_]\w*)?\s*\([^\)\(]*\) Fixes #1919, fixes #2604, fixes #1667, fixes #2962 closes #2523, closes #2621 --- PowerEditor/src/functionList.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PowerEditor/src/functionList.xml b/PowerEditor/src/functionList.xml index 6ce3a447c..65d71c56d 100644 --- a/PowerEditor/src/functionList.xml +++ b/PowerEditor/src/functionList.xml @@ -112,12 +112,12 @@ commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)" > - + @@ -132,7 +132,7 @@ @@ -1167,15 +1167,15 @@ commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)" > - - + + - - + +