Skip to content

Commit

Permalink
Revert "Revert Fable.AST change."
Browse files Browse the repository at this point in the history
This reverts commit cc5e64d.
  • Loading branch information
nojaf committed Nov 29, 2023
1 parent eaa0044 commit d0f600e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Fable.AST/Common.fs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
namespace Fable.AST

open System

/// Each Position object consists of a line number (1-indexed) and a column number (0-indexed):
type Position =
{
Expand All @@ -24,7 +26,7 @@ type SourceLocation =
member this.DisplayName =
this.identifierName
|> Option.bind (fun name ->
match name.IndexOf(";file:") with
match name.IndexOf(";file:", StringComparison.Ordinal) with
| -1 -> Some name
| 0 -> None
| i -> name.Substring(0, i) |> Some
Expand All @@ -33,7 +35,7 @@ type SourceLocation =
member this.File =
this.identifierName
|> Option.bind (fun name ->
match name.IndexOf(";file:") with
match name.IndexOf(";file:", StringComparison.Ordinal) with
| -1 -> None
| i -> name.Substring(i + ";file:".Length) |> Some
)
Expand Down

0 comments on commit d0f600e

Please sign in to comment.