Skip to content

Commit

Permalink
chore: downstream the grammar updates from tact-sublime
Browse files Browse the repository at this point in the history
  • Loading branch information
novusnota committed Jan 28, 2025
1 parent affa23d commit 2c630fa
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docs/grammars/grammar-tact.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"name": "tact",
"displayName": "Tact",
"scopeName": "source.tact",
"fileTypes": [
"tact"
],
"foldingStartMarker": "\\{\\s*$",
"foldingStopMarker": "^\\s*\\}",
"patterns": [
{
"include": "#comment"
Expand Down Expand Up @@ -84,7 +81,7 @@
},

"todo": {
"match": "(?i)\\b(FIXME|TODO|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG)\\b(?-i)",
"match": "\\b(FIXME|TODO|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG)\\b",
"name": "keyword.comment.todo.tact"
},

Expand Down Expand Up @@ -143,7 +140,7 @@
"begin": "(?<!\\.)(asm)\\s*(\\()",
"beginCaptures": {
"1": {
"name": "entity.other.attribute-name.tact"
"name": "keyword.other.asm.tact"
},
"2": {
"name": "punctuation.brackets.round.tact"
Expand Down Expand Up @@ -177,8 +174,13 @@
},
{
"comment": "Fallback match",
"match": "(?<!\\.)\\b(@name|@interface|asm)\\b",
"match": "(?<!\\.)\\b(@name|@interface)\\b",
"name": "entity.other.attribute-name.tact"
},
{
"comment": "Fallback match",
"match": "(?<!\\.)\\b(asm)\\b",
"name": "keyword.other.asm.tact"
}
]
},
Expand Down Expand Up @@ -402,7 +404,7 @@
"comment": "Serialization",
"patterns": [
{
"match": "(?<!\\.)\\b(as)\\s+(coins|varu?int(?:32|16)|remaining|bytes(?:64|32)|int257|u?int(?:2[0-5][0-6]|1[0-9][0-9]|[1-9][0-9]?))\\b",
"match": "(?<!\\.)\\b(as)\\s+(coins|varu?int(?:32|16)|remaining|bytes(?:32|64)|int257|u?int(?:25[0-6]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?))\\b",
"captures": {
"1": {
"name": "keyword.other.as.tact storage.modifier.tact"
Expand Down

0 comments on commit 2c630fa

Please sign in to comment.