Commits

Rob Simmons committed 5bfc379

More changes to better capture StrId distinction

Comments (0)

Files changed (2)

pygments/lexers/functional.py

             # An identifier is either alphanumeric: any sequence of letters,
             # digits, primes, and underbars starting with a letter or prime...
             (r'\'[0-9a-zA-Z_\']*', Name.Decorator),
-            (r'(%s)\s*\.' % alphanums, Name.Namespace),
+            (r'(%s)\.' % alphanums, Name.Namespace),
             (r'(%s)' % alphanums, Name),
             
             # or symbolic: any non-empty sequence of the following symbols
-            (r'(%s)\s*\.' % symbols, Name.Namespace),
             (r'(%s)' % symbols, Name), 
             
             # Special constants: floats, numbers in decimal and hexadecimal

tests/examplefiles/example.sml

 (*(*(*(*(* This file is all pretty strange Standard ML *)*)*)*) (**)*)
 (* Robert J. Simmons *)
 
-signature BA_Z = sig end 
+signature BA_Z = sig 
+   val s: int
+end 
 
-structure **$*#$ = struct (* What (* A * strange * name *) for ) a ( struct *)
+structure b______ = struct (* What (* A * strange * name *) for ) a ( struct *)
 
-structure Bar :> BA_Z = struct end
-structure !%&$#+-/:<=>?@\~`^|* :> BA_Z = struct end
+val !%&$#+-/:<=>?@\~`^|* = 3
+
+structure baz = struct
+  structure Bar = struct 
+    val foo = !%&$#+-/:<=>?@\~`^|*
+  end  
+end
+
+open baz
 
 val$$$ = fn x => fn y => fn z => fn w => w
-val (foo, ++, bar, ||) = (4, 4, 5, 5)
+val (foo, ++, bar, ||) = (4, baz.Bar.foo, !%&$#+-/:<=>?@\~`^|*, Bar.foo)
 val _ = $$$foo++bar||
 
 val x : ' list = []