3 pygments.lexers.pawn |
3 pygments.lexers.pawn |
4 ~~~~~~~~~~~~~~~~~~~~ |
4 ~~~~~~~~~~~~~~~~~~~~ |
5 |
5 |
6 Lexers for the Pawn languages. |
6 Lexers for the Pawn languages. |
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 |
12 from pygments.lexer import RegexLexer |
13 from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ |
13 from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ |
195 (r'^\s*#if.*?(?<!\\)\n', Comment.Preproc, '#push'), |
195 (r'^\s*#if.*?(?<!\\)\n', Comment.Preproc, '#push'), |
196 (r'^\s*#endif.*?(?<!\\)\n', Comment.Preproc, '#pop'), |
196 (r'^\s*#endif.*?(?<!\\)\n', Comment.Preproc, '#pop'), |
197 (r'.*?\n', Comment), |
197 (r'.*?\n', Comment), |
198 ] |
198 ] |
199 } |
199 } |
|
200 |
|
201 def analyse_text(text): |
|
202 """This is basically C. There is a keyword which doesn't exist in C |
|
203 though and is nearly unique to this language.""" |
|
204 if 'tagof' in text: |
|
205 return 0.01 |