7982:48d210e41c65 | 7983:54c5cfbb1e29 |
---|---|
3 pygments.lexers.forth | 3 pygments.lexers.forth |
4 ~~~~~~~~~~~~~~~~~~~~~ | 4 ~~~~~~~~~~~~~~~~~~~~~ |
5 | 5 |
6 Lexer for the Forth language. | 6 Lexer for the Forth language. |
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 import re | 12 import re |
13 | 13 |
168 ], | 168 ], |
169 'stringdef': [ | 169 'stringdef': [ |
170 (r'[^"]+', String, '#pop'), | 170 (r'[^"]+', String, '#pop'), |
171 ], | 171 ], |
172 } | 172 } |
173 | |
174 def analyse_text(text): | |
175 """Forth uses : COMMAND ; quite a lot in a single line, so we're trying | |
176 to find that.""" | |
177 if re.search('\n:[^\n]+;\n', text): | |
178 return 0.1 |