From 88e255b6fdb128fdccae98bdafca7a42e515e7ab Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 28 Mar 2024 11:28:35 +0100 Subject: [PATCH] syntax: fix space after . bug in type declaration --- syntaxes/elpi.tmLanguage.json | 28 +++++++++++++++++----------- syntaxes/elpi.tmLanguage.mustache | 28 +++++++++++++++++----------- 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/syntaxes/elpi.tmLanguage.json b/syntaxes/elpi.tmLanguage.json index 2ca1502..2dc8f31 100644 --- a/syntaxes/elpi.tmLanguage.json +++ b/syntaxes/elpi.tmLanguage.json @@ -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" + } + ] } ] }, @@ -431,7 +437,7 @@ }, "binders": { "name": "binder.elpi", - "begin": "(?`'?@#~=&!\\-$_.])(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": "(?`'?@#~=&!\\-$_.])(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": { diff --git a/syntaxes/elpi.tmLanguage.mustache b/syntaxes/elpi.tmLanguage.mustache index ae59d78..b16f23d 100644 --- a/syntaxes/elpi.tmLanguage.mustache +++ b/syntaxes/elpi.tmLanguage.mustache @@ -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" + } + ] } ] }, @@ -431,7 +437,7 @@ }, "binders": { "name": "binder.elpi", - "begin": "{{{wbl}}}(pi|sigma) (({{{ident}}}|{{{var}}}| )+)", + "begin": "{{{wbl}}}(pi|sigma) (({{{ident}}}|{{{var}}}| )+)", "end": "(\\\\)", "beginCaptures": { "1": {