comparison src/mono_opt.sml @ 1467:8fce85939259

Fix bug with string literals in unAs
author Adam Chlipala <adam@chlipala.net>
date Mon, 30 May 2011 09:31:50 -0400
parents 2f5fd248588d
children 0577be31a435
comparison
equal deleted inserted replaced
1466:e2d7bd41f527 1467:8fce85939259
100 fun unAs s = 100 fun unAs s =
101 let 101 let
102 fun doChars (cs, acc) = 102 fun doChars (cs, acc) =
103 case cs of 103 case cs of
104 #"T" :: #"_" :: #"T" :: #"." :: cs => doChars (cs, acc) 104 #"T" :: #"_" :: #"T" :: #"." :: cs => doChars (cs, acc)
105 | #"'" :: cs => doString (cs, acc) 105 | #"'" :: cs => doString (cs, #"'" :: acc)
106 | ch :: cs => doChars (cs, ch :: acc) 106 | ch :: cs => doChars (cs, ch :: acc)
107 | [] => String.implode (rev acc) 107 | [] => String.implode (rev acc)
108 108
109 and doString (cs, acc) = 109 and doString (cs, acc) =
110 case cs of 110 case cs of