diff options
Diffstat (limited to 'pygments/lexers/jvm.py')
-rw-r--r-- | pygments/lexers/jvm.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py index 0e7e1b42..f0fe6a50 100644 --- a/pygments/lexers/jvm.py +++ b/pygments/lexers/jvm.py @@ -1507,4 +1507,12 @@ class JasminLexer(RegexLexer): } def analyse_text(text): - return bool(re.search(r'^\s*\.class\s', text, re.MULTILINE)) + if not re.search(r'^\s*\.class\s', text, re.MULTILINE): + return 0 + if re.search(r'^\s*\.(attribute|bytecode|debug|deprecated|enclosing|' + r'inner|interface|limit|set|signature|stack)\b', text, + re.MULTILINE): + return 1 + if re.search(r'^\s*[a-z]+_[a-z]+\b', text, re.MULTILINE): + return 0.8 + return 0.5 |