Stabel

Check-in [d64aee902c]
Login
Overview
Comment:Remove dead function in Data/SourceLocation. Use explicit exports in Parser/SourceLocation.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d64aee902c6cf269134c5f5fdaddf239182e8c9d46ca58f9657efd4a14381629
User & Date: robin.hansen on 2021-08-05 18:02:40
Other Links: manifest | tags
Context
2021-08-06
09:39
Fixed known bugs in PackageLoader. check-in: c1e42b8f60 user: robin.hansen tags: trunk
2021-08-05
18:02
Remove dead function in Data/SourceLocation. Use explicit exports in Parser/SourceLocation. check-in: d64aee902c user: robin.hansen tags: trunk
17:56
Work around known bug in elm/parser which caused line numbers to be inaccurate in the presense of li... check-in: 8e6b3144ac user: robin.hansen tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Modified src/Stabel/Data/SourceLocation.elm from [35654d2784] to [ac65c7584a].

1
2
3
4
5
6
7
8
9
10
11
12
13
..
18
19
20
21
22
23
24
25

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module Stabel.Data.SourceLocation exposing
    ( SourceLocation
    , SourceLocationRange
    , emptyRange
    , extractFromString
    , toString
    )


type alias SourceLocationRange =
    { source : String
    , start : SourceLocation
    , end : SourceLocation
................................................................................
    { row : Int
    , col : Int
    }


emptyRange : SourceLocationRange
emptyRange =
    SourceLocationRange ""

        (SourceLocation 0 0)
        (SourceLocation 0 0)


toString : SourceLocation -> String
toString location =
    String.fromInt location.row ++ ":" ++ String.fromInt location.col


extractFromString : String -> SourceLocation -> SourceLocation -> String
extractFromString sourceCode startLoc endLoc =
    let
        numPadding =
            endLoc.row
                |> String.fromInt





<







 







|
>



<
<
<
<
<







1
2
3
4
5

6
7
8
9
10
11
12
..
17
18
19
20
21
22
23
24
25
26
27
28





29
30
31
32
33
34
35
module Stabel.Data.SourceLocation exposing
    ( SourceLocation
    , SourceLocationRange
    , emptyRange
    , extractFromString

    )


type alias SourceLocationRange =
    { source : String
    , start : SourceLocation
    , end : SourceLocation
................................................................................
    { row : Int
    , col : Int
    }


emptyRange : SourceLocationRange
emptyRange =
    SourceLocationRange
        ""
        (SourceLocation 0 0)
        (SourceLocation 0 0)







extractFromString : String -> SourceLocation -> SourceLocation -> String
extractFromString sourceCode startLoc endLoc =
    let
        numPadding =
            endLoc.row
                |> String.fromInt

Modified src/Stabel/Parser/SourceLocation.elm from [0f04c0baa1] to [e78bda646c].

1




2
3
4
5
6
7
8
module Stabel.Parser.SourceLocation exposing (..)






type alias SourceLocationRange =
    { start : SourceLocation
    , end : SourceLocation
    }

|
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
module Stabel.Parser.SourceLocation exposing
    ( SourceLocation
    , SourceLocationRange
    , emptyRange
    )


type alias SourceLocationRange =
    { start : SourceLocation
    , end : SourceLocation
    }