diff options
| author | Damian Tarnawski <gthetarnav@gmail.com> | 2023-10-04 21:57:51 +0200 |
|---|---|---|
| committer | Damian Tarnawski <gthetarnav@gmail.com> | 2023-10-04 21:57:51 +0200 |
| commit | a5b8d2a54d1d76fbac81f92dbb67eafbe164ad1a (patch) | |
| tree | 05e7d8ef81ec45befd9e05b4a78c4b27efd44f2b /editors | |
| parent | aef651f58662f5af72f41677d2f8d2427d81c9cb (diff) | |
Minor grammar updates
- Remove `export` and `set` as keywords
- Add `or_break` and `or_continue` as keywords
- Add `&` and `^` as operators
- Add string beginning and ending quotes as punctuation
Diffstat (limited to 'editors')
| -rw-r--r-- | editors/vscode/syntaxes/odin.tmLanguage.json | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/editors/vscode/syntaxes/odin.tmLanguage.json b/editors/vscode/syntaxes/odin.tmLanguage.json index a2f7f33..289dd7b 100644 --- a/editors/vscode/syntaxes/odin.tmLanguage.json +++ b/editors/vscode/syntaxes/odin.tmLanguage.json @@ -309,7 +309,7 @@ }, { "name": "keyword.control.odin", - "match": "\\b(import|export|foreign|package)\\b" + "match": "\\b(import|foreign|package)\\b" }, { "name": "keyword.control.odin", @@ -317,7 +317,7 @@ }, { "name": "keyword.control.odin", - "match": "\\b(fallthrough|break|continue|case|dynamic)\\b" + "match": "\\b(fallthrough|break|or_break|continue|or_continue|case|dynamic)\\b" }, { "name": "keyword.control.odin", @@ -353,7 +353,7 @@ }, { "name": "storage.type.odin", - "match": "\\b(struct|enum|union|map|set|bit_set|typeid|matrix)\\b" + "match": "\\b(struct|enum|union|map|bit_set|typeid|matrix)\\b" }, { "name": "keyword.function.odin", @@ -380,6 +380,14 @@ "match": ":[:=]|=" }, { + "name": "keyword.operator.address.odin", + "match": "\\&" + }, + { + "name": "keyword.operator.pointer.odin", + "match": "\\^" + }, + { "match": "->", "name": "storage.type.function.arrow.odin" }, @@ -460,18 +468,49 @@ { "name": "string.quoted.double.odin", "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.odin" + } + }, "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.odin" + } + }, "patterns": [{ "include": "#string-escaped-char" }] }, { - "name": "string.quoted.double.odin", + "name": "string.quoted.raw.odin", "begin": "`", - "end": "`" + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.odin" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.odin" + } + }, + "patterns": [{ "include": "#string-escaped-char" }] }, { "name": "string.quoted.single.odin", "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.odin" + } + }, "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.odin" + } + }, "patterns": [{ "include": "#string-escaped-char" }] } ] |