/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
contrib/python/Pygments/py3/pygments/lexers/procfile.py
41 строка
1 KB
Anton Myagkov
Update ydb version to 24.4 (#4579)
07 фев 2026, 11:59
Не верифицирован
07 фев 2026, 11:59
2c21cae
Код
Авторство
О чём код?
""" pygments.lexers.procfile ~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Procfile file format. :copyright: Copyright 2006-2024 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. """ name = 'Procfile' url = 'https://devcenter.heroku.com/articles/procfile#procfile-format' aliases = ['procfile'] filenames = ['Procfile'] version_added = '2.10' 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), ], }