summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/lexers/_mapping.py1
-rw-r--r--pygments/lexers/other.py15
-rw-r--r--tests/examplefiles/hello.lsl12
3 files changed, 18 insertions, 10 deletions
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py
index d07ed279..7c753caa 100644
--- a/pygments/lexers/_mapping.py
+++ b/pygments/lexers/_mapping.py
@@ -174,6 +174,7 @@ LEXERS = {
'KconfigLexer': ('pygments.lexers.other', 'Kconfig', ('kconfig', 'menuconfig', 'linux-config', 'kernel-config'), ('Kconfig', '*Config.in*', 'external.in*', 'standard-modules.in'), ('text/x-kconfig',)),
'KokaLexer': ('pygments.lexers.functional', 'Koka', ('koka',), ('*.kk', '*.kki'), ('text/x-koka',)),
'KotlinLexer': ('pygments.lexers.jvm', 'Kotlin', ('kotlin',), ('*.kt',), ('text/x-kotlin',)),
+ 'LSLLexer': ('pygments.lexers.other', 'LSL', ('lsl',), ('*.lsl',), ('text/x-lsl',)),
'LassoCssLexer': ('pygments.lexers.templates', 'CSS+Lasso', ('css+lasso',), (), ('text/css+lasso',)),
'LassoHtmlLexer': ('pygments.lexers.templates', 'HTML+Lasso', ('html+lasso',), (), ('text/html+lasso', 'application/x-httpd-lasso', 'application/x-httpd-lasso[89]')),
'LassoJavascriptLexer': ('pygments.lexers.templates', 'JavaScript+Lasso', ('js+lasso', 'javascript+lasso'), (), ('application/x-javascript+lasso', 'text/x-javascript+lasso', 'text/javascript+lasso')),
diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py
index 4e7e956c..a538a5bd 100644
--- a/pygments/lexers/other.py
+++ b/pygments/lexers/other.py
@@ -46,15 +46,9 @@ class LSLLexer(RegexLexer):
"""
name = 'LSL'
- aliases = [
- 'lsl',
- 'Linden Scripting Language',
- 'Linden Script',
- 'Second Life']
- filenames = [
- '*.lsl']
- mimetypes = [
- 'text/x-lsl']
+ aliases = ['lsl']
+ filenames = ['*.lsl']
+ mimetypes = ['text/x-lsl']
flags = re.MULTILINE
@@ -122,7 +116,8 @@ class LSLLexer(RegexLexer):
[
(r'\\([nt"\\])', String.Escape),
(r'"', String.Double, '#pop'),
- (r'\\.', Error)
+ (r'\\.', Error),
+ (r'[^"\\]+', String.Double),
]
}
diff --git a/tests/examplefiles/hello.lsl b/tests/examplefiles/hello.lsl
new file mode 100644
index 00000000..61697e7f
--- /dev/null
+++ b/tests/examplefiles/hello.lsl
@@ -0,0 +1,12 @@
+default
+{
+ state_entry()
+ {
+ llSay(0, "Hello, Avatar!");
+ }
+
+ touch_start(integer total_number)
+ {
+ llSay(0, "Touched.");
+ }
+}