mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Split operator keywords and fix "operators" typo
This commit is contained in:
parent
b261c99d53
commit
250f5d42d8
2 changed files with 49 additions and 16 deletions
|
|
@ -33,11 +33,17 @@ export const language = <ILanguage>{
|
|||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
|
||||
operatorKeywords: [
|
||||
"and",
|
||||
"not",
|
||||
"or"
|
||||
],
|
||||
|
||||
keywords: [
|
||||
"and", "as", "each", "else",
|
||||
"as", "each", "else",
|
||||
"error", "false", "if", "in",
|
||||
"is", "let", "meta", "not",
|
||||
"otherwise", "or", "section",
|
||||
"is", "let", "meta",
|
||||
"otherwise", "section",
|
||||
"shared", "then", "true",
|
||||
"try", "type"
|
||||
],
|
||||
|
|
@ -98,6 +104,7 @@ export const language = <ILanguage>{
|
|||
"@keywords": "keyword",
|
||||
"@constants": "constant",
|
||||
"@constructors": "constructor",
|
||||
"@operatorKeywords": "operators",
|
||||
"@default": "identifier"
|
||||
}
|
||||
}
|
||||
|
|
@ -111,7 +118,7 @@ export const language = <ILanguage>{
|
|||
{ include: "@strings" },
|
||||
|
||||
[/[{}()\[\]]/, "@brackets"],
|
||||
[/([=\+<>\-\*&@\?\/!])|([<>]=)|(<>)|(=>)|(\.\.\.)|(\.\.)/, "operator"],
|
||||
[/([=\+<>\-\*&@\?\/!])|([<>]=)|(<>)|(=>)|(\.\.\.)|(\.\.)/, "operators"],
|
||||
[/[,;]/, "delimiter"],
|
||||
],
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue