Separate constructors and constants from keywords

This commit is contained in:
Matt Masson 2018-07-10 15:04:43 -04:00
parent 985b1bdc11
commit b261c99d53
2 changed files with 56 additions and 9 deletions

View file

@ -39,11 +39,24 @@ export const language = <ILanguage>{
"is", "let", "meta", "not",
"otherwise", "or", "section",
"shared", "then", "true",
"try", "type", "#binary",
"#date", "#datetime",
"#datetimezone", "#duration",
"#infinity", "#nan", "#sections",
"#shared", "#table", "#time"
"try", "type"
],
constructors: [
"#binary",
"#date",
"#datetime",
"#datetimezone",
"#duration",
"#table",
"#time"
],
constants: [
"#infinity",
"#nan",
"#sections",
"#shared"
],
typeKeywords: [
@ -81,8 +94,10 @@ export const language = <ILanguage>{
[/(#?[a-z]+)/,
{
cases: {
"@typeKeywords": "keyword.type",
"@typeKeywords": "type",
"@keywords": "keyword",
"@constants": "constant",
"@constructors": "constructor",
"@default": "identifier"
}
}