Skip to content

Commit

Permalink
Merge pull request #270 from eric-wieser/add-binder-highlighting
Browse files Browse the repository at this point in the history
fix(syntaxes/lean): implicit binder brackets are forbidden in symbol names
  • Loading branch information
gebner authored May 26, 2021
2 parents bfa80de + 6b973c1 commit 346bb62
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions syntaxes/lean.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
"name": "meta.parens",
"patterns" : [
{ "begin": ":", "end": "(?=\\))",
"beginCaptures": {"0": {"name": "punctuation.separator.type.lean"}},
"contentName": "meta.type.lean",
"patterns" : [
{"include": "#expressions"}
Expand Down Expand Up @@ -224,13 +225,13 @@
},
"definitionName": {
"patterns": [
{"match": "\\b[^:«»\\(\\)\\{\\},[:space:]=→λ∀?][^:«»\\(\\)\\{\\},[:space:]]*", "name": "entity.name.function.lean"},
{"match": "\\b[^:«»\\(\\)\\{\\}⦃⦄,[:space:]=→λ∀?][^:«»\\(\\)\\{\\}⦃⦄,[:space:]]*", "name": "entity.name.function.lean"},
{"begin": "«", "end": "»", "contentName": "entity.name.function.lean"}
]
},
"binderName": {
"patterns": [
{"match": "\\b[^:«»\\(\\)\\{\\},[:space:]=→λ∀?][^:«»\\(\\)\\{\\},[:space:]]*", "name": "variable.parameter.lean"},
{"match": "\\b[^:«»\\(\\)\\{\\}⦃⦄,[:space:]=→λ∀?][^:«»\\(\\)\\{\\}⦃⦄,[:space:]]*", "name": "variable.parameter.lean"},
{"begin": "«", "end": "»", "contentName": "variable.parameter.lean"}
]
},
Expand Down Expand Up @@ -275,7 +276,7 @@
"beginCaptures": {"0": {"name": "punctuation.definition.binder.semiimplicit.begin.lean"}},
"endCaptures": {"0": {"name": "punctuation.definition.binder.semiimplicit.end.lean"}},
"patterns" : [
{ "begin": ":", "end": "(?=\\)",
{ "begin": ":", "end": "(?=⦄|\\}\\})",
"beginCaptures": {"0": {"name": "punctuation.separator.type.lean"}},
"contentName": "meta.type.lean",
"patterns" : [
Expand Down

0 comments on commit 346bb62

Please sign in to comment.