Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/codegen/clang.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/codegen/clang.sml

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

revision 2115, Sat Jan 12 15:52:27 2013 UTC revision 2116, Thu Jan 17 14:16:39 2013 UTC
# Line 39  Line 39 
39      val double = T_Num(RawTypes.RT_Double)      val double = T_Num(RawTypes.RT_Double)
40    
41      datatype decl      datatype decl
42        = D_Comment of string list        = D_Pragma of string list
43          | D_Comment of string list
44      (* verbatim text (e.g., preprocessor directives) *)      (* verbatim text (e.g., preprocessor directives) *)
45        | D_Verbatim of string list        | D_Verbatim of string list
46      (* global variable declaration *)      (* global variable declaration *)
# Line 63  Line 64 
64      and stm      and stm
65        = S_Block of stm list             (* "{" stms "}" *)        = S_Block of stm list             (* "{" stms "}" *)
66        | S_Comment of string list        | S_Comment of string list
67          | S_Verbatim of string list
68        | S_Decl of attr list * ty * var * initializer option        | S_Decl of attr list * ty * var * initializer option
69                                          (* ty var [ '=' exp ]';' *)                                          (* ty var [ '=' exp ]';' *)
70        | S_Exp of exp                    (* exp ';' *)        | S_Exp of exp                    (* exp ';' *)
# Line 320  Line 322 
322     *)     *)
323      local      local
324        structure SS = Substring        structure SS = Substring
     in  
325      fun verbatim sl subs = let      fun verbatim sl subs = let
326            fun scan (start, ss, n, frags) = (case SS.getc ss            fun scan (start, ss, n, frags) = (case SS.getc ss
327                   of SOME(#"@", rest) => let                   of SOME(#"@", rest) => let
# Line 353  Line 354 
354                    scan (ss, ss, 0, [])                    scan (ss, ss, 0, [])
355                  end                  end
356            in            in
357              D_Verbatim(List.map expand sl)                List.map expand sl
358            end            end
359        in
360        fun verbatimDcl sl subs = D_Verbatim(verbatim sl subs)
361        fun verbatimStm sl subs = S_Verbatim(verbatim sl subs)
362      end (* local *)      end (* local *)
363    
364    (* for debugging (not syntactically correct!) *)    (* for debugging (not syntactically correct!) *)

Legend:
Removed from v.2115  
changed lines
  Added in v.2116

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