Merge pull request #1310 from coolreader18/elm-syntax

Add Elm syntax file
This commit is contained in:
Zachary Yedidia 2019-07-06 01:49:57 -04:00 committed by GitHub
commit 9a8b7ab757
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

38
runtime/syntax/elm.yaml Normal file
View file

@ -0,0 +1,38 @@
filetype: elm
detect:
filename: "\\.elm$"
rules:
- statement: "\\b(as|alias|case|else|exposing|if|import|in|let|module|of|port|then|type|)\\b"
- statement: "(\\=|\\:|\\->)"
- type: "\\b([A-Z][A-Za-z\\d]*)\\b"
- identifier: "^([a-z][A-Za-z\\d]*)\\b"
- constant.string:
start: "\"\"\""
end: "\"\"\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- comment:
start: "--"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "\\{-"
end: "-\\}"
rules:
- todo: "(TODO|XXX|FIXME):?"