aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/ezhil.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/python/Pygments/py3/pygments/lexers/ezhil.py
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
downloadydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/ezhil.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/ezhil.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/ezhil.py b/contrib/python/Pygments/py3/pygments/lexers/ezhil.py
index 6d282c96bb..567f063eb1 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/ezhil.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/ezhil.py
@@ -4,7 +4,7 @@
Pygments lexers for Ezhil language.
- :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -29,20 +29,20 @@ class EzhilLexer(RegexLexer):
flags = re.MULTILINE | re.UNICODE
# Refer to tamil.utf8.tamil_letters from open-tamil for a stricter version of this.
# This much simpler version is close enough, and includes combining marks.
- _TALETTERS = '[a-zA-Z_]|[\u0b80-\u0bff]'
+ _TALETTERS = '[a-zA-Z_]|[\u0b80-\u0bff]'
tokens = {
'root': [
include('keywords'),
(r'#.*$', Comment.Single),
(r'[@+/*,^\-%]|[!<>=]=?|&&?|\|\|?', Operator),
- ('இல்', Operator.Word),
- (words(('assert', 'max', 'min',
- 'நீளம்', 'சரம்_இடமாற்று', 'சரம்_கண்டுபிடி',
- 'பட்டியல்', 'பின்இணை', 'வரிசைப்படுத்து',
- 'எடு', 'தலைகீழ்', 'நீட்டிக்க', 'நுழைக்க', 'வை',
- 'கோப்பை_திற', 'கோப்பை_எழுது', 'கோப்பை_மூடு',
- 'pi', 'sin', 'cos', 'tan', 'sqrt', 'hypot', 'pow',
- 'exp', 'log', 'log10', 'exit',
+ ('இல்', Operator.Word),
+ (words(('assert', 'max', 'min',
+ 'நீளம்', 'சரம்_இடமாற்று', 'சரம்_கண்டுபிடி',
+ 'பட்டியல்', 'பின்இணை', 'வரிசைப்படுத்து',
+ 'எடு', 'தலைகீழ்', 'நீட்டிக்க', 'நுழைக்க', 'வை',
+ 'கோப்பை_திற', 'கோப்பை_எழுது', 'கோப்பை_மூடு',
+ 'pi', 'sin', 'cos', 'tan', 'sqrt', 'hypot', 'pow',
+ 'exp', 'log', 'log10', 'exit',
), suffix=r'\b'), Name.Builtin),
(r'(True|False)\b', Keyword.Constant),
(r'[^\S\n]+', Whitespace),
@@ -51,10 +51,10 @@ class EzhilLexer(RegexLexer):
(r'[(){}\[\]:;.]', Punctuation),
],
'keywords': [
- ('பதிப்பி|தேர்ந்தெடு|தேர்வு|ஏதேனில்|ஆனால்|இல்லைஆனால்|இல்லை|ஆக|ஒவ்வொன்றாக|இல்|வரை|செய்|முடியேனில்|பின்கொடு|முடி|நிரல்பாகம்|தொடர்|நிறுத்து|நிரல்பாகம்', Keyword),
+ ('பதிப்பி|தேர்ந்தெடு|தேர்வு|ஏதேனில்|ஆனால்|இல்லைஆனால்|இல்லை|ஆக|ஒவ்வொன்றாக|இல்|வரை|செய்|முடியேனில்|பின்கொடு|முடி|நிரல்பாகம்|தொடர்|நிறுத்து|நிரல்பாகம்', Keyword),
],
'identifier': [
- ('(?:'+_TALETTERS+')(?:[0-9]|'+_TALETTERS+')*', Name),
+ ('(?:'+_TALETTERS+')(?:[0-9]|'+_TALETTERS+')*', Name),
],
'literal': [
(r'".*?"', String),
@@ -63,14 +63,14 @@ class EzhilLexer(RegexLexer):
]
}
- def analyse_text(text):
- """This language uses Tamil-script. We'll assume that if there's a
- decent amount of Tamil-characters, it's this language. This assumption
- is obviously horribly off if someone uses string literals in tamil
- in another language."""
- if len(re.findall(r'[\u0b80-\u0bff]', text)) > 10:
- return 0.25
-
+ def analyse_text(text):
+ """This language uses Tamil-script. We'll assume that if there's a
+ decent amount of Tamil-characters, it's this language. This assumption
+ is obviously horribly off if someone uses string literals in tamil
+ in another language."""
+ if len(re.findall(r'[\u0b80-\u0bff]', text)) > 10:
+ return 0.25
+
def __init__(self, **options):
- super().__init__(**options)
+ super().__init__(**options)
self.encoding = options.get('encoding', 'utf-8')