|
|
c55277 |
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py
|
|
|
c55277 |
index ee44f7c..3d6841e 100644
|
|
|
c55277 |
--- a/pygments/lexers/functional.py
|
|
|
c55277 |
+++ b/pygments/lexers/functional.py
|
|
|
c55277 |
@@ -632,7 +632,7 @@ class SMLLexer(RegexLexer):
|
|
|
c55277 |
(r'#\s+(%s)' % symbolicid_re, Name.Label),
|
|
|
c55277 |
# Some reserved words trigger a special, local lexer state change
|
|
|
c55277 |
(r'\b(datatype|abstype)\b(?!\')', Keyword.Reserved, 'dname'),
|
|
|
c55277 |
- (r'(?=\b(exception)\b(?!\'))', Text, ('ename')),
|
|
|
c55277 |
+ (r'\b(exception)\b(?!\')', Keyword.Reserved, 'ename'),
|
|
|
c55277 |
(r'\b(functor|include|open|signature|structure)\b(?!\')',
|
|
|
c55277 |
Keyword.Reserved, 'sname'),
|
|
|
c55277 |
(r'\b(type|eqtype)\b(?!\')', Keyword.Reserved, 'tname'),
|
|
|
c55277 |
@@ -803,15 +803,14 @@ class SMLLexer(RegexLexer):
|
|
|
c55277 |
'ename': [
|
|
|
c55277 |
include('whitespace'),
|
|
|
c55277 |
|
|
|
c55277 |
- (r'(exception|and)\b(\s+)(%s)' % alphanumid_re,
|
|
|
c55277 |
+ (r'(and\b)(\s+)(%s)' % alphanumid_re,
|
|
|
c55277 |
bygroups(Keyword.Reserved, Text, Name.Class)),
|
|
|
c55277 |
- (r'(exception|and)\b(\s*)(%s)' % symbolicid_re,
|
|
|
c55277 |
+ (r'(and\b)(\s*)(%s)' % symbolicid_re,
|
|
|
c55277 |
bygroups(Keyword.Reserved, Text, Name.Class)),
|
|
|
c55277 |
(r'\b(of)\b(?!\')', Keyword.Reserved),
|
|
|
c55277 |
+ (r'(%s)|(%s)' % (alphanumid_re, symbolicid_re), Name.Class),
|
|
|
c55277 |
|
|
|
c55277 |
- include('breakout'),
|
|
|
c55277 |
- include('core'),
|
|
|
c55277 |
- (r'\S+', Error),
|
|
|
c55277 |
+ ('', Text, '#pop'),
|
|
|
c55277 |
],
|
|
|
c55277 |
|
|
|
c55277 |
'datcon': [
|