Skip to content

Commit

Permalink
Merge pull request #25 from lorchrob/polymorphism
Browse files Browse the repository at this point in the history
Polymorphism
  • Loading branch information
daniel-larraz authored Aug 1, 2024
2 parents 92e7b6b + 439fe1d commit 336ed06
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 622 deletions.
42 changes: 39 additions & 3 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 @@ -546,6 +557,9 @@
"name": "entity.name.function.lustre",
"match": "\\w+"
},
{
"include": "#typeArgs"
},
{
"begin": "\\(",
"end": "\\)",
Expand Down Expand Up @@ -727,10 +741,17 @@
},
{
"comment": "Node / function call",
"begin": "(\\w+)\\s*\\(",
"begin": "(\\w+)\\s*(<<[^>]+>>)?\\s*\\(",
"beginCaptures": {
"1": {
"name": "entity.name.function"
},
"2": {
"patterns": [
{
"include": "#type"
}
]
}
},
"end": "\\)",
Expand Down Expand Up @@ -1049,6 +1070,18 @@
}
]
},
"typeArgs": {
"begin": "<<",
"end": ">>",
"patterns": [
{
"include": "#type"
},
{
"include": "#comment"
}
]
},
"typeDeclRhs": {
"patterns": [
{
Expand Down Expand Up @@ -1128,6 +1161,9 @@
"name": "support.type.lustre",
"match": "\\w+"
},
{
"include": "#typeArgs"
},
{
"begin": "=",
"end": "(?=;)",
Expand Down
Loading

0 comments on commit 336ed06

Please sign in to comment.