Firecharmlily / Summerplusplus

Summer++
Other
4 stars 0 forks source link

Function list in C++ does not detect functions with parameter comments containing parantheses (reopen of #4899) #5522 #2

Closed Firecharmlily closed 4 years ago

Firecharmlily commented 4 years ago

Description of the Issue

Function list in C++ does not detect functions with parameter comments containing parantheses

Steps to Reproduce the Issue

Add this code in a .cpp file. "Working" is detected by the function list but "NotWorking" is not, until you remove the ( in the comment. This style of documentation is common I think...

void Working(
int a // SomeText
)
{
}

void NotWorking(
int a // SomeText(
)
{
}

Expected Behavior

Both should display.

Actual Behavior

Some functions are not displayed.

Debug Information

V7.6.6 Win32

image

Firecharmlily commented 4 years ago

Have narrowed down the problem being related to the xml tree or parserfunction

Nandith-Narayan commented 4 years ago

Did you get the function list working? I'm trying to use the xml file from the notepad++ git

Firecharmlily commented 4 years ago

no but so far i know this link may help us understand it: https://stackoverflow.com/questions/48410830/extract-function-name-from-notepad-for-functionlist

Firecharmlily commented 4 years ago

Line 256 is where the problem possibly is.

<functionName>
                        <nameExpr expr="(?x)                                    # Utilize inline comments (see `RegEx - Pattern Modifiers`)
                                [A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*
                                \s*\(                                           # start of parameters
                                (?s:.*?)                                        # whatever, until...
                                \)                                              # end   of parameters
                            " />
                        <!-- comment out the following node to display the method with its parameters -->
<!--                        <nameExpr expr="[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*" /> -->
                    </functionName>
Firecharmlily commented 4 years ago

Has been fixed!!! :D