diff options
Diffstat (limited to 'pygments/lexers/unicon.py')
-rw-r--r-- | pygments/lexers/unicon.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pygments/lexers/unicon.py b/pygments/lexers/unicon.py index 45b4c15a..95815907 100644 --- a/pygments/lexers/unicon.py +++ b/pygments/lexers/unicon.py @@ -387,7 +387,8 @@ class UcodeLexer(RegexLexer): } def analyse_text(text): - """endsuspend and endrepeat are unique to this language.""" + """endsuspend and endrepeat are unique to this language, and + \\self, /self doesn't seem to get used anywhere else either.""" result = 0 if 'endsuspend' in text: @@ -402,4 +403,10 @@ class UcodeLexer(RegexLexer): if 'procedure' in text and 'end' in text: result += 0.01 + # This seems quite unique to unicon -- doesn't appear in any other + # example source we have (A quick search reveals that \SELF appears in + # Perl/Raku code) + if r'\self' in text and r'/self' in text: + result += 0.5 + return result |