Tiny tokenizer improvements

This commit is contained in:
Jonatan Kłosko 2021-02-22 16:08:23 +01:00
parent 541a3e2529
commit 48c7f9e707
2 changed files with 10 additions and 2 deletions

View file

@ -192,7 +192,15 @@ const ElixirMonarchLanguage = {
[
// In-scope call - an identifier followed by ( or .(
/(@variableName)(?=\s*\.?\s*\()/,
["function.call"],
{
cases: {
// Tokenize as keyword in cases like `if(..., do: ..., else: ...)`
"@declarationKeywords": "keyword.declaration",
"@namespaceKeywords": "keyword",
"@otherKeywords": "keyword",
"@default": "function.call"
}
},
],
[
// Referencing function in a module

View file

@ -25,7 +25,7 @@ monaco.editor.defineTheme("custom", {
inherit: false,
rules: [
{ token: "", foreground: "#abb2bf" },
{ token: "variable", foreground: "#abb2bf" },
{ token: "variable", foreground: "#e06c75" },
{ token: "constant", foreground: "#61afef" },
{ token: "constant.character.escape", foreground: "#61afef" },
{ token: "comment", foreground: "#5c6370" },