3 pygments.lexers.varnish |
3 pygments.lexers.varnish |
4 ~~~~~~~~~~~~~~~~~~~~~~~ |
4 ~~~~~~~~~~~~~~~~~~~~~~~ |
5 |
5 |
6 Lexers for Varnish configuration |
6 Lexers for Varnish configuration |
7 |
7 |
8 :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. |
8 :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. |
9 :license: BSD, see LICENSE for details. |
9 :license: BSD, see LICENSE for details. |
10 """ |
10 """ |
11 |
11 |
12 from pygments.lexer import RegexLexer, include, bygroups, using, this, \ |
12 from pygments.lexer import RegexLexer, include, bygroups, using, this, \ |
13 inherit, words |
13 inherit, words |
59 include('whitespace'), |
59 include('whitespace'), |
60 (r'(\.probe)(\s*=\s*)(\w+)(;)', |
60 (r'(\.probe)(\s*=\s*)(\w+)(;)', |
61 bygroups(Name.Attribute, Operator, Name.Variable.Global, Punctuation)), |
61 bygroups(Name.Attribute, Operator, Name.Variable.Global, Punctuation)), |
62 (r'(\.probe)(\s*=\s*)(\{)', |
62 (r'(\.probe)(\s*=\s*)(\{)', |
63 bygroups(Name.Attribute, Operator, Punctuation), 'probe'), |
63 bygroups(Name.Attribute, Operator, Punctuation), 'probe'), |
64 (r'(\.\w+\b)(\s*=\s*)([^;]*)(\s*;)', |
64 (r'(\.\w+\b)(\s*=\s*)([^;\s]*)(\s*;)', |
65 bygroups(Name.Attribute, Operator, using(this), Punctuation)), |
65 bygroups(Name.Attribute, Operator, using(this), Punctuation)), |
66 (r'\{', Punctuation, '#push'), |
66 (r'\{', Punctuation, '#push'), |
67 (r'\}', Punctuation, '#pop'), |
67 (r'\}', Punctuation, '#pop'), |
68 ], |
68 ], |
69 'statements': [ |
69 'statements': [ |