Skip to content

Commit

Permalink
Process API changes up to 43.7.400-preview.23319.6
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Jun 20, 2023
1 parent 95eba33 commit 9a41ef0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/FsAutoComplete.Core/InlayHints.fs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ and private defaultTraversePat visitor origPath pat =
| SynPat.As(p1, p2, _)
| SynPat.Or(p1, p2, _, _) -> [ p1; p2 ] |> List.tryPick (traversePat visitor path)
| SynPat.Ands(ps, _)
| SynPat.Tuple(_, ps, _)
| SynPat.Tuple(elementPats = ps)
| SynPat.ArrayOrList(_, ps, _) -> ps |> List.tryPick (traversePat visitor path)
| SynPat.Attrib(p, _, _) -> traversePat visitor path p
| SynPat.LongIdent(argPats = args) ->
Expand Down
2 changes: 1 addition & 1 deletion src/FsAutoComplete.Core/Lexer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module Lexer =
|> Seq.choose (fun s -> if s.StartsWith "--define:" then Some s.[9..] else None)
|> Seq.toList

let sourceTokenizer = FSharpSourceTokenizer(defines, Some "/tmp.fsx")
let sourceTokenizer = FSharpSourceTokenizer(defines, Some "/tmp.fsx", None)
let lineTokenizer = sourceTokenizer.CreateLineTokenizer lineStr

let rec loop lexState acc =
Expand Down
2 changes: 1 addition & 1 deletion src/FsAutoComplete.Core/UnionPatternMatchCaseGenerator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ let getWrittenCases (patMatchExpr: PatternMatchExpr) =
| SynPat.ListCons _
| SynPat.FromParseError(_, _) -> false

| SynPat.Tuple(_, innerPatList, _) -> List.forall checkPattern innerPatList
| SynPat.Tuple(elementPats = innerPatList) -> List.forall checkPattern innerPatList

| SynPat.Record(recordInnerPatList, _) ->
recordInnerPatList
Expand Down
11 changes: 3 additions & 8 deletions src/FsAutoComplete.Core/UntypedAstUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ let (|AllAttrs|) (attrs: SynAttributes) =
let (|AllSimplePats|) (pats: SynSimplePats) =
let rec loop acc pat =
match pat with
| SynSimplePats.SimplePats(pats, _) -> acc @ pats
| SynSimplePats.Typed(pats, _, _) -> loop acc pats
| SynSimplePats.SimplePats(pats = pats) -> acc @ pats

loop [] pats

Expand Down Expand Up @@ -122,7 +121,7 @@ let internal getRangesAtPosition input (r: Position) : Range list =

and walkPat =
function
| SynPat.Tuple(_, pats, r)
| SynPat.Tuple(elementPats = pats; range = r)
| SynPat.ArrayOrList(_, pats, r)
| SynPat.Ands(pats, r) ->
addIfInside r
Expand Down Expand Up @@ -253,13 +252,9 @@ let internal getRangesAtPosition input (r: Position) : Range list =

and walkSimplePats =
function
| SynSimplePats.SimplePats(pats, r) ->
| SynSimplePats.SimplePats(pats = pats; range = r) ->
addIfInside r
List.iter walkSimplePat pats
| SynSimplePats.Typed(pats, ty, r) ->
addIfInside r
walkSimplePats pats
walkType ty

and walkInterpolatedStringPart =
function
Expand Down
1 change: 0 additions & 1 deletion src/FsAutoComplete/CodeFixes/AddExplicitTypeAnnotation.fs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ let private isPositionContainedInUntypedImplicitCtorParameter input pos =
| _ -> None

return! tryGetUntypedIdent pat
| _ -> return! None
}
|> Option.orElseWith (fun _ -> defaultTraverse decl)
| _ -> defaultTraverse decl }
Expand Down

0 comments on commit 9a41ef0

Please sign in to comment.