187 |
187 |
188 fun asts_of_position c tok = |
188 fun asts_of_position c tok = |
189 [Ast.Appl [Ast.Constant c, ast_of (Parser.Tip tok), ast_of_position tok]] |
189 [Ast.Appl [Ast.Constant c, ast_of (Parser.Tip tok), ast_of_position tok]] |
190 |
190 |
191 and asts_of (Parser.Markup ({markup, range = (pos, _), ...}, pts)) = |
191 and asts_of (Parser.Markup ({markup, range = (pos, _), ...}, pts)) = |
192 (append_reports (map (pair pos) markup); maps asts_of pts) |
192 let |
|
193 val asts = maps asts_of pts; |
|
194 val _ = append_reports (map (pair pos) markup); |
|
195 in asts end |
193 | asts_of (Parser.Node ({const = "", ...}, pts)) = maps asts_of pts |
196 | asts_of (Parser.Node ({const = "", ...}, pts)) = maps asts_of pts |
194 | asts_of (Parser.Node ({const = "_class_name", ...}, [Parser.Tip tok])) = |
197 | asts_of (Parser.Node ({const = "_class_name", ...}, [Parser.Tip tok])) = |
195 let |
198 let |
196 val pos = report_pos tok; |
199 val pos = report_pos tok; |
197 val (c, rs) = Proof_Context.check_class ctxt (Lexicon.str_of_token tok, pos); |
200 val (c, rs) = Proof_Context.check_class ctxt (Lexicon.str_of_token tok, pos); |