Skip to content

Commit

Permalink
Add support for F# open static class
Browse files Browse the repository at this point in the history
  • Loading branch information
MangelMaxime authored and alecthomas committed Oct 6, 2022
1 parent 396f572 commit 5559bcc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lexers/embedded/fsharp.xml
Expand Up @@ -133,7 +133,7 @@
<token type="LiteralString"/>
<push state="string"/>
</rule>
<rule pattern="\b(open|module)(\s+)([\w.]+)">
<rule pattern="\b(open type|open|module)(\s+)([\w.]+)">
<bygroups>
<token type="Keyword"/>
<token type="Text"/>
Expand Down
4 changes: 4 additions & 0 deletions lexers/testdata/fsharp/fsharp_open_static_class.actual
@@ -0,0 +1,4 @@
open type System.Math

module A =
open type System.Math
16 changes: 16 additions & 0 deletions lexers/testdata/fsharp/fsharp_open_static_class.expected
@@ -0,0 +1,16 @@
[
{"type":"Keyword","value":"open type"},
{"type":"Text","value":" "},
{"type":"NameNamespace","value":"System.Math"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"module"},
{"type":"Text","value":" "},
{"type":"NameNamespace","value":"A"},
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":"\n "},
{"type":"Keyword","value":"open type"},
{"type":"Text","value":" "},
{"type":"NameNamespace","value":"System.Math"},
{"type":"Text","value":"\n"}
]

0 comments on commit 5559bcc

Please sign in to comment.