Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notepad++ does not recognice PHP functions in Function List #1919

Closed
AleWin32 opened this issue Jun 2, 2016 · 20 comments
Closed

Notepad++ does not recognice PHP functions in Function List #1919

AleWin32 opened this issue Jun 2, 2016 · 20 comments
Labels
language-support Issues or PRs related to programming languages (also e.g. in styles, themes)

Comments

@AleWin32
Copy link

AleWin32 commented Jun 2, 2016

Having a PHP file opened and selecting PHP language (Language menu, P, PHP), Notepad++ does not recognise the functions in Function List if they are like:

function getInfoTravel ($param1, &param2)
{
...
}

If we remove the space OR SPACES after the function name (getInfoTravel) it is recognised:

function getInfoTravel($param1, &param2)
{
...
}

Please, add to the regular expression that parse the PHP files the possibility to have one or more spaces after the function name.

@milipili milipili added language-support Issues or PRs related to programming languages (also e.g. in styles, themes) bug:low labels Jun 29, 2016
@xamount
Copy link

xamount commented Jul 12, 2016

A similar problem happens with PHP function marked as static. e.g

<?

static function alpha($arg)
{
        return true;

} 

?>

Nothing shows in the function list

@MAPJe71
Copy link
Contributor

MAPJe71 commented Jul 12, 2016

Try this parser:

<parser
    id         ="php_syntax" 
    displayName="PHP" 
    commentExpr="(?'MLC'(?s-m)/\*.*?\*/)|(?'SLC'(?m-s)(?:#|/{2}).*$)|(?'STRLIT'(?s-m)&quot;[^&quot;\\]*(?:\\.[^&quot;\\]*)*&quot;|&apos;[^&apos;\\]*(?:\\.[^&apos;\\]*)*&apos;)"
  >
  <function
      mainExpr="\s*(?-i:function)(?:\s+|[*&amp;]\s*|\s*[*&amp;]|\s*[*&amp;]\s*)(?:\b(?!(?-i:if|while|for|switch)\b))[A-Za-z_\x7f-\xff][\w\x7f-\xff]*\s*\([^{]*\{"
    >
    <functionName>
      <nameExpr expr="(?:\b(?!(?-i:if|while|for|switch)\b))[A-Za-z_\x7f-\xff][\w\x7f-\xff]*\s*\(" />
      <!-- comment out the following node to display the function with its parameters -->
      <nameExpr expr="[A-Za-z_\x7f-\xff][\w\x7f-\xff]*" />
    </functionName>
  </function>
</parser>

@MAPJe71
Copy link
Contributor

MAPJe71 commented Jul 17, 2016

@AleWin32 & @xamount
Did my changes to the PHP function parser give you the expected result?

@MAPJe71
Copy link
Contributor

MAPJe71 commented Oct 16, 2016

@AleWin32 & @xamount

Any kind of feedback would be appreciated.

@xamount
Copy link

xamount commented Oct 19, 2016

I pasted your parser in functionList.xml and reloaded Notepad++ version 7.1. It did not help unfortunately.

@MAPJe71
Copy link
Contributor

MAPJe71 commented Oct 19, 2016

@xamount
Nothing is shown in the FunctionList tree?
Maybe you edited the wrong functionList.xml file as there might be more than one on your system.
Check for ...

  1. %ProgramFiles%\Notepad++\functionList.xml;
  2. %ProgramFiles(x86)%\Notepad++\functionList.xml;
  3. %AppData%\Notepad++\functionList.xml

@xamount
Copy link

xamount commented Oct 19, 2016

I edited #2. Then I found another functionList.xml in %AppData%\Roaming\Notepad++\ and edited that as well. Still no luck.

@MAPJe71
Copy link
Contributor

MAPJe71 commented Oct 19, 2016

@xamount Could you provide an example file?

@xamount
Copy link

xamount commented Oct 19, 2016

It doesn't look like I can attach a .php file. But try one with the following content:

@MAPJe71
Copy link
Contributor

MAPJe71 commented Oct 19, 2016

capture-2016-10-20-01 00 09

@xamount
Copy link

xamount commented Oct 19, 2016





        <parser
            id         ="c_function"
            displayName="C source"
            commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
        >
            <function
                mainExpr="^[\t\x20]*((static|const|virtual)\s+)?[\w:]+(\s+\w+)?(\s+|(\*|\*\*)\s+|\s+(\*|\*\*)|\s+(\*|\*\*)\s+)(\w+\s*::)?(?!(if|while|for))\w+\s*\([^\)\(]*\)(\s*const\s*)?[\n\s]*\{"
            >
                <functionName>
                    <nameExpr expr="(?!(if|while|for))[\w~]+\s*\(" />
                    <nameExpr expr="(?!(if|while|for))[\w~]+" />
                </functionName>
            </function>
        </parser>

        <parser
            id         ="cpp_function"
            displayName="C++ Class"
            commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
        >
            <classRange
                mainExpr    ="^[\t\x20]*(class|struct)[\t\x20]+\w+\s*(final)?\s*(:\s*(public|protected|private)\s+\w+\s*)?\{"
                openSymbole ="\{"
                closeSymbole="\}"
            >
                <className>
                    <nameExpr expr="(class|struct)[\t\x20]+\w+" />
                    <nameExpr expr="[\t\x20]+\w+" />
                    <nameExpr expr="\w+" />
                </className>
                <function
                    mainExpr="^[\t\x20]*((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*)?(\s*(final|override|final\s*override|override\s*final)\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\x20]*((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]*\{"
            >
                <functionName>
                    <nameExpr expr="(?!(if|while|for))\w+\s*\(" />
                    <nameExpr expr="(?!(if|while|for))\w+" />
                </functionName>
                <className>
                    <nameExpr expr="\w+(?=\s*::)" />
                </className>
            </function>
        </parser>

        <parser
            id         ="cs_function"
            displayName="C# Class"
            commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
        >
            <classRange
                mainExpr    ="^[\t\x20]*((public|protected|private|internal)\s+)?(\w+\s*)?(class|struct|interface)[\t\x20]+[^\{]+\{"
                openSymbole ="\{"
                closeSymbole="\}"
            >
                <className>
                    <nameExpr expr="(class|struct|interface)[\t\x20]+\w+" />
                    <nameExpr expr="[\t\x20]+\w+" />
                    <nameExpr expr="\w+" />
                </className>
                <function
                    mainExpr="^[^\S\r\n]*(?&lt;modifier1&gt;(?:public|protected|internal|private)\s*)?(?&lt;modifier2&gt;(?:new|static|virtual|sealed|override|abstract|extern)\s*)?(partial\s*)?(?&lt;type&gt;(?!(return|if|else))\w+(?&lt;genericType&gt;&lt;[\w,\s&lt;&gt;]+&gt;)?\s+)(?&lt;name&gt;\w+(?&lt;genericNameType&gt;&lt;[\w,\s&lt;&gt;]+&gt;)?\s?)\((?&lt;params&gt;[\w\s,&lt;&gt;\[\]\:=\.]*)\)(?&lt;ctorChain&gt;\s*\:\s*(?:base|this)\s*\((?&lt;ctorParams&gt;[\w\s,&lt;&gt;\[\]\:=\.]*)\))?[\w\s&lt;&gt;\:,\(\)\[\]]*(?:\{|;)"
                >
                    <functionName>
                        <funcNameExpr expr="(\w+(&lt;[\w,\s&lt;&gt;]+&gt;)?\s?)\(" />
                        <funcNameExpr expr="(\w+(&lt;[\w,\s&lt;&gt;]+&gt;)?\s?)" />
                    </functionName>
                </function>
            </classRange>
        </parser>

        <parser
            id         ="java"
            displayName="Java"
            commentExpr="(?s:/\*.*?\*/)|(?m-s://.*$)"
        >
            <classRange
                mainExpr    ="^[\t\x20]*((public|protected|private|static|final|abstract|synchronized|@(\w)+)\s+)*(class|enum|interface|@interface)\s+\w+(&lt;\s*\w+(,\s*\w+)*\s*&gt;)?(\s+extends\s+\w+)?(\s+implements\s+\w+(,\s*\w+)*)?\s*\{"
                openSymbole ="\{"
                closeSymbole="\}"
            >
                <className>
                    <nameExpr expr="(class|enum|interface|@interface)\s+\w+(&lt;\s*\w+(,\s*\w+)*\s*&gt;)?" />
                    <nameExpr expr="\s+\w+(&lt;\s*\w+(,\s*\w+)*\s*&gt;)?" />
                    <nameExpr expr="\w+(&lt;\s*\w+(,\s*\w+)*\s*&gt;)?" />
                </className>
                <function
                    mainExpr="^[\t\x20]*((public|protected|private|static|final|abstract|synchronized|@(\w)+)\s+)*(\w*(\[\s*])*\s+)?(?!(if|while|for|switch|catch|synchronized)\b)\w+(\[\s*])*(&lt;\s*\w+(,\s*\w+)*\s*&gt;)?\s*\([^\)\(]*\)(\s+throws\s+\w+)?\s*\{"
                >
                    <functionName>
                        <funcNameExpr expr="(?!(if|while|for|switch|catch|synchronized)\b)\w+(\[\s*])*(&lt;\s*\w+(,\s*\w+)*\s*&gt;)?\s*\(" />
                        <funcNameExpr expr="(?!(if|while|for|switch|catch|synchronized)\b)\w+(\[\s*])*(&lt;\s*\w+(,\s*\w+)*\s*&gt;)?" />
                    </functionName>
                </function>
            </classRange>
        </parser>

        <parser
            id         ="xml_node"
            displayName="XML Node"
            commentExpr="&lt;!--([^-]|-(?!-&gt;))*--&gt;"
        >
            <!-- Only match nodes with at least one attribute -->
            <function
                mainExpr="&lt;[\w\?]+[\t\x20]+\w+[\t\x20]*=[\t\x20]*&quot;[^&quot;]+&quot;"
            >
                <functionName>
                    <nameExpr expr="[^&lt;]*" />
                </functionName>
            </function>
        </parser>

        <parser
            id         ="batch_label"
            displayName="BAT Label"
            commentExpr="(?m-s)(::.*?$)|(REM.*?$)"
        >
            <function
                mainExpr="^[\t\x20]*:\w+"
            >
                <functionName>
                    <nameExpr expr="[^\t\x20:]*" />
                </functionName>
            </function>
        </parser>

        <parser
            id         ="ini_section"
            displayName="INI Section"
            commentExpr="(?m-s:[#;].*?$)"
        >
            <function
                mainExpr="^[\t\x20]*[\[&quot;][\w.;\x20\(\)-]+[\]&quot;]"
            >
                <functionName>
                    <nameExpr expr="[^\[\]&quot;]*" />
                </functionName>
            </function>
        </parser>

        <parser
            id         ="perl_function"
            displayName="Perl"
        >
            <function
                mainExpr="^\s*(?&lt;!#)\s*sub\s+\w+\s*\(?[^\)\(]*?\)?[\n\s]*\{"
            >
                <functionName>
                    <nameExpr expr="(sub\s+)?\K\w+" />
                </functionName>
                <className>
                    <nameExpr expr="\w+(?=\s*::)" />
                </className>
            </function>
        </parser>

        <parser
            id         ="python_function"
            displayName="Python class"
            commentExpr="(?s:'''.*?''')|(?m-s:#.*?$)"
        >
            <classRange
                mainExpr    ="(?&lt;=^class\x20).*?(?=\n\S|\Z)"
            >
                <className>
                    <nameExpr expr="\w+(?=[\(|:])" />
                </className>
                <function
                    mainExpr="(?&lt;=def\x20).+?(?=:)"
                >
                    <functionName>
                        <funcNameExpr expr=".*" />
                    </functionName>
                </function>
            </classRange>
            <function
                mainExpr="(?&lt;=def\x20).+?(?=:)"
            >
                <functionName>
                    <nameExpr expr=".*" />
                </functionName>
            </function>
        </parser>

        <parser
            id         ="bash_function"
            displayName="Shell"
            commentExpr="(?m-s:#.*?$)"
        >
            <function
                mainExpr="^[\t\x20]*(function[\t\r\n\x20]*)?(\w)+[\t\r\n\x20]*(\([^\)]*\))?[\t\r\n\x20]*(\{)[^(\})\r\n\t\x20]*"
            >
                <functionName>
                    <nameExpr expr="[^{]*" />
                </functionName>
            </function>
        </parser>

        <parser
            id         ="nsis_syntax"
            displayName="NSIS Syntax"
            commentExpr="(?s:/\*.*?\*/)|(?m-s:[#;].*?$)"
        >
            <function
                mainExpr="^[\t\x20]*(!macro|Function|Section|SectionGroup)[\t\x20]+[^\r\n]*$"
            >
                <functionName>
                    <nameExpr expr="(?(?=[\t\x20]*!macro)[\t\x20]*!macro[\t\x20]+[^\s]+|[^\r\n]*)" />
                </functionName>
            </function>
        </parser>

        <parser
            id         ="ruby_function"
            displayName="Ruby"
        >
            <!-- within a class-->
            <classRange
                mainExpr    ="(?&lt;=^class\x20).*?(?=\n\S|\Z)"
            >
                <className>
                    <nameExpr expr="\w+" />
                </className>
                <function
                    mainExpr="^\s*def\s+\w+"
                >
                    <functionName>
                        <funcNameExpr expr="(?&lt;=def\s)\w+" />
                    </functionName>
                </function>
            </classRange>
            <!-- without class-->
            <function
                mainExpr="^\s*def\s+\w+"
            >
                <functionName>
                    <nameExpr expr="(?&lt;=def\s)\w+" />
                </functionName>
            </function>
        </parser>

        <parser
            id         ="javascript_function"
            displayName="Javascript"
            commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
        >
            <function
                mainExpr="((^|\s+|[;\}\.])([A-Za-z_]\w*\.)*[A-Za-z_]\w*\s*[=:]|^|[\s;\}]+)\s*function(\s+[A-Za-z_]?\w*\([^\)\(]*\)|\([^\)\(]*\))[\n\s]*\{"
            >
                <functionName>
                    <nameExpr expr="[A-Za-z_]\w*\s*[=:]|[A-Za-z_]?\w*\s*\(" />
                    <nameExpr expr="[A-Za-z_]?\w*" />
                </functionName>
                <className>
                    <nameExpr expr="([A-Za-z_]\w*\.)*[A-Za-z_]\w*\." />
                    <nameExpr expr="([A-Za-z_]\w*\.)*[A-Za-z_]\w*" />
                </className>
            </function>
        </parser>

    </parsers>
</functionList>

@xamount
Copy link

xamount commented Oct 19, 2016

There must be something going on with my functionList.xml or my environment then.

@MAPJe71
Copy link
Contributor

MAPJe71 commented Oct 19, 2016

LOL you didn't have to post you're complete functionList.xml. Just saying from which release it is would have been enough.

I have to admit I didn't generate the screen dump with an official released functionList.xml.
This is the (incomplete as class range not functional) one I used:

            <parser
                displayName="PHP"
                id         ="php_syntax"
                commentExpr="(?x)                                               # Utilize inline comments (see `RegEx - Pattern Modifiers`)
                                (?s:/\*.*?\*/)                                  # Multi Line Comment
                            |   (?m-s:(?:\#|/{2}).*$)                           # Single Line Comment 1 and 2
                            |   (?s:&quot;(?:[^&quot;\\]|\\.)*&quot;)           # String Literal - Double Quoted
                            |   (?s:&apos;(?:[^&apos;\\]|\\.)*&apos;)           # String Literal - Single Quoted
                            |   (?:                                             # Here Document
                                    &lt;{3}(?'HDID'[A-Za-z_\x7f-\xff][\w\x7f-\xff]*)[^\r\n]*\R
                                    (?s:.*?)
                                    \R\k'HDID'                                  # close with exactly the same identifier, in the first column
                                )
                            |   (?:                                             # Now Document
                                    &lt;{3}&apos;(?'NDID'[A-Za-z_\x7f-\xff][\w\x7f-\xff]*)&apos;[^\r\n]*\R
                                    (?s:.*?)
                                    \R\k'NDID'                                  # close with exactly the same identifier, in the first column
                                )
                            "
            >
                <classRange
                    mainExpr    ="(?x)                                          # Utilize inline comments (see `RegEx - Pattern Modifiers`)
                            ^
                            \s*
                            (?:(?-i:abstract|final)\s+)?
                            (?-i:class)
                            \h+
                            (?'VALID_ID'                                        # valid identifier, use as subroutine
                                \b(?!(?-i:
                                    a(?:bstract|nd|rray|s)|
                                    b(?:ool|reak)|
                                    c(?:a(?:llable|se|tch)|l(?:ass|one)|on(?:st|tinue))|
                                    d(?:e(?:clare|fault)|ie|o)|
                                    e(?:cho|lse(?:if)?|mpty|nd(?:declare|for(?:each)?|if|switch|while)|val|x(?:it|tends))|
                                    f(?:alse|loat|inal|or(?:each)?|unction)|
                                    g(?:lobal|oto)|
                                    i(?:f|mplements|n(?:clude(?:_once)?|st(?:anceof|eadof)|t(?:erface)?)|sset)|
                                    n(?:amespace|ew|u(?:ll|meric))|
                                    o(?:r|bject)|
                                    p(?:r(?:i?:(nt|vate)|otected)|ublic)|
                                    re(?:quire(?:_once)?|turn)|
                                    s(?:t(?:atic|ring)|witch)|
                                    t(?:hrow|r(?:ait|ue|y))|
                                    u(?:nset|se)|
                                    mixed|list|var|while|xor|
                                    __(?:halt_compiler|(?:CLASS|DIR|F(?:ILE|UNCTION)|LINE|METHOD|NAMESPACE|TRAIT)__)
                                )\b)                                            # keywords, not to be used as identifier
                                [A-Za-z_\x7f-\xff][\w\x7f-\xff]*                # valid character combination for identifiers
                            )
                            (
                                \s+
                                (?:
                                    extends
                                |
                                    implements
                                |
                                    extends
                                    \s+
                                    (?:
                                        \\                                      # continue-on-next-line indicator
                                    |
                                        (?&amp;VALID_ID)                        # call subroutine
                                    )+
                                    \s+
                                    implements
                                )
                                \s+
                                (?:
                                    ,
                                    \s*
                                |
                                    (?:
                                        \\                                      # continue-on-next-line indicator
                                    |
                                        (?&amp;VALID_ID)                        # call subroutine
                                    )
                                )+
                            )?
                            \s*\{                                               # start of class body
                        "
                    openSymbole ="\{"
                    closeSymbole="}"
                >
                    <className>
                        <nameExpr expr="(?:(?-i:abstract|final)\s+)?(?-i:class)\h+[A-Za-z_\x7f-\xff][\w\x7f-\xff]*" />
                        <nameExpr expr="\s+[A-Za-z_\x7f-\xff][\w\x7f-\xff]*\Z" />
                        <nameExpr expr="[A-Za-z_\x7f-\xff][\w\x7f-\xff]*\Z" />
                    </className>
                    <function
                        mainExpr="(?x)                                          # Utilize inline comments (see `RegEx - Pattern Modifiers`)
                                \s*
                                (?:
                                    (?-i:static|public|protected|private|final)*
                                    (
                                        \s+
                                        (?-i:static|public|protected|private|final)
                                    )+
                                    \s+
                                )?
                                (?-i:function\s+)
                                (?:
                                    (?'VALID_ID'                                # valid identifier, use as subroutine
                                        \b(?!(?-i:
                                            a(?:bstract|nd|rray|s)|
                                            b(?:ool|reak)|
                                            c(?:a(?:llable|se|tch)|l(?:ass|one)|on(?:st|tinue))|
                                            d(?:e(?:clare|fault)|ie|o)|
                                            e(?:cho|lse(?:if)?|mpty|nd(?:declare|for(?:each)?|if|switch|while)|val|x(?:it|tends))|
                                            f(?:alse|loat|inal|or(?:each)?|unction)|
                                            g(?:lobal|oto)|
                                            i(?:f|mplements|n(?:clude(?:_once)?|st(?:anceof|eadof)|t(?:erface)?)|sset)|
                                            n(?:amespace|ew|u(?:ll|meric))|
                                            o(?:r|bject)|
                                            p(?:r(?:i?:(nt|vate)|otected)|ublic)|
                                            re(?:quire(?:_once)?|turn)|
                                            s(?:t(?:atic|ring)|witch)|
                                            t(?:hrow|r(?:ait|ue|y))|
                                            u(?:nset|se)|
                                            mixed|list|var|while|xor|
                                            __(?:halt_compiler|(?:CLASS|DIR|F(?:ILE|UNCTION)|LINE|METHOD|NAMESPACE|TRAIT)__)
                                        )\b)                                    # keywords, not to be used as identifier
                                        [A-Za-z_\x7f-\xff][\w\x7f-\xff]*        # valid character combination for identifiers
                                    )
                                    (?:
                                        \s+
                                        (?&amp;VALID_ID)                        # call subroutine
                                    )?
                                    (?:\s+|\*\s+|\s+\*|\s+\*\s+)
                                )?
                                (?:
                                    (?&amp;VALID_ID)                            # call subroutine
                                    \s*
                                    :{2}
                                )?
                                (?&amp;VALID_ID)                                # call subroutine
                                \s*\(                                           # start of function arguments
                                [^{]*\{                                         # start of function body
                            "
                    >
                        <functionName>
                            <funcNameExpr expr="[A-Za-z_\x7f-\xff][\w\x7f-\xff]*\s*\([^{]*" />
                            <!-- comment out the following node to display the method with its parameters -->
                            <funcNameExpr expr="[A-Za-z_\x7f-\xff][\w\x7f-\xff]*" />
                        </functionName>
                    </function>
                </classRange>
                <function
                    mainExpr="(?x)                                              # Utilize inline comments (see `RegEx - Pattern Modifiers`)
                            \s*
                            (?-i:function)
                            (?:\s+|[*&amp;]\s*|\s*[*&amp;]|\s*[*&amp;]\s*)
                            (?'VALID_ID'                                        # valid identifier, use as subroutine
                                \b(?!(?-i:
                                    a(?:bstract|nd|rray|s)|
                                    b(?:ool|reak)|
                                    c(?:a(?:llable|se|tch)|l(?:ass|one)|on(?:st|tinue))|
                                    d(?:e(?:clare|fault)|ie|o)|
                                    e(?:cho|lse(?:if)?|mpty|nd(?:declare|for(?:each)?|if|switch|while)|val|x(?:it|tends))|
                                    f(?:alse|loat|inal|or(?:each)?|unction)|
                                    g(?:lobal|oto)|
                                    i(?:f|mplements|n(?:clude(?:_once)?|st(?:anceof|eadof)|t(?:erface)?)|sset)|
                                    n(?:amespace|ew|u(?:ll|meric))|
                                    o(?:r|bject)|
                                    p(?:r(?:i?:(nt|vate)|otected)|ublic)|
                                    re(?:quire(?:_once)?|turn)|
                                    s(?:t(?:atic|ring)|witch)|
                                    t(?:hrow|r(?:ait|ue|y))|
                                    u(?:nset|se)|
                                    mixed|list|var|while|xor|
                                    __(?:halt_compiler|(?:CLASS|DIR|F(?:ILE|UNCTION)|LINE|METHOD|NAMESPACE|TRAIT)__)
                                )\b)                                            # keywords, not to be used as identifier
                                [A-Za-z_\x7f-\xff][\w\x7f-\xff]*                # valid character combination for identifiers
                            )
                            \s*\(                                               # start of function arguments
                            [^{]*\{                                             # start of function body
                        "
                >
                    <functionName>
                        <nameExpr expr="[A-Za-z_\x7f-\xff][\w\x7f-\xff]*\s*\([^{]*" />
                        <!-- comment out the following node to display the function with its parameters -->
                        <nameExpr expr="[A-Za-z_\x7f-\xff][\w\x7f-\xff]*" />
                    </functionName>
                </function>
            </parser>

@vlakoff
Copy link
Contributor

vlakoff commented Nov 27, 2016

The screenshot above is incorrect, as the issue happens when there is a space between function name and opening parenthesis.

So, I could reproduce the issue. I tried before and after #2335, fails in both.

The issue happens only if the function is global, it doesn't happen if it is defined inside a class.

@MAPJe71
Copy link
Contributor

MAPJe71 commented Nov 28, 2016

My screenshot was about the second issue

A similar problem happens with PHP function marked as static.

#2335 didn't (or at least should not have) any impact on the functionality for the majority of the parsers.
An obvious mistake with the Python parser was fixed. So testing with before and after #2335 will have the same effect for the PHP parser, as you discovered.

@vlakoff
Copy link
Contributor

vlakoff commented Nov 28, 2016

Didn't notice there was a second issue.

Current code is correct though. "static function" is valid only for class methods, not global functions.

@donho donho removed the bug:low label Mar 18, 2017
@bauinformatiker
Copy link

Exchanging the code section <parse ... /parse> for PHP from @MAPJe71 into the file
functionList.xml
from the folder
C:\Users<user>\AppData\Roaming\notepad++
worked for me perfectly!

@donho donho closed this as completed in 60b4aa6 Aug 27, 2017
SinghRajenM added a commit to SinghRajenM/notepad-plus-plus that referenced this issue Jul 5, 2018
* Fix multi-line tab button stay pushed issue while swiching off.

Make sure previous tab does not keep focus when switching tabs.
TO REPRODUCE:
Step 1: Move a tab using drag and drop.
Step 2: Use a tab switching hotkey/feature which doesn't set TCM_SETCURFOCUS AND TCM_SETCURSEL

Fixes notepad-plus-plus#3545, closes notepad-plus-plus#3552

* Rename variables & clean up

* Fix a regression regarding b859303

* Fix the long time bug that non-exist folder to pass via command line is not opened without warning

* Fix command line argument parsing regression

Work with the arguments in a temporary array of pointers to the command
line before assigning them to paramVector as generic_string.

Follow up to afb3889. Since then the arguments were copied to
paramVector as generic_string too early, before the command line parsing
finished.

Closes notepad-plus-plus#3575

* Add function list export feature

"notepad++.exe -export=functionList -lcpp c:\funcListTests\whatever.cpp"
will open whatever.cpp as cpp file, then parse this file to write the
funcLst result on disk, then exit Notepad++.
The result will write into c:\funcListTests\whatever.cpp.result.

* Add "-quickPrint" command line argument

"-quickPrint" allows user to launch Notepad++ via command to print a
given document then quit Notepad++ immediately.
Usage:
notepad++.exe -quickPrint c:\funcListTests\EncodingMapper.cpp

* Fix export fuctionlist bug

* Fix a typo

* Corrected typo

happend -> happened

Closes notepad-plus-plus#3568

* Add "Fortran (fixed form)" in compact Language menu

In addition to "Fortran (free form)"

Fixes notepad-plus-plus#3566, closes notepad-plus-plus#3567

* Update czech.xml translation to 7.4.2

Closes notepad-plus-plus#3555

* Roll back from 2 find buttons to 1 find button

Due to 2 find buttons logic limit (lost replacing up capacity), the
direction option is added back, and 1 find button is restored (instead
of 2 find buttons).

* Update translation files

* New feature: Opens file in its default viewer

This feature has the same effect as double-clicking this file in Windows Explorer.

Closes notepad-plus-plus#3577, fixes notepad-plus-plus#3576

* Code improvement

Closes notepad-plus-plus#3582

* Corrected/updated Hindi localization

Colse notepad-plus-plus#3605

* Update Bulgarian translation

* Update Korean translation

* Update Russian translation

* Update german.xml to v7.5

Closes notepad-plus-plus#3618

* Notepad++ 7.5 release

* Fix some excluded language cannot be remembered bug

* Update Corsican translation for Notepad++ 7.5

Closes notepad-plus-plus#3630

* update japanese.xml to v7.5

Changed to follow: "Open in Default Viewer", changes in Find dialog
Closes notepad-plus-plus#3625

* Update croatian.xml

* Update localization files for v7.5 modification

* Shortcut Mapper improvements - add cathegory

Shorcut mapper - main panel : new colums that show the category of the shortcut
Shorcut mapper - plugin panel : new colums that show the plugin name that the shortcut belongs to
Shorcut mapper - scintilla panel : it shows every shortcuts configured for one command

Fixes notepad-plus-plus#3583, Closes notepad-plus-plus#3635

* Improve file extension movement between ListBox in Preferences dialog

Now mouse double click can be used to move File extension between ListBoxes.

Closes notepad-plus-plus#3595

* Make double click work for language menu disabling/enabling in preference dialog

Fixed issue and organized code

Fixes notepad-plus-plus#3589, closes notepad-plus-plus#3594

* Fix a localization regression

Closes notepad-plus-plus#3639

* Replace '\r' by real carriage return

Closes notepad-plus-plus#3280

* Fix restore back language menu item on the wrong position

* Add Visual Prolog language support

Closes notepad-plus-plus#1439

* Add a philosophy quote in easter eggs

* Update Bulgarian translation

Closes notepad-plus-plus#3649

* Update Ukrainian translation

Closes notepad-plus-plus#3647

* Update danish translation to 7.5

Closes notepad-plus-plus#3641

* Add batch auto-completion

A new resource for auto-completion in batch scripting environment

Closes notepad-plus-plus#3157

* Fix the bug that Notepad++ create %appdata%\local\notepad++\ folder even in doLocalConf mode

* Update chineseSimplified.xml

Closes notepad-plus-plus#3660

* 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 notepad-plus-plus#1919 and notepad-plus-plus#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 notepad-plus-plus#1919, fixes notepad-plus-plus#2604, fixes notepad-plus-plus#1667, fixes notepad-plus-plus#2962
closes notepad-plus-plus#2523, closes notepad-plus-plus#2621

* Notepad++ 7.5.1 release

* Fix un installer issue

While install a x64 version, it should remove x86 version if it exists (and vice versa).
The removal feature doesn't work though user answer Yes for the deletion.
This commit fixes this issue.

* Add 1 quote and delete some.

* Update spiritual quotes

* Export function list in json format

* Use VS2015 for appveyor instead of VS2013

* Switch to VS 2015

* Read plugin list as json format (in progress)

* Better disply of installer components page description

Colses notepad-plus-plus#3745

* Nitpicking - quotations

Britain should be capitalized, one of the quotations is duplicated.

Closes notepad-plus-plus#3743

* Fix certificate checking error message issue

1. Fixed issue (caption and message are interchanged)
2. Disabled lexerdll signature checking in debug mode

Closes notepad-plus-plus#3691, Fix notepad-plus-plus#3688

* Fixed typo in help text

EsterEggName should be EasterEggName

Closes notepad-plus-plus#3681

* Fix the issue that batch.xml is missing from installer

Closes notepad-plus-plus#3677, fixes notepad-plus-plus#3680

* new easter eggs quotes

* fix feedScintKeys when more than two shortcuts are configured

Closes notepad-plus-plus#3732, fixes notepad-plus-plus#3720

* Add version badge

Closes notepad-plus-plus#3725

* Adapt json format for Plugin admin

* switch from VS2013 to VS2015 & VS2017

* Update Arabic language file

* Enhance Plugin Admin UI

* correct appveyor.yml VS vcxproj after rename

add logger to see warnings/errors in the message tab

Closes notepad-plus-plus#3825

* Make mouse hook functions right

* Fix static analyzer message "Expression is always true"

V547 Expression '_isFloating == true' is always true. dockingcont.cpp 1080
V547 Expression 'itemSelected == 2' is always true. treeview.cpp 504
V560 A part of conditional expression is always true: 0xff. babygrid.cpp 711

* Fix static analyzer issue "An exception should be caught by reference"

V746 Object slicing. An exception should be caught by reference rather than by value. filedialog.cpp 183
V746 Object slicing. An exception should be caught by reference rather than by value. nppbigswitch.cpp 110
V746 Object slicing. An exception should be caught by reference rather than by value. pluginsmanager.cpp 259

* Fix static analyzer issue "The enumeration constant 'inactiveText' is used as a variable of a Boolean-type."

V768 The enumeration constant 'inactiveText' is used as a variable of a Boolean-type. wordstyledlg.cpp 438

* Fix static analyzer issue "A virtual function was overridden incorrectly"

V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'UserDefineDialog' and base class 'StaticDialog'. userdefinedialog.h 332
V762 It is possible a virtual function was overridden incorrectly. See first argument of function 'redraw' in derived class 'SplitterContainer' and base class 'Window'. splittercontainer.h 61
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'FindReplaceDlg' and base class 'StaticDialog'. findreplacedlg.h 245
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'GoToLineDlg' and base class 'StaticDialog'. gotolinedlg.h 45
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'FindCharsInRangeDlg' and base class 'StaticDialog'. findcharsinrange.h 52
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'ColumnEditorDlg' and base class 'StaticDialog'. columneditor.h 45
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'WordStyleDlg' and base class 'StaticDialog'. wordstyledlg.h 77
V762 It is possible a virtual function was overridden incorrectly. See first argument of function 'redraw' in derived class 'WordStyleDlg' and base class 'Window'. wordstyledlg.h 99
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'create' in derived class 'PluginsAdminDlg' and base class 'StaticDialog'. pluginsadmin.h 100

* Fix static analyzer message "The ternary operator always returns constant"

V583 The '?:' operator, regardless of its conditional expression, always returns one and the same value: 22. nppcommands.cpp 1696

* Fix compiling warning problem

* Add DSpellCheck plugin into distribution

* Added more C# keywords for auto-completion

Closes notepad-plus-plus#3899

* Update turkish.xml

Updated localization to latest changes.

Closes notepad-plus-plus#3890

* Update romanian.xml

Updated and corrected romanian to version 7.5

Closes notepad-plus-plus#3872

* Update Italian translation to version 7.5.1

Closes notepad-plus-plus#3778

* Update german.xml

Closes notepad-plus-plus#3715

* Update catalan.xml

Closes notepad-plus-plus#3762

* Update czech.xml translation to v7.5.1

Closes notepad-plus-plus#3701

* Update spanish.xml

Closes notepad-plus-plus#3814

* Fixed hang issue while opening JavaScript file

Fixes notepad-plus-plus#3770, closes notepad-plus-plus#3785

* Prevent from crash in TAB settings

* Remove unused/empty encoding from shortcut mapper

Closes notepad-plus-plus#3763

* Add version and other info into installer

Closes notepad-plus-plus#3751

* Add BaanC Sections in functionlist.xml

Based on
https://notepad-plus-plus.org/community/topic/14494/functionlist-classrange-question

Closes notepad-plus-plus#3842

* Upgrade wingup to fix the problem of connetion for updating

* Notepad++ 7.5.2 release

* Fix a crash issue in Plugin Admin

* Fix installer issues

1. Fix shell extension registration error (due to notepad++.exe has not
yet been copied)
2. Fix themes' absence after installation (one variable depends on
its initialization in mainSection)

* Fix DSpellCheck incomplete installation

* Notepad++ release 7.5.3

* Fix a crash bug due to eventual disordered notifications sent to plugins

The Access Violation while closing Notepad++:
notepad-plus-plus#3961
could be due to SCN_UPDATEUI sending after NPPN_SHUTDOWN, that makes
plugins treat SCN_UPDATEUI on the released handle.

To avoid such situation, once NPPN_SHUTDOWN has been sent, no more
message will be sent to plugin.

Fixes notepad-plus-plus#3961, fixes notepad-plus-plus#4021

* Fix 9f0ba44 typo

* Remove duplicate keywords for autocompletion

* Improve installer

* Fix broken indicies in EncodingMapper

Fixes notepad-plus-plus#3983
Fixes notepad-plus-plus#3991
Closes notepad-plus-plus#3992

* Hungarian translation update for 7.5.3

Closes notepad-plus-plus#3978

* Added keywords auto-completion for CoffeeScript

Closes notepad-plus-plus#3977

* Add Auto Completion for BaanC

Closes notepad-plus-plus#3927

* Fix spanish translation for "tail"

Command `tail` shouldn't be translated (there isn't a `cola` command)

Closes notepad-plus-plus#3920

* Fix typo in French translation

Closes notepad-plus-plus#3921

* Autompletion enhancement: remove unwanted symbols

Fixes notepad-plus-plus#3861
Closes notepad-plus-plus#3917

* Improve smart highlighting performance

Abort highlight search if the selection crosses a line boundry.

Closes notepad-plus-plus#3908

* Notepad++ release 7.5.4

* Fix highlighting of <script> tags in XML files

* Plugins Admin (in progress)

* Fix a typo

* Added .coffee extension to CoffeeScript

* Fix line ending changes are not detected in reloaded changed files issue

Fixes notepad-plus-plus#4033, closes notepad-plus-plus#4043

* Make UI Right To Left when Farsi & Uyghur are loaded

Closes notepad-plus-plus#4108

* Use reversed header image for RTL installer

Closes notepad-plus-plus#4107

* Code improvement

Closes notepad-plus-plus#4085

* Add commandline support for few more languages

Closes notepad-plus-plus#4084

* Update localization files (English & Hindi)

Fixes notepad-plus-plus#4040, closes notepad-plus-plus#4046

* Update japanese.xml to v7.5.4

* Replace '\r' by real carriage return
* Fix some translations for clear japanese

closes notepad-plus-plus#4043

* Fix menu items' state is not maintained due to save macro command

Fixes notepad-plus-plus#4112, fixes notepad-plus-plus#4114, closes notepad-plus-plus#4115

* Fix encoding not sync (on status bar) after reloading

Extracted parts of FileManager::reloadBuffer and FileManager::loadFile
to a separate function, so that both exhibit the same feature level of
EOL/encoding detection. reloadBuffer() used to have less logic than loadFile() and incorrectly handled UTF-8 detection when the file was ANSI

Fixes notepad-plus-plus#2637, fixes notepad-plus-plus#2843, closes notepad-plus-plus#4124

* Restore "Find Previous" & "Find Next" button in Find dialog

The pair of button "Find Previous" and "Find Next" have been removed in
the previous version due to some regressions. It's restored with being optional.

* Fix a crash by improving cutString() function

Remove an arbitrary MAX_PATH character limit

Fixes notepad-plus-plus#2727, closes notepad-plus-plus#4037

* Fix 2 different files whose canonic names are the same can't be opened
in the same time issue

Fix Unicode file name comparision to match Windows behaviour (as opposed to doing a linguistic filename comparision)

Fixes notepad-plus-plus#3820, closes notepad-plus-plus#4141

* Add forgotten translation entries

* Make more dialog strings translatable

* More translatable dialogs

* More translatable entries for Folder as Workspace

* Enhance Shortcut Mapper and make it translatable

* Shortcut Mapper is resizable and maximizable

* Add filter capacity in the shortcut mapper

Closes notepad-plus-plus#4096, closes notepad-plus-plus#2562

* Add more translations

Find dialog status bar messages are translatable.
Add more shortcut mapper translation entries.

* Add new language and update translations

* Simplify and fix memory leak in getSpecialFolderLocation

Fixes notepad-plus-plus#399, closes notepad-plus-plus#4138

* Warning/error fixes as per VS2017 code analysis

Closes notepad-plus-plus#4154

* Fix tab sticks to mouse pointer problem after external update of a file open in
Notepad++

Fixes notepad-plus-plus#4122, fixes notepad-plus-plus#3851, closes notepad-plus-plus#4182

* Update ukrainian.xml

Closes notepad-plus-plus#4198

* Update occitan.xml localisation to v.7.5.5

Closes notepad-plus-plus#4196

* Keep Doc Switcher's ordering in sync with Tab bar

Close notepad-plus-plus#946, close notepad-plus-plus#1684, close notepad-plus-plus#2342, close notepad-plus-plus#4015

* Enhance ShortcutMapper resizing

- keep centered buttons while resizing
- set minimum width and height

Close notepad-plus-plus#4178

* Update catalan.xml

Close notepad-plus-plus#4200

* Update czech.xml translation to v7.5.5

Close notepad-plus-plus#4199

* Update Turkish localization

Close notepad-plus-plus#4197

* Update german.xml to 7.5.5

Close notepad-plus-plus#4137

* Fix the wrong integer replacement (instead of string)

Fix also some minor grammatical errors

Close notepad-plus-plus#4203

* Update danish.xml to 7.5.5

Close notepad-plus-plus#4135

* Fixed the czech.xml v7.5.5

Fixed the wrong integer replacements (instead of string) according to the english.xml latest change.

Close notepad-plus-plus#4207

* Minor enhancements for Kurdish language

Make Kurdish be RTL
Command line support for Kurdish

Close notepad-plus-plus#4206

* Updated Hindi localization

1. Updated "Hindi.xml"
2. Corrected typos in English.xml (changed "NppIO.cpp" and "shortcut.rc" accordingly)
3. Synced "english_customizable.xml" with "English.xml"

Close notepad-plus-plus#4152

* Update Bulgarian translation

Close notepad-plus-plus#4143

* Make Unix style path (slashes) work in open file dialog (optional)

Close notepad-plus-plus#3948, fix notepad-plus-plus#2438, fix notepad-plus-plus#3840

* Change the label of one option to match Unix style path on open dialog

* Disable DSpellCheck by default due to some performance issues

* Make column names translatable in Window->Window...

Close notepad-plus-plus#4219

* Update translations

* Fix for "Monitoring" doesn't detect changes

Fix notepad-plus-plus#3142, close notepad-plus-plus#3882

* Add new keywords of javascript for auto-completion

Close notepad-plus-plus#4156

* update japanese.xml to v7.5.5

Close notepad-plus-plus#4139

* Update chineseSimplified.xml

Close notepad-plus-plus#4175

* Update german.xml to v7.5.5

Close notepad-plus-plus#4209

* Update romanian.xml for version 7.5.5

Close notepad-plus-plus#4210

* Update belarusian translation

Close notepad-plus-plus#4212

* Update Bulgarian translation

Close notepad-plus-plus#4218

* Fix for "Toggle Single Line Comment" malfunctioning with HTML/XML

Add space for a null character so last line character does not get cut off, and thus allow closing tag to be matched properly.

Fix notepad-plus-plus#3869, close notepad-plus-plus#3870

* Update chineseSimplified.xml

Close notepad-plus-plus#4223

* Change the EOL

* Fix a label display glitch in Preference

* Notepad++ release 7.5.5

* Fix EOLs

* Make new entries translatable

* Fix macro playing back crash issue

Fix crash issue while playing back macro if "find previous" and/or "find next"
button actions are/is recorded.

Also prevent from future crash if new commands in Find dialog are forgotten to be
treated.

* Remove the TODO to prevent from the useless modification

* Add ghost typing Unicode capacity

* Ghost typing enhancement

1. Make ghost typing Unicode supported so any language can be displayed.
2. Ghost typing's speed (slow, rapid and spped of light) can be set.
3. Any supported programming language (syntax highligting) can be applied.
4. All above supports are accessible via command line arguments.

* Add a message from outer space

* Update chineseSimplified.xml

* Update english.xml & chineseSimplified.xml

* Fix GDI objects leak problem

Fix notepad-plus-plus#1017, close notepad-plus-plus#3896

* Function List enhancement: Highlight the current function based on cursor position

Closes notepad-plus-plus#715, close notepad-plus-plus#4113

* Fix crash on styler dialog of User Defined Language dialog

Fixes notepad-plus-plus#2646, fixes notepad-plus-plus#4215, close notepad-plus-plus#4279

* Update german.xml to v7.5.5

Closes notepad-plus-plus#4256

* Update czech.xml for v7.5.5

Close notepad-plus-plus#4235

* Quotes clean up

* Change english.xml to match to GUI texts

Some texts of `english.xml` is not equivalent to GUI texts. This commit change `english.xml` to match GUI.

Close notepad-plus-plus#4297

* Add more funny quotes

* Update german localization

Close notepad-plus-plus#4310

* Hungarian translation update for 7.5.5

Close notepad-plus-plus#4308

* Update Ukrainian translation

Close notepad-plus-plus#4304

* Update Swedish localization

Close notepad-plus-plus#4296

* Update Dutch translation for 7.5.5

Close notepad-plus-plus#4292

* Update Corsican translation for Notepad++ 7.5.5

Close notepad-plus-plus#4290

* Update Turkish localization

Close notepad-plus-plus#4289

* Update Bulgarian localization

Close notepad-plus-plus#4260

* Update Hindi Localization

Close notepad-plus-plus#4244

* Fit access keys of the main manu to English behavior

Close notepad-plus-plus#4230

* Update french.xml

Close notepad-plus-plus#4263

* Update French localization

* Fix typos in translation entry string

* Fix file status detection issue under Windows XP (32-bit only)

Close notepad-plus-plus#4226

* Major improvements to C# intellisense

Close notepad-plus-plus#4142

* Notepad++ 7.5.6 release

* Rename label in functionlist output json

* Fix Javascript not working regression in Function list since 2016

due to 2 commits:
5d438aa
fb189fa

* Add unit tests for function list feature

go to notepad-plus-plus\PowerEditor\Test\FunctionList directory then
launch the following commands:
powershell ./unitTestLauncher.ps1

* Update Russian translation

* Update stylers.xml model

* Fix a typo in French translation

* Fixed UDL export extension issue

Fix notepad-plus-plus#4372, close notepad-plus-plus#4377

* Various fixes in french.xml

Close notepad-plus-plus#4319

* Updated Slovak language file for the latest Notepad++ version.

Close notepad-plus-plus#4341

* Fix typo to make translation work.

correct typo STRT_REPLACE -> STR_REPLACE

Fix notepad-plus-plus#4354, close notepad-plus-plus#4391

* Updated Hindi Translation

Close notepad-plus-plus#4376

* Update dutch.xml

Fix a few spelling mistakes, change mail address

Close notepad-plus-plus#4344

* Fixed a code in ReadDirectoryChangesPrivate.cpp

Close notepad-plus-plus#4257

* Update italian.xml to version 7.5.6

Various update on translation for italian
Close notepad-plus-plus#4355

* Make new file system of plugin works on installation directory

* Adapt new plugin file system structure for the future release.

* Update Indonesian.xml

Close notepad-plus-plus#4446

* Update Russian translation for 7.5.6

Close notepad-plus-plus#4441

* Small fix in german.xml

Close notepad-plus-plus#4316

* More improvements in C# intellisense

Close notepad-plus-plus#4419

* Fix Sort Lines as Integers issue: use Natural Sort algorithm

This changes the line operations "Sort as Integers Ascending" and "Sort as Integers Descending" to sort by Natural Sort Order, in which consecutive numerals are considered as one character. This causes "2" < "10", just like in the old Integer sort, but also "foo 2" < "foo 10", which was not previously available functionality. In cases where every line is a single integer, Natural Sort functions exactly the same as Integer Sort; when every line begins with a single integer, it is a valid Integer Sort.

Close notepad-plus-plus#4413, fix notepad-plus-plus#2025

* Remove unused method

* Remove Updater binaries

* Enhance Notepad++ installation packaging

Use GUP to retrieve GUP release from its website while doing Notepad++ release.

* Update turkish.xml

Close notepad-plus-plus#4478

* Fix toolbar display bug in big icon mode issue

Close notepad-plus-plus#4509

* Cleanup in context menu and Run entries

Close notepad-plus-plus#4519

* Installer enhancement: Place program shortcut in top-level Start folder

Fix notepad-plus-plus#2143, close notepad-plus-plus#4342

* Refactoring Plugin Admin codes

* Enhance installed list in Plugin Admin

* Restore the needed functions

* Add run process sync method & Plugin Admin's operations

Make Updater run sync for removing & restoring plugin info from & to the
plugin lists while the Plugin Admin's operation of installation, update and removal.

* Fix a bug where the document map highlights incorrectly when the view is scrolled past the end of the file.

Fix notepad-plus-plus#4579, close notepad-plus-plus#4580

* Fixed pointer truncations reported after removing /Wv:18

Close notepad-plus-plus#4544

* Fixed the macro deletion bug

Fix the issue that deleting a Macro doesn't remove it from the Run Macro multiple times dialog until restart

Fix notepad-plus-plus#4526, close notepad-plus-plus#4532

* Fix Open File Dialog error for a long path

Fix notepad-plus-plus#4345

* Clean up

* Update catalan.xml

Close notepad-plus-plus#4537

* Make carret line always visible on click from Finder panel

Close notepad-plus-plus#4518, fix notepad-plus-plus#4510

* Remove "from" which is not a reserved JavaScript keyword

Close notepad-plus-plus#4410

* Force cpp standard const char pointer on string literals

const-ified all string literals to suppress warnings on gcc and allow /Zc:strictStrings to be used with Visual Studio

Fix notepad-plus-plus#4146, close notepad-plus-plus#4150

* Migrate timestamps from time_t to FILETIME and store them in UTC universally

Fixes notepad-plus-plus#4491, notepad-plus-plus#3969, notepad-plus-plus#2535 and notepad-plus-plus#215.

* Deprecate wstat/stat in favour of WinAPI GetFileAttributesEx - unifies code and behaviour between Windows versions

Fixes notepad-plus-plus#4491, fixes notepad-plus-plus#3969, fixes notepad-plus-plus#2535, fixes notepad-plus-plus#215, close notepad-plus-plus#4541

* Use automatic variable with static size instead of dynamical allocation

* Use corret name for length variable

* Fix the compiling failure on x64 build

* Fix format specifier warnings - /Wv:18 can now be removed

As a follow up to my previous pull request, this PR fixes the last remaining improper format specifiers. This allows to remove /Wv:18 compilation flag completely, since (presumably) the only reason it was added in the first place were those format specifier warnings, introduced in VS2015.

Effectively, all this PR does is applying fixes suggested by the compiler (included in those warnings).

Close notepad-plus-plus#4604

* Fix hanging problem while shutingdown and backup file is absent

Fix notepad-plus-plus#4295, fix notepad-plus-plus#4276, close notepad-plus-plus#4611

* Notepad++ 7.5.7 release
@AleWin32
Copy link
Author

AleWin32 commented Jul 30, 2018

I don't know why @donho closes this, the bug still happens in last Notepad++ (7.5.8).

So, if you have this PHP code:

<?php

function func1 ($param)
{
	return 1;
}

function func2 ($param)
{
	return 2;
}
?>

Function list is empty! You must delete the space char between the function name and the parentheses to be able to list it:

<?php

function func1($param)
{
	return 1;
}

function func2($param)
{
	return 2;
}
?>

Please, reopen this issue.

@vlakoff
Copy link
Contributor

vlakoff commented Jul 30, 2018

This case is supposedly fixed, you are probably using an older functionList.xml file (location: C:\Users\[username]\AppData\Roaming\Notepad++\functionList.xml). If I recall correctly, Notepad++ doesn't replace it when updating the program. So, try manually replacing this file with the latest one.

@AleWin32
Copy link
Author

Thanks @vlakoff I replaced that file with the new one and is solved

kspalaiologos pushed a commit to kspalaiologos/notepad-plus-plus that referenced this issue Jan 17, 2021
Support interface and trait in PHP.
Support space between function name and opening parenthesis in PHP and JavaScript. Fixes at least notepad-plus-plus#1919 and notepad-plus-plus#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 notepad-plus-plus#1919, fixes notepad-plus-plus#2604, fixes notepad-plus-plus#1667, fixes notepad-plus-plus#2962
closes notepad-plus-plus#2523, closes notepad-plus-plus#2621
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language-support Issues or PRs related to programming languages (also e.g. in styles, themes)
Projects
None yet
Development

No branches or pull requests

7 participants