mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
fix(syntax_highlighting): fix date highlighting
This commit is contained in:
parent
a450c8f841
commit
9ac9ed6f1e
@ -71,7 +71,7 @@ ace.define(
|
||||
},
|
||||
{
|
||||
token: "constant.numeric",
|
||||
regex: "(\\|[0-9]+/[0-9]+/[0-9]+\\|)",
|
||||
regex: "(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)",
|
||||
},
|
||||
{
|
||||
token: "constant",
|
||||
|
@ -104,7 +104,7 @@
|
||||
'name' : 'keyword.other.catala_en'
|
||||
}
|
||||
{
|
||||
'match' : '(\\|[0-9]+/[0-9]+/[0-9]+\\|)'
|
||||
'match' : '(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)'
|
||||
'name' : 'constant.numeric.catala_en'
|
||||
}
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ code : context {
|
||||
}
|
||||
|
||||
: pattern {
|
||||
regex \= (\|[0-9]+/[0-9]+/[0-9]+\|)
|
||||
regex \= (\|[0-9]+\-[0-9]+\-[0-9]+\|)
|
||||
styles [] = .literal_numeric ;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ class CatalaEnLexer(RegexLexer):
|
||||
bygroups(Keyword.Declaration, Text, Name.Variable)),
|
||||
(u'\\b(match|with\\s+pattern|fixed|by|decreasing|increasing|varies|with|we\\s+have|in|such\\s+that|exists|for|all|of|if|then|else|initial)\\b', bygroups(Keyword.Reserved)),
|
||||
(u'\\b(scope|depends\\s+on|declaration|includes|collection|content|optional|structure|enumeration|context|rule|under\\s+condition|condition|data|consequence|fulfilled|equals|assertion|definition|label|exception)\\b', bygroups(Keyword.Declaration)),
|
||||
(u'(\\|[0-9]+/[0-9]+/[0-9]+\\|)', bygroups(Number.Integer)),
|
||||
(u'(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)', bygroups(Number.Integer)),
|
||||
(u'\\b(true|false)\\b', bygroups(Keyword.Constant)),
|
||||
(u'\\b([0-9]+(,[0.9]*|))\\b', bygroups(Number.Integer)),
|
||||
(u'(\\-\\-|\\;|\\.|\\,|\\:|\\(|\\)|\\[|\\]|\\{|\\})', bygroups(
|
||||
|
@ -167,7 +167,7 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(\|[0-9]+/[0-9]+/[0-9]+\|)</string>
|
||||
<string>(\|[0-9]+\-[0-9]+\-[0-9]+\|)</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.catala_en</string>
|
||||
</dict>
|
||||
|
@ -71,7 +71,7 @@ ace.define(
|
||||
},
|
||||
{
|
||||
token: "constant.numeric",
|
||||
regex: "(\\|[0-9]+/[0-9]+/[0-9]+\\|)",
|
||||
regex: "(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)",
|
||||
},
|
||||
{
|
||||
token: "constant",
|
||||
|
@ -104,7 +104,7 @@
|
||||
'name' : 'keyword.other.catala_fr'
|
||||
}
|
||||
{
|
||||
'match' : '(\\|[0-9]+/[0-9]+/[0-9]+\\|)'
|
||||
'match' : '(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)'
|
||||
'name' : 'constant.numeric.catala_fr'
|
||||
}
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ code : context {
|
||||
}
|
||||
|
||||
: pattern {
|
||||
regex \= (\|[0-9]+/[0-9]+/[0-9]+\|)
|
||||
regex \= (\|[0-9]+\-[0-9]+\-[0-9]+\|)
|
||||
styles [] = .literal_numeric ;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ class CatalaFrLexer(RegexLexer):
|
||||
bygroups(Keyword.Declaration, Text, Name.Variable)),
|
||||
(u'\\b(selon|sous\\s+forme|fix\xe9|par|d\xe9croissante|croissante|varie|avec|on\\s+a|dans|tel\\s+que|existe|pour|tout|de|si|alors|sinon|initial)\\b', bygroups(Keyword.Reserved)),
|
||||
(u'\\b(champ\\s+d\'application|si\\s+et\\s+seulement\\s+si|d\xe9pend\\s+de|d\xe9claration|inclus|collection|contenu|optionnel|structure|\xe9num\xe9ration|contexte|r\xe8gle|sous\\s+condition|condition|donn\xe9e|cons\xe9quence|rempli|\xe9gal\\s+\xe0|assertion|d\xe9finition|\xe9tiquette|exception)\\b', bygroups(Keyword.Declaration)),
|
||||
(u'(\\|[0-9]+/[0-9]+/[0-9]+\\|)', bygroups(Number.Integer)),
|
||||
(u'(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)', bygroups(Number.Integer)),
|
||||
(u'\\b(vrai|faux)\\b', bygroups(Keyword.Constant)),
|
||||
(u'\\b([0-9]+(,[0.9]*|))\\b', bygroups(Number.Integer)),
|
||||
(u'(\\-\\-|\\;|\\.|\\,|\\:|\\(|\\)|\\[|\\]|\\{|\\})', bygroups(
|
||||
|
@ -167,7 +167,7 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(\|[0-9]+/[0-9]+/[0-9]+\|)</string>
|
||||
<string>(\|[0-9]+\-[0-9]+\-[0-9]+\|)</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.catala_fr</string>
|
||||
</dict>
|
||||
|
@ -74,7 +74,7 @@
|
||||
'name' : 'keyword.other.catala_pl'
|
||||
}
|
||||
{
|
||||
'match' : '(\\|[0-9]+/[0-9]+/[0-9]+\\|)'
|
||||
'match' : '(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)'
|
||||
'name' : 'constant.numeric.catala_pl'
|
||||
}
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ code : context {
|
||||
}
|
||||
|
||||
: pattern {
|
||||
regex \= (\|[0-9]+/[0-9]+/[0-9]+\|)
|
||||
regex \= (\|[0-9]+\-[0-9]+\-[0-9]+\|)
|
||||
styles [] = .literal_numeric ;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ class CatalaPlLexer(RegexLexer):
|
||||
(u'(kontekst)(\\s+)([a-z\u0105\u0107\u0119\u0142\u0144\xf3\u015b\u017c\u017a][a-z\u0105\u0107\u0119\u0142\u0144\xf3\u015b\u017c\u017aA-Z\u0104\u0106\u0118\u0141\u0143\xd3\u015a\u017b\u01790-9_\\\']*)', bygroups(Keyword.Declaration, Text, Name.Variable)),
|
||||
(u'\\b(pasuje|ze\\s+wzorem|staloprzecinkowa|przez|malejacy|rosnacy|rozna|wraz z|mamy|w|takich ze|istnieje|dla|wszystkie|z|jezeli|wtedy|inaczej|poczatkowy)\\b', bygroups(Keyword.Reserved)),
|
||||
(u'\\b(zakres|zalezy\\s+od|deklaracja|kolekcja|typu|opcjonalny|struktura|enumeracja|kontekst|zasada|pod\\s+warunkuem|czas|konsekwencja|spelnione|wynosi|asercja|definicja|etykieta|wyj\u0105tek)\\b', bygroups(Keyword.Declaration)),
|
||||
(u'(\\|[0-9]+/[0-9]+/[0-9]+\\|)', bygroups(Number.Integer)),
|
||||
(u'(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)', bygroups(Number.Integer)),
|
||||
(u'\\b(prawda|falsz)\\b', bygroups(Keyword.Constant)),
|
||||
(u'\\b([0-9]+(,[0.9]*|))\\b', bygroups(Number.Integer)),
|
||||
(u'(\\-\\-|\\;|\\.|\\,|\\:|\\(|\\)|\\[|\\]|\\{|\\})', bygroups(Operator)),
|
||||
|
Loading…
Reference in New Issue
Block a user