src/Pure/ML/ml_context.ML
changeset 27755 f7cdde18aeb3
parent 27723 ce8f79b91ed1
child 27771 98499933a50f
equal deleted inserted replaced
27754:36df922b82d4 27755:f7cdde18aeb3
   136 
   136 
   137           val lex = #1 (OuterKeyword.get_lexicons ());
   137           val lex = #1 (OuterKeyword.get_lexicons ());
   138           fun no_decl _ = ("", "");
   138           fun no_decl _ = ("", "");
   139 
   139 
   140           fun expand (Antiquote.Text s) state = (K ("", Symbol.escape s), state)
   140           fun expand (Antiquote.Text s) state = (K ("", Symbol.escape s), state)
   141             | expand (Antiquote.Antiq x) (scope, background) =
   141             | expand (Antiquote.Antiq (x, _)) (scope, background) =
   142                 let
   142                 let
   143                   val context = Stack.top scope;
   143                   val context = Stack.top scope;
   144                   val (f, context') = antiquotation (Antiquote.scan_arguments lex antiq x) context;
   144                   val (f, context') = antiquotation (Antiquote.scan_arguments lex antiq x) context;
   145                   val (decl, background') = f {background = background, struct_name = struct_name};
   145                   val (decl, background') = f {background = background, struct_name = struct_name};
   146                 in (decl, (Stack.map_top (K context') scope, background')) end
   146                 in (decl, (Stack.map_top (K context') scope, background')) end