mirror of https://github.com/Wilfred/difftastic/
add support for Elm
parent
3bdf8c3e80
commit
d6e9afd3d6
@ -0,0 +1,40 @@
|
||||
module Main exposing (blue, list, x, y)
|
||||
|
||||
|
||||
list : List Int
|
||||
list =
|
||||
[ 1
|
||||
, 2
|
||||
, 3
|
||||
, 4
|
||||
]
|
||||
|
||||
|
||||
blue : a -> String
|
||||
blue =
|
||||
\_ -> "blue"
|
||||
|
||||
|
||||
green : String
|
||||
green =
|
||||
"yellow" ++ "blue"
|
||||
|
||||
|
||||
x : Int
|
||||
x =
|
||||
(*) 2 <| 4
|
||||
|
||||
|
||||
y : Int
|
||||
y =
|
||||
4 |> (*) 2
|
||||
|
||||
|
||||
fn :
|
||||
()
|
||||
-> Int
|
||||
-> List String
|
||||
-> ()
|
||||
-> String
|
||||
fn () n strings () =
|
||||
String.join (String.fromInt n) strings
|
||||
@ -0,0 +1,43 @@
|
||||
module Main exposing (blue, green, list, x, y, z)
|
||||
|
||||
|
||||
list : List Int
|
||||
list =
|
||||
[ 1, 2, 3 ]
|
||||
|
||||
|
||||
blue : a -> String
|
||||
blue =
|
||||
always "blue"
|
||||
|
||||
|
||||
green : a -> String
|
||||
green =
|
||||
always "blue"
|
||||
|
||||
|
||||
y : Int
|
||||
|
||||
|
||||
x =
|
||||
(*) 2 4
|
||||
|
||||
|
||||
y : Int
|
||||
y =
|
||||
(*) 2 4
|
||||
|
||||
|
||||
z : String
|
||||
z =
|
||||
"abc"
|
||||
|
||||
|
||||
fn : () -> Int -> List String -> String
|
||||
fn _ n strings =
|
||||
let
|
||||
foo : List String -> String
|
||||
foo =
|
||||
String.join (String.fromInt n)
|
||||
in
|
||||
foo strings
|
||||
@ -0,0 +1 @@
|
||||
../tree-sitter-elm/queries/highlights.scm
|
||||
@ -0,0 +1 @@
|
||||
tree-sitter-elm/src
|
||||
Loading…
Reference in New Issue