micro/runtime/syntax/haskell.yaml

49 lines
1.2 KiB
YAML
Raw Normal View History

2017-03-21 21:55:22 +03:00
filetype: haskell
detect:
2017-03-21 21:55:22 +03:00
filename: "\\.hs$"
rules:
# Keywords
- statement: "\\b(as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)\\b"
# Various symbols
2017-03-21 21:55:22 +03:00
- symbol: "(\\||@|!|:|_|~|=|\\\\|;|\\(\\)|,|\\[|\\]|\\{|\\})"
# Operators
2017-03-21 21:55:22 +03:00
- symbol.operator: "(==|/=|&&|\\|\\||<|>|<=|>=)"
# Various symbols
2017-03-21 21:55:22 +03:00
- special: "(->|<-)"
- symbol: "\\.|\\$"
# Data constructors
2017-03-21 21:55:22 +03:00
- constant.bool: "\\b(True|False)\\b"
2020-02-12 03:13:36 +03:00
- constant: "\\b(Nothing|Just|Left|Right|LT|EQ|GT)\\b"
# Data classes
2020-02-12 03:13:36 +03:00
- identifier.class: "\\b(Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor|Foldable|Additive|Zip)[ ]"
# Strings
- constant.string:
start: "\""
end: "\""
2017-03-29 16:45:16 +03:00
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
# Comments
- comment:
start: "--"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"
2017-03-21 21:55:22 +03:00
- comment:
start: "\\{-"
end: "-\\}"
rules:
- todo: "(TODO|XXX|FIXME):?"
2017-03-21 21:55:22 +03:00
- identifier.micro: "undefined"