highlighting improvements
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "keyword.newt",
|
"name": "keyword.newt",
|
||||||
"match": "\\b(λ|=>|<-|->|→|:=|\\$|data|record|where|do|class|uses|instance|case|of|let|if|then|else|forall|∀|in|U|module|import|ptype|pfunc|infix|infixl|infixr)\\b"
|
"match": "\\b(λ|=>|<-|->|→|:=|\\$|data|record|constructor|where|do|class|uses|instance|case|of|let|if|then|else|forall|∀|in|U|module|import|ptype|pfunc|infix|infixl|infixr)\\b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "string.js",
|
"name": "string.js",
|
||||||
|
|||||||
@@ -93,8 +93,10 @@ export let newtTokens: monaco.languages.IMonarchLanguage = {
|
|||||||
specialOps: ["=>", "->", ":", "=", ":=", "<-"],
|
specialOps: ["=>", "->", ":", "=", ":=", "<-"],
|
||||||
tokenizer: {
|
tokenizer: {
|
||||||
root: [
|
root: [
|
||||||
|
// char literal, but I don't think there is a class for that.
|
||||||
|
[/'\\?.'/, "string"],
|
||||||
[
|
[
|
||||||
/[a-z_$'][\w$]*/,
|
/[a-z_$][\w$']*/,
|
||||||
{ cases: { "@keywords": "keyword", "@default": "identifier" } },
|
{ cases: { "@keywords": "keyword", "@default": "identifier" } },
|
||||||
],
|
],
|
||||||
[/[A-Z][\w\$]*/, "type.identifier"],
|
[/[A-Z][\w\$]*/, "type.identifier"],
|
||||||
@@ -110,8 +112,7 @@ export let newtTokens: monaco.languages.IMonarchLanguage = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// char literal, but I don't think there is a class for that.
|
|
||||||
[/'\\?.'/, "string"],
|
|
||||||
[/\d+/, "number"],
|
[/\d+/, "number"],
|
||||||
|
|
||||||
// strings
|
// strings
|
||||||
|
|||||||
Reference in New Issue
Block a user