@@ -93,42 +93,50 @@ with initial value INITVALUE and optional DOCSTRING."
9393(def-fsharp-compiled-var fsharp-function-def-regexp
9494 (concat " \\ <\\ (?:let\\ |and\\ |with\\ )\\ s-+"
9595 fsharp-inline-rec-regexp-noncapturing " ?"
96+ fsharp-access-control-regexp-noncapturing " *"
9697 (format " \\ (%s \\ )" fsharp-valid-identifier-regexp)
9798 " \\ (?:\\ s-+[A-Za-z_]\\ |\\ s-*(\\ )" ; ; matches function arguments or open-paren; unclear why 0-9 not in class
9899 ))
99100
100101(def-fsharp-compiled-var fsharp-pattern-function-regexp
101102 (concat " \\ <\\ (?:let\\ |and\\ )\\ s-+"
102103 fsharp-inline-rec-regexp-noncapturing " ?"
104+ fsharp-access-control-regexp-noncapturing " *"
103105 (format " \\ (%s \\ )" fsharp-valid-identifier-regexp)
104106 " \\ s-*=\\ s-*function" )
105107 " Matches an implicit matcher, eg let foo m = function | \" cat\" -> etc." )
106108
107109; ; Note that this regexp is used for iMenu. To font-lock active patterns, we
108110; ; need to use an anchored match in fsharp-font-lock-keywords.
109111(def-fsharp-compiled-var fsharp-active-pattern-regexp
110- " \\ <\\ (?:let\\ |and\\ )\\ s-+\\ (?:\\ (?:inline\\ |rec\\ )\\ s-+\\ )?(\\ (|[A-Za-z0-9_'|]+|\\ ))\\ (?:\\ s-+[A-Za-z_]\\ |\\ s-*(\\ )" )
112+ (concat " \\ <\\ (?:let\\ |and\\ )\\ s-+"
113+ fsharp-inline-rec-regexp-noncapturing " ?"
114+ fsharp-access-control-regexp-noncapturing " *"
115+ " (\\ (|[A-Za-z0-9_'|]+|\\ ))\\ (?:\\ s-+[A-Za-z_]\\ |\\ s-*(\\ )" ))
111116
112117(def-fsharp-compiled-var fsharp-member-access-regexp
113118 " \\ <\\ (?:override\\ |member\\ |abstract\\ )\\ s-+"
114119 " Matches members declarations and modifiers on classes." )
115120
116121(def-fsharp-compiled-var fsharp-member-function-regexp
117122 (concat fsharp-member-access-regexp
118- " \\ (?:\\ (?:inline\\ |rec\\ )\\ s-+\\ )?\\ (?:"
119- fsharp-valid-identifier-regexp
120- " \\ .\\ )?\\ ("
121- fsharp-valid-identifier-regexp
122- " \\ )" )
123+ fsharp-inline-rec-regexp-noncapturing " ?"
124+ fsharp-access-control-regexp-noncapturing " *"
125+ " \\ (?:" fsharp-valid-identifier-regexp " \\ .\\ )?"
126+ " \\ (" fsharp-valid-identifier-regexp " \\ )" )
123127 " Captures the final identifier in a member function declaration." )
124128
125129(def-fsharp-compiled-var fsharp-overload-operator-regexp
126130 (concat fsharp-member-access-regexp
127- " \\ (?:\\ (?:inline\\ |rec\\ )\\ s-+\\ )?\\ (([!%&*+-./<=>?@^|~]+)\\ )" )
131+ fsharp-inline-rec-regexp-noncapturing " ?"
132+ fsharp-access-control-regexp-noncapturing " *"
133+ " \\ (([!%&*+-./<=>?@^|~]+)\\ )" )
128134 " Match operators when overloaded by a type/class." )
129135
130136(def-fsharp-compiled-var fsharp-constructor-regexp
131- " ^\\ s-*\\ <\\ (new\\ ) *(.*)[^=]*="
137+ (concat " ^\\ s-*"
138+ fsharp-access-control-regexp-noncapturing " *"
139+ " \\ <\\ (new\\ ) *(.*)[^=]*=" )
132140 " Matches the `new' keyword in a constructor" )
133141
134142(def-fsharp-compiled-var fsharp-type-def-regexp
0 commit comments