diff options
| author | shadchin <[email protected]> | 2022-02-10 16:44:30 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:30 +0300 |
| commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
| tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/python/Pygments/py3/pygments/lexers/stata.py | |
| parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/stata.py')
| -rw-r--r-- | contrib/python/Pygments/py3/pygments/lexers/stata.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/stata.py b/contrib/python/Pygments/py3/pygments/lexers/stata.py index 4ec6cf4f759..8d96a7074d0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/stata.py +++ b/contrib/python/Pygments/py3/pygments/lexers/stata.py @@ -4,12 +4,12 @@ Lexer for Stata - :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. """ import re -from pygments.lexer import RegexLexer, default, include, words +from pygments.lexer import RegexLexer, default, include, words from pygments.token import Comment, Keyword, Name, Number, \ String, Text, Operator @@ -26,8 +26,8 @@ class StataLexer(RegexLexer): """ # Syntax based on # - http://fmwww.bc.edu/RePEc/bocode/s/synlightlist.ado - # - https://github.com/isagalaev/highlight.js/blob/master/src/languages/stata.js - # - https://github.com/jpitblado/vim-stata/blob/master/syntax/stata.vim + # - https://github.com/isagalaev/highlight.js/blob/master/src/languages/stata.js + # - https://github.com/jpitblado/vim-stata/blob/master/syntax/stata.vim name = 'Stata' aliases = ['stata', 'do'] @@ -117,27 +117,27 @@ class StataLexer(RegexLexer): # A global is more restricted, so we do follow rules. Note only # locals explicitly enclosed ${} can be nested. 'macros': [ - (r'\$(\{|(?=[$`]))', Name.Variable.Global, 'macro-global-nested'), + (r'\$(\{|(?=[$`]))', Name.Variable.Global, 'macro-global-nested'), (r'\$', Name.Variable.Global, 'macro-global-name'), (r'`', Name.Variable, 'macro-local'), ], 'macro-local': [ (r'`', Name.Variable, '#push'), (r"'", Name.Variable, '#pop'), - (r'\$(\{|(?=[$`]))', Name.Variable.Global, 'macro-global-nested'), + (r'\$(\{|(?=[$`]))', Name.Variable.Global, 'macro-global-nested'), (r'\$', Name.Variable.Global, 'macro-global-name'), (r'.', Name.Variable), # fallback ], 'macro-global-nested': [ - (r'\$(\{|(?=[$`]))', Name.Variable.Global, '#push'), + (r'\$(\{|(?=[$`]))', Name.Variable.Global, '#push'), (r'\}', Name.Variable.Global, '#pop'), (r'\$', Name.Variable.Global, 'macro-global-name'), (r'`', Name.Variable, 'macro-local'), (r'\w', Name.Variable.Global), # fallback - default('#pop'), + default('#pop'), ], 'macro-global-name': [ - (r'\$(\{|(?=[$`]))', Name.Variable.Global, 'macro-global-nested', '#pop'), + (r'\$(\{|(?=[$`]))', Name.Variable.Global, 'macro-global-nested', '#pop'), (r'\$', Name.Variable.Global, 'macro-global-name', '#pop'), (r'`', Name.Variable, 'macro-local', '#pop'), (r'\w{1,32}', Name.Variable.Global, '#pop'), |
