Skip to content

Commit

Permalink
Support type args in type decls and user types
Browse files Browse the repository at this point in the history
  • Loading branch information
lorchrob committed Jul 31, 2024
1 parent e160ea6 commit 439fe1d
Showing 1 changed file with 29 additions and 12 deletions.
41 changes: 29 additions & 12 deletions syntaxes/lustre.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,19 @@
},
{
"comment": "User-defined type.",
"name": "support.type.lustre",
"match": "\\w+"
"match": "(\\w+)\\s*(<<[^>]+>>)?",
"captures": {
"1" : {
"name": "support.type.lustre"
},
"2" : {
"patterns": [
{
"include": "#type"
}
]
}
}
}
]
},
Expand Down Expand Up @@ -547,16 +558,7 @@
"match": "\\w+"
},
{
"begin": "<<",
"end": ">>",
"patterns": [
{
"include": "#type"
},
{
"include": "#comment"
}
]
"include": "#typeArgs"
},
{
"begin": "\\(",
Expand Down Expand Up @@ -1068,6 +1070,18 @@
}
]
},
"typeArgs": {
"begin": "<<",
"end": ">>",
"patterns": [
{
"include": "#type"
},
{
"include": "#comment"
}
]
},
"typeDeclRhs": {
"patterns": [
{
Expand Down Expand Up @@ -1147,6 +1161,9 @@
"name": "support.type.lustre",
"match": "\\w+"
},
{
"include": "#typeArgs"
},
{
"begin": "=",
"end": "(?=;)",
Expand Down

0 comments on commit 439fe1d

Please sign in to comment.