Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Elm language #400

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions langs/elm/elm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### ELM LANGUAGE ###

# ELEMENT_NAME [optional-css-class] REGULAR_EXPRESSION

NAME ELM
VERSION 0.18.0

COMMENT (--.*?$)|({-[^\}]*})
STRING (?default)

QUALIFIER:VARIABLE (?<=import)\s+[^\s]+
RESERVED \b(?alt:reserved.txt)\b
TYPE \b(?alt:type.txt)\b

RECORD:VARIABLE \b\w+\b\s*(?=:)(?=[^{]*})
ENTITY \b\w+\b\s*(?=:)
ARG:VARIABLE (\b[\w\t ]+\b(?=\s*->))|((?<=->)\s*\b[\w\t ]+\b\s*$)
CAPS:VARIABLE (?-i)\b[A-Z]\w+\b(?i)
IDENTIFIER (?default)
CONSTANT (?default)
OPERATOR (?default)
SYMBOL (?default)
17 changes: 17 additions & 0 deletions langs/elm/reserved.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
if
then
else
case
of
let
in
type
module
where
import
exposing
as
port
infix
infixl
infixr
39 changes: 39 additions & 0 deletions langs/elm/type.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Bool
String
Int
Char
Program
Model
Msg
Html
Cmd
Never
Array
Err
Ok
Maybe
Just
Nothing
Order
List
Color
Gradient
Date
Dict
Decoder
Value
Task
ProcessId
Router
Sub
Id
Generator
Regex
True
False
Match
HowMany
Result
Set
Task
Time