Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /smlnj-lib/trunk/JSON/json.lex
ViewVC logotype

Diff of /smlnj-lib/trunk/JSON/json.lex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3003, Wed Apr 23 13:32:55 2008 UTC revision 3004, Wed Apr 23 21:58:57 2008 UTC
# Line 17  Line 17 
17  (* support for incremental construction of strings *)  (* support for incremental construction of strings *)
18    val sbuf : string list ref = ref []    val sbuf : string list ref = ref []
19    fun addStr s = sbuf := s :: !sbuf    fun addStr s = sbuf := s :: !sbuf
20      fun addUChr lit = let
21          (* trim the "\u" prefix *)
22            val digits = Substring.triml 2 (Substring.full lit)
23            val SOME(w, _) = Word.scan StringCvt.HEX Substring.getc digits
24            in
25              addStr(UTF8.encode w)
26            end
27    fun finishString () = (String.concat(List.rev(!sbuf)) before sbuf := [])    fun finishString () = (String.concat(List.rev(!sbuf)) before sbuf := [])
28  );  );
29    

Legend:
Removed from v.3003  
changed lines
  Added in v.3004

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0