summaryrefslogtreecommitdiff
path: root/pygments/lexers/jvm.py
diff options
context:
space:
mode:
authorDavid Corbett <corbett.dav@husky.neu.edu>2014-05-10 15:53:24 -0400
committerDavid Corbett <corbett.dav@husky.neu.edu>2014-05-10 15:53:24 -0400
commit191a42e86e634f0822fba3bf30eef185adf4dc7b (patch)
tree7866da4e9a957cd0294d8db9b42b0f11ca6db366 /pygments/lexers/jvm.py
parent98735c0c34662f580f9795978e800664a528ea2a (diff)
downloadpygments-191a42e86e634f0822fba3bf30eef185adf4dc7b.tar.gz
Add JasminLexer.analyse_text
Objective-J uses `@import` and Jasmin uses `.class`, so they are easy to tell apart.
Diffstat (limited to 'pygments/lexers/jvm.py')
-rw-r--r--pygments/lexers/jvm.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py
index 06dcc81b..0e7e1b42 100644
--- a/pygments/lexers/jvm.py
+++ b/pygments/lexers/jvm.py
@@ -1506,3 +1506,5 @@ class JasminLexer(RegexLexer):
]
}
+ def analyse_text(text):
+ return bool(re.search(r'^\s*\.class\s', text, re.MULTILINE))