diff options
author | shadchin <[email protected]> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/python/Pygments/py3/pygments/lexers/ezhil.py | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/ezhil.py')
-rw-r--r-- | contrib/python/Pygments/py3/pygments/lexers/ezhil.py | 42 |
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 567f063eb18..6d282c96bb9 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') |