equal
deleted
inserted
replaced
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 |