Skip to content

Commit

Permalink
Simplify end patterns further
Browse files Browse the repository at this point in the history
  • Loading branch information
jiribenes committed Jul 20, 2024
1 parent 1df2a1b commit 7dc2c36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions syntaxes/effekt.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"definitions": {
"patterns": [{
"begin": "\\s*(extern)\\s+((?:(?:\\{[^\\}]*\\}|[a-zA-Z][a-z-A-Z0-9_$]*)\\s+)?)\\s*(def)\\s+([a-zA-Z][a-z-A-Z0-9_$]*)\\b",
"end": "(?:(?=\\n)|(?=\\b(?:(?!=>)[^=]>\\b)|(?:(?!>)\\=)))",
"end": "(?=\\n)|(?<=\\S)\\s*(?==(?!>))",
"captures": {
"1": { "name": "keyword.declaration.type" },
"2": { "patterns": [{ "include": "#capabilities" }] },
Expand All @@ -47,7 +47,7 @@
"patterns": [{ "include": "#parameters" }]
}, {
"begin": "\\s*(def)\\s+([a-zA-Z][a-z-A-Z0-9_$]*)\\b",
"end": "(?:(?=\\n)|(?=\\b(?:(?!=>)[^=]>\\b)|(?:(?!>)\\=)))",
"end": "(?=\\n)|(?<=\\S)\\s*(?==(?!>))",
"captures": {
"1": { "name": "keyword.declaration.function" },
"2": { "name": "entity.name.function" }
Expand All @@ -65,7 +65,7 @@
"1": { "name": "keyword.declaration.var" },
"2": { "name": "variable" }
},
"end": "(?:(?=\\n)|(?=\\b(?:(?!=>)[^=]>\\b)|(?:(?!>)\\=)))",
"end": "(?:;|(?=\\n)|(?<=\\S)\\s*(?==(?!>)))",
"patterns": [{
"match": "\\s+(in)\\s+([a-zA-Z][a-z-A-Z0-9_$]*)\\b",
"captures": {
Expand Down

0 comments on commit 7dc2c36

Please sign in to comment.