aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorDamian Tarnawski <gthetarnav@gmail.com>2023-10-10 20:21:04 +0200
committerDamian Tarnawski <gthetarnav@gmail.com>2023-10-10 20:21:04 +0200
commit3ff362f886242345a3c0d58db529825e419bf5d0 (patch)
tree4d661e21b33b55e812243e1e99186f0c134f0172 /editors
parent5d33af9f1f69c6469510a5fda40aede1f4f6e21c (diff)
Add calling convention grammar to proc declaration
Diffstat (limited to 'editors')
-rw-r--r--editors/vscode/syntaxes/odin.tmLanguage.json106
1 files changed, 55 insertions, 51 deletions
diff --git a/editors/vscode/syntaxes/odin.tmLanguage.json b/editors/vscode/syntaxes/odin.tmLanguage.json
index 289dd7b..4a8f036 100644
--- a/editors/vscode/syntaxes/odin.tmLanguage.json
+++ b/editors/vscode/syntaxes/odin.tmLanguage.json
@@ -77,10 +77,11 @@
},
"procedure-declaration": {
"name": "meta.function.odin",
- "begin": "\\bproc\\b",
- "beginCaptures": { "0": { "name": "keyword.other.odin" } },
+ "begin": "\\b(proc)\\b",
+ "beginCaptures": { "1": { "name": "storage.type.function.odin" } },
"end": "(?=^|\\)|,|;)|(?<=})",
"patterns": [
+ { "include": "#strings-quoted-double" },
{ "include": "#comments" },
{ "include": "#procedure-parameters" },
{ "include": "#procedure-return-type" },
@@ -412,7 +413,7 @@
"match": "\\b(struct|enum|union|bit_set)\\b(?:(\\{)(\\}))?"
},
{
- "name": "storage.type.odin",
+ "name": "storage.type.function.odin",
"match": "\\bproc\\b"
},
{
@@ -465,56 +466,59 @@
},
"strings": {
"patterns": [
- {
- "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.raw.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.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" }]
- }
+ { "include": "#strings-quoted-double" },
+ { "include": "#strings-quoted-single" },
+ { "include": "#strings-quoted-raw" }
]
},
+ "strings-quoted-double": {
+ "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" }]
+ },
+ "strings-quoted-single": {
+ "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" }]
+ },
+ "strings-quoted-raw": {
+ "name": "string.quoted.raw.odin",
+ "begin": "`",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.odin"
+ }
+ },
+ "end": "`",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.odin"
+ }
+ },
+ "patterns": [{ "include": "#string-escaped-char" }]
+ },
"string-escaped-char": {
"patterns": [
{