Skip to content

Commit

Permalink
Fix for detecting C/C++ in function list (fixes notepad-plus-plus#457,
Browse files Browse the repository at this point in the history
…closes notepad-plus-plus#609)

 * Detect C functions: `void ** VoidStarStar ( )`
 * Detect C++ functions: `void ** VoidStarStar ( )`
 * Detect C++ functions: `int& RefReturnValue ()`
 * Detect C++ methods: `void ** Class::VoidStarStar ( )`
 * Detect C++ methods: `int& Class::RefReturnValue ()`
  • Loading branch information
chcg authored and milipili committed Aug 7, 2015
1 parent 927d731 commit b779f5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PowerEditor/src/functionList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ http://notepad-plus-plus.org/features/function-list.html

<parser id="c_function" displayName="C source" commentExpr="((/\*.*?\*)/|(//.*?$))">
<function
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w:]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|while|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w:]+([\s]+[\w]+)?([\s]+|(\*|\*\*)[\s]+|[\s]+(\*|\*\*)|[\s]+(\*|\*\*)[\s]+)([\w_]+[\s]*::)?(?!(if|while|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
displayMode="$functionName">
<functionName>
<nameExpr expr="(?!(if|while|for))[\w_~]+[\s]*\("/>
Expand Down Expand Up @@ -131,15 +131,15 @@ http://notepad-plus-plus.org/features/function-list.html
<nameExpr expr="[\w]+"/>
</className>
<function
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?([\w]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+))?([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{">
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?([\w]+([\s]+[\w]+)?([\s]+|(\*|\*\*|&amp;)[\s]+|[\s]+(\*|\*\*|&amp;)|[\s]+(\*|\*\*|&amp;)[\s]+))?([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{">
<functionName>
<funcNameExpr expr="(?!(if|while|for|switch))[\w_~]+[\s]*\("/>
<funcNameExpr expr="(?!(if|while|for|switch))[\w_~]+"/>
</functionName>
</function>
</classRange>
<function
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|while|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w]+([\s]+[\w]+)?([\s]+|(\*|\*\*|&amp;)[\s]+|[\s]+(\*|\*\*|&amp;)|[\s]+(\*|\*\*|&amp;)[\s]+)([\w_]+[\s]*::)?(?!(if|while|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
displayMode="$className->$functionName">
<functionName>
<nameExpr expr="(?!(if|while|for))[\w_]+[\s]*\("/>
Expand Down

0 comments on commit b779f5e

Please sign in to comment.