Skip to content

Commit 30b53fb

Browse files
Gastovejuergenhoetzel
authored andcommitted
Turns out, you can also skip the parens
I've just learned it's also valid to have attributes like WebSharper's `[<EndPoint "/home">]` syntax. So -- a minor update to allow the optional space and parens.
1 parent e5bd7cb commit 30b53fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fsharp-mode-font.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ with initial value INITVALUE and optional DOCSTRING."
153153
"\\([A-Za-z_][A-Za-z0-9_']*\\)\\s-*:\\s-*\\([A-Za-z_][A-Za-z0-9_'<> \t]*\\)"))
154154

155155
(def-fsharp-compiled-var fsharp-attributes-regexp
156-
"\\(\\[<[A-Za-z0-9_]+(?\\)\\(\".*\"\\)?\\()?>\\]\\)"
156+
"\\(\\[<[A-Za-z0-9_]+[( ]?\\)\\(\".*\"\\)?\\()?>\\]\\)"
157157
"Match attributes like [<EntryPoint>]; separately groups contained strings in attributes like [<Attribute(\"property\")>]")
158158

159159
;; F# makes extensive use of operators, many of which have some kind of

0 commit comments

Comments
 (0)