summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/lexers/functional.py1
-rw-r--r--tests/examplefiles/example.sml11
2 files changed, 10 insertions, 2 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py
index cb783991..dcbec7e9 100644
--- a/pygments/lexers/functional.py
+++ b/pygments/lexers/functional.py
@@ -641,6 +641,7 @@ class SMLLexer(RegexLexer):
'dotted': [
(r'(%s)(\.)' % alphanumid_re, long_id_callback),
(r'(%s)' % alphanumid_re, end_id_callback, "#pop"),
+ (r'(%s)' % symbolicid_re, end_id_callback, "#pop"),
(r'\s+', Error),
(r'\S+', Error),
],
diff --git a/tests/examplefiles/example.sml b/tests/examplefiles/example.sml
index bee45985..31db47d2 100644
--- a/tests/examplefiles/example.sml
+++ b/tests/examplefiles/example.sml
@@ -1,3 +1,8 @@
+structure C = struct
+ val a = 12
+ fun f x = x + 5
+end
+
(*(*(*(*(* This file is all pretty strange Standard ML *)*)*)*) (**)*)
(* Robert J. Simmons *)
@@ -6,7 +11,7 @@ structure S = struct
val x = (1, 2, "three")
end
-structure S = struct
+structure Sv = struct
(* These look good *)
val x = (1, 2, "three")
val z = #2 x
@@ -16,6 +21,8 @@ structure S = struct
val x = {1 = 1, 3 = "three", 2 = 2}
val z = #
2 x
+
+ val || = 12
end
signature S = sig end
@@ -84,7 +91,7 @@ val z = #4 w
val z = # ##= w
fun f x y 0 = 4
- | f x y z = 4
+ | f x y z = 4 + Sv.||
exception Foo of int
datatype ('0, 'b, '_, ') f'o'o = Bar | baZ12' | dsfa_fad | #@$ | Bug