doc-src/more_antiquote.ML
changeset 34072 99eda1d59da9
parent 31794 71af1fd6a5e4
child 34896 a22b09addd78
equal deleted inserted replaced
34071:93bfbb557e2e 34072:99eda1d59da9
   124 val _ = ThyOutput.antiquotation "code_stmts"
   124 val _ = ThyOutput.antiquotation "code_stmts"
   125   (parse_const_terms -- Scan.repeat parse_names -- Scan.lift (Args.parens Args.name))
   125   (parse_const_terms -- Scan.repeat parse_names -- Scan.lift (Args.parens Args.name))
   126   (fn {context = ctxt, ...} => fn ((mk_cs, mk_stmtss), target) =>
   126   (fn {context = ctxt, ...} => fn ((mk_cs, mk_stmtss), target) =>
   127     let val thy = ProofContext.theory_of ctxt in
   127     let val thy = ProofContext.theory_of ctxt in
   128       Code_Target.code_of thy
   128       Code_Target.code_of thy
   129         target "Example" (mk_cs thy)
   129         target NONE "Example" (mk_cs thy)
   130         (fn naming => maps (fn f => f thy naming) mk_stmtss)
   130         (fn naming => maps (fn f => f thy naming) mk_stmtss)
   131       |> typewriter
   131       |> typewriter
   132     end);
   132     end);
   133 
   133 
   134 end;
   134 end;