Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7e964bb

Browse files
forkidsyme
authored andcommitted
Use pattern matching instead of .Value (#2984)
1 parentbe5c6ae commit7e964bb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/fsharp/vs/ServiceStructure.fs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,12 @@ module Structure =
368368
| SynExpr.Paren(e,_,_,_)->
369369
yield! parseExpr e
370370
| SynExpr.Record(recCtor,recCopy,recordFields,r)->
371-
if recCtor.IsSomethen
372-
let(_,ctorArgs,_,_,_)= recCtor.Value
373-
yield! parseExpr ctorArgs
374-
if recCopy.IsSomethen
375-
let(e,_)= recCopy.Value
376-
yield! parseExpr e
371+
match recCtorwith
372+
| Some(_,ctorArgs,_,_,_)->yield! parseExpr ctorArgs
373+
|_->()
374+
match recCopywith
375+
| Some(e,_)->yield! parseExpr e
376+
|_->()
377377
yield! recordFields|>(Seq.choose(fun(_,e,_)-> e)>> Seq.collect parseExpr)
378378
// exclude the opening `{` and closing `}` of the record from collapsing
379379
yield! rcheck Scope.Record Collapse.Same r<| Range.modBoth11 r

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp