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/procfile.py | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/procfile.py')
-rw-r--r-- | contrib/python/Pygments/py3/pygments/lexers/procfile.py | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/procfile.py b/contrib/python/Pygments/py3/pygments/lexers/procfile.py index cac0a25440d..9856f919a46 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/procfile.py +++ b/contrib/python/Pygments/py3/pygments/lexers/procfile.py @@ -1,43 +1,43 @@ -""" - pygments.lexers.procfile - ~~~~~~~~~~~~~~~~~~~~~~~~ - - Lexer for Procfile file format. - - :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -from pygments.lexer import RegexLexer, bygroups -from pygments.token import Name, Number, String, Text, Punctuation - -__all__ = ["ProcfileLexer"] - - -class ProcfileLexer(RegexLexer): - """ - Lexer for Procfile file format. - - The format is used to run processes on Heroku or is used by Foreman or - Honcho tools. - For more information about the definition of the format, see: - https://devcenter.heroku.com/articles/procfile#procfile-format - - .. versionadded:: 2.10 - """ - name = 'Procfile' - aliases = ['procfile'] - filenames = ['Procfile'] - - tokens = { - 'root': [ - (r'^([a-z]+)(:)', bygroups(Name.Label, Punctuation)), - (r'\s+', Text.Whitespace), - (r'"[^"]*"', String), - (r"'[^']*'", String), - (r'[0-9]+', Number.Integer), - (r'\$[a-zA-Z_][\w]*', Name.Variable), - (r'(\w+)(=)(\w+)', bygroups(Name.Variable, Punctuation, String)), - (r'([\w\-\./]+)', Text), - ], - } +""" + pygments.lexers.procfile + ~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for Procfile file format. + + :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups +from pygments.token import Name, Number, String, Text, Punctuation + +__all__ = ["ProcfileLexer"] + + +class ProcfileLexer(RegexLexer): + """ + Lexer for Procfile file format. + + The format is used to run processes on Heroku or is used by Foreman or + Honcho tools. + For more information about the definition of the format, see: + https://devcenter.heroku.com/articles/procfile#procfile-format + + .. versionadded:: 2.10 + """ + name = 'Procfile' + aliases = ['procfile'] + filenames = ['Procfile'] + + tokens = { + 'root': [ + (r'^([a-z]+)(:)', bygroups(Name.Label, Punctuation)), + (r'\s+', Text.Whitespace), + (r'"[^"]*"', String), + (r"'[^']*'", String), + (r'[0-9]+', Number.Integer), + (r'\$[a-zA-Z_][\w]*', Name.Variable), + (r'(\w+)(=)(\w+)', bygroups(Name.Variable, Punctuation, String)), + (r'([\w\-\./]+)', Text), + ], + } |