Mercurial > urweb
comparison src/cjr_print.sml @ 2048:4d64af730e35
Differentiate between HTML and normal string literals
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 01 Aug 2014 15:44:17 -0400 |
parents | ced78ef1c82f |
children | a9159911c3ba |
comparison
equal
deleted
inserted
replaced
2047:6be31671911b | 2048:4d64af730e35 |
---|---|
201 string "==", | 201 string "==", |
202 space, | 202 space, |
203 Prim.p_t_GCC (Prim.Int n), | 203 Prim.p_t_GCC (Prim.Int n), |
204 string ")"] | 204 string ")"] |
205 | PPrim (Prim.String s) => box [string ("!strcmp(" ^ disc), | 205 | PPrim (Prim.String s) => box [string ("!strcmp(" ^ disc), |
206 string ",", | 206 string ",", |
207 space, | 207 space, |
208 Prim.p_t_GCC (Prim.String s), | 208 Prim.p_t_GCC (Prim.String s), |
209 string ")"] | 209 string ")"] |
210 | PPrim (Prim.Char ch) => box [string ("(" ^ disc), | 210 | PPrim (Prim.Char ch) => box [string ("(" ^ disc), |
211 space, | 211 space, |
212 string "==", | 212 string "==", |
213 space, | 213 space, |
214 Prim.p_t_GCC (Prim.Char ch), | 214 Prim.p_t_GCC (Prim.Char ch), |
501 | EFfiApp ("Basis", "sqlifyChannel", [(e, _)]) => [(e, Channel)] | 501 | EFfiApp ("Basis", "sqlifyChannel", [(e, _)]) => [(e, Channel)] |
502 | EFfiApp ("Basis", "sqlifyClient", [(e, _)]) => [(e, Client)] | 502 | EFfiApp ("Basis", "sqlifyClient", [(e, _)]) => [(e, Client)] |
503 | 503 |
504 | ECase (e, | 504 | ECase (e, |
505 [((PNone _, _), | 505 [((PNone _, _), |
506 (EPrim (Prim.String "NULL"), _)), | 506 (EPrim (Prim.String (_, "NULL")), _)), |
507 ((PSome (_, (PVar _, _)), _), | 507 ((PSome (_, (PVar _, _)), _), |
508 (EFfiApp (m, x, [((ERel 0, _), _)]), _))], | 508 (EFfiApp (m, x, [((ERel 0, _), _)]), _))], |
509 {disc = t, ...}) => map (fn (x, y) => (x, Nullable y)) (getPargs (EFfiApp (m, x, [(e, t)]), #2 e)) | 509 {disc = t, ...}) => map (fn (x, y) => (x, Nullable y)) (getPargs (EFfiApp (m, x, [(e, t)]), #2 e)) |
510 | 510 |
511 | ECase (e, | 511 | ECase (e, |
512 [((PCon (_, PConFfi {mod = "Basis", con = "True", ...}, _), _), | 512 [((PCon (_, PConFfi {mod = "Basis", con = "True", ...}, _), _), |
513 (EPrim (Prim.String "TRUE"), _)), | 513 (EPrim (Prim.String (_, "TRUE")), _)), |
514 ((PCon (_, PConFfi {mod = "Basis", con = "False", ...}, _), _), | 514 ((PCon (_, PConFfi {mod = "Basis", con = "False", ...}, _), _), |
515 (EPrim (Prim.String "FALSE"), _))], | 515 (EPrim (Prim.String (_, "FALSE")), _))], |
516 _) => [(e, Bool)] | 516 _) => [(e, Bool)] |
517 | 517 |
518 | _ => raise Fail "CjrPrint: getPargs" | 518 | _ => raise Fail "CjrPrint: getPargs" |
519 | 519 |
520 val notLeakies = SS.fromList ["int", "float", "char", "time", "bool", "unit", "client", "channel", | 520 val notLeakies = SS.fromList ["int", "float", "char", "time", "bool", "unit", "client", "channel", |
2216 | 2216 |
2217 case prepared of | 2217 case prepared of |
2218 NONE => #nextval (Settings.currentDbms ()) {loc = loc, | 2218 NONE => #nextval (Settings.currentDbms ()) {loc = loc, |
2219 seqE = p_exp' false false env seq, | 2219 seqE = p_exp' false false env seq, |
2220 seqName = case #1 seq of | 2220 seqName = case #1 seq of |
2221 EPrim (Prim.String s) => SOME s | 2221 EPrim (Prim.String (_, s)) => SOME s |
2222 | _ => NONE} | 2222 | _ => NONE} |
2223 | SOME {id, query} => #nextvalPrepared (Settings.currentDbms ()) {loc = loc, | 2223 | SOME {id, query} => #nextvalPrepared (Settings.currentDbms ()) {loc = loc, |
2224 id = id, | 2224 id = id, |
2225 query = query}, | 2225 query = query}, |
2226 newline, | 2226 newline, |