equal
deleted
inserted
replaced
339 val syn = Proof_Context.syn_of ctxt; |
339 val syn = Proof_Context.syn_of ctxt; |
340 val ast_tr = Syntax.parse_ast_translation syn; |
340 val ast_tr = Syntax.parse_ast_translation syn; |
341 |
341 |
342 val toks = Syntax.tokenize syn raw syms; |
342 val toks = Syntax.tokenize syn raw syms; |
343 val _ = Context_Position.reports ctxt (map Lexicon.report_of_token toks); |
343 val _ = Context_Position.reports ctxt (map Lexicon.report_of_token toks); |
344 val _ = toks |> List.app (fn tok => |
|
345 (case Lexicon.kind_of_token tok of |
|
346 Lexicon.Comment NONE => |
|
347 legacy_feature ("Old-style inner comment: use \"\<comment> \<open>...\<close>\" or \"\<^cancel>\<open>...\<close>\" instead" ^ |
|
348 Position.here (Lexicon.pos_of_token tok)) |
|
349 | _ => ())); |
|
350 |
344 |
351 val pts = Syntax.parse syn root (filter Lexicon.is_proper toks) |
345 val pts = Syntax.parse syn root (filter Lexicon.is_proper toks) |
352 handle ERROR msg => |
346 handle ERROR msg => |
353 error (msg ^ Markup.markup_report (implode (map (Lexicon.reported_token_range ctxt) toks))); |
347 error (msg ^ Markup.markup_report (implode (map (Lexicon.reported_token_range ctxt) toks))); |
354 val len = length pts; |
348 val len = length pts; |