Commit d3450d85 authored by ChaiShushan's avatar ChaiShushan Committed by Brad Fitzpatrick

misc/notepadplus: fix functionList regex issue

The receiver name is optional. when Method's receiver name messing,
the functionList regex can't match the Method,
e.g. `func (*T) ProtoMessage() {}`.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12530044
parent 9f46efce
......@@ -7,7 +7,7 @@
<!-- <parsers> -->
<parser id="go" displayName="Go" commentExpr="((/\*.*?\*)/|(//.*?$))">
<function
mainExpr="(^func\s+\w+)|(^func\s*\(\s*\w+\s*\*?\s*\w+\s*\)\s*\w+)"
mainExpr="(^func\s+\w+)|(^func\s*\(\s*\w*\s*\*?\s*\w+\s*\)\s*\w+)"
displayMode="$className->$functionName">
<functionName>
<nameExpr expr="((func\s+\w+)|(\)\s*\w+))"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment