Skip to content

Commit

Permalink
syntax: fix space after . bug in type declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
gares committed Mar 28, 2024
1 parent 6bd37fc commit 88e255b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
28 changes: 17 additions & 11 deletions syntaxes/elpi.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,18 +279,24 @@
"name": "entity.name.function"
}
},
"endCaptures": {
"1": {
"name": "keyword.control.elpi"
}
},
"patterns": [
{
"match": "(([^,\\.%]|(\\.([a-z]|[A-Z])))(([^,\\.%]|(\\.([a-z]|[A-Z]))))*)",
"name": "entity.name.type"
},
{
"include": "#comments"
"begin": "",
"end": "(\\.\\s)",
"endCaptures": {
"1": {
"name": "keyword.control.elpi"
}
},
"patterns": [
{
"match": "(([^,\\.%]|(\\.([a-z]|[A-Z])))(([^,\\.%]|(\\.([a-z]|[A-Z]))))*)",
"name": "entity.name.type"
},
{
"include": "#comments"
}
]
}
]
},
Expand Down Expand Up @@ -431,7 +437,7 @@
},
"binders": {
"name": "binder.elpi",
"begin": "(?<![a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_.])(pi|sigma) (((([a-z](([a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_]|(\\.([a-z]|[A-Z]))))*)|([+*/^<>`'?@#~=&!](([a-z]|[A-Z]|[0-9]|[+*/^<>`'?@#~=&!\\-$_]|:))*)|(-([a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_]([a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_])*)))|(([A-Z]([a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_])*)|(_([a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_])*))| )+)",
"begin": "(?<![a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_.])(pi|sigma) (((([a-z](([a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_]|(\\.([a-z]|[A-Z]))))*)|([+*/^<>`'?@#~=&!](([a-z]|[A-Z]|[0-9]|[+*/^<>`'?@#~=&!\\-$_]|:))*)|(-([a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_]([a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_])*)))|(([A-Z]([a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_])*)|(_([a-zA-Z0-9+*/^<>`'?@#~=&!\\-$_])*))| )+)",
"end": "(\\\\)",
"beginCaptures": {
"1": {
Expand Down
28 changes: 17 additions & 11 deletions syntaxes/elpi.tmLanguage.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -279,18 +279,24 @@
"name": "entity.name.function"
}
},
"endCaptures": {
"1": {
"name": "keyword.control.elpi"
}
},
"patterns": [
{
"match": "{{{typechars}}}",
"name": "entity.name.type"
},
{
"include": "#comments"
"begin": "",
"end": "(\\.\\s)",
"endCaptures": {
"1": {
"name": "keyword.control.elpi"
}
},
"patterns": [
{
"match": "{{{typechars}}}",
"name": "entity.name.type"
},
{
"include": "#comments"
}
]
}
]
},
Expand Down Expand Up @@ -431,7 +437,7 @@
},
"binders": {
"name": "binder.elpi",
"begin": "{{{wbl}}}(pi|sigma) (({{{ident}}}|{{{var}}}| )+)",
"begin": "{{{wbl}}}(pi|sigma) (({{{ident}}}|{{{var}}}| )+)",
"end": "(\\\\)",
"beginCaptures": {
"1": {
Expand Down

0 comments on commit 88e255b

Please sign in to comment.