Skip to content

Commit

Permalink
Add calling convention grammar to proc declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Oct 10, 2023
1 parent 5d33af9 commit 3ff362f
Showing 1 changed file with 55 additions and 51 deletions.
106 changes: 55 additions & 51 deletions editors/vscode/syntaxes/odin.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down Expand Up @@ -412,7 +413,7 @@
"match": "\\b(struct|enum|union|bit_set)\\b(?:(\\{)(\\}))?"
},
{
"name": "storage.type.odin",
"name": "storage.type.function.odin",
"match": "\\bproc\\b"
},
{
Expand Down Expand Up @@ -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": [
{
Expand Down

0 comments on commit 3ff362f

Please sign in to comment.