⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
pygments
/
lexers
/
View File Name :
bdd.py
""" pygments.lexers.bdd ~~~~~~~~~~~~~~~~~~~ Lexer for BDD(Behavior-driven development). More information: https://en.wikipedia.org/wiki/Behavior-driven_development :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include from pygments.token import Comment, Keyword, Name, String, Number, Text, Punctuation, Whitespace __all__ = ['BddLexer'] class BddLexer(RegexLexer): """ Lexer for BDD(Behavior-driven development), which highlights not only keywords, but also comments, punctuations, strings, numbers, and variables. .. versionadded:: 2.11 """ name = 'Bdd' aliases = ['bdd'] filenames = ['*.feature'] mimetypes = ['text/x-bdd'] step_keywords = r'Given|When|Then|Add|And|Feature|Scenario Outline|Scenario|Background|Examples|But' tokens = { 'comments': [ (r'^\s*#.*$', Comment), ], 'miscellaneous': [ (r'(<|>|\[|\]|=|\||:|\(|\)|\{|\}|,|\.|;|-|_|\$)', Punctuation), (r'((?<=\<)[^\\>]+(?=\>))', Name.Variable), (r'"([^\"]*)"', String), (r'^@\S+', Name.Label), ], 'numbers': [ (r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number), ], 'root': [ (r'\n|\s+', Whitespace), (step_keywords, Keyword), include('comments'), include('miscellaneous'), include('numbers'), (r'\S+', Text), ] } def analyse_text(self, text): return