src/Pure/Syntax/syntax_phases.ML
changeset 56002 2028467b4df4
parent 55979 06cb126f30ba
child 56241 029246729dc0
equal deleted inserted replaced
56001:2df1e7bca361 56002:2028467b4df4
   169           in [Ast.Constant (Lexicon.mark_class c)] end
   169           in [Ast.Constant (Lexicon.mark_class c)] end
   170       | asts_of (Parser.Node ("_type_name", [Parser.Tip tok])) =
   170       | asts_of (Parser.Node ("_type_name", [Parser.Tip tok])) =
   171           let
   171           let
   172             val pos = Lexicon.pos_of_token tok;
   172             val pos = Lexicon.pos_of_token tok;
   173             val (Type (c, _), rs) =
   173             val (Type (c, _), rs) =
   174               Proof_Context.check_type_name ctxt {proper = true, strict = false}
   174               Proof_Context.check_type_name {proper = true, strict = false} ctxt
   175                 (Lexicon.str_of_token tok, pos);
   175                 (Lexicon.str_of_token tok, pos);
   176             val _ = append_reports rs;
   176             val _ = append_reports rs;
   177           in [Ast.Constant (Lexicon.mark_type c)] end
   177           in [Ast.Constant (Lexicon.mark_type c)] end
   178       | asts_of (Parser.Node ("_position", [Parser.Tip tok])) = asts_of_position "_constrain" tok
   178       | asts_of (Parser.Node ("_position", [Parser.Tip tok])) = asts_of_position "_constrain" tok
   179       | asts_of (Parser.Node ("_position_sort", [Parser.Tip tok])) = asts_of_position "_ofsort" tok
   179       | asts_of (Parser.Node ("_position_sort", [Parser.Tip tok])) = asts_of_position "_ofsort" tok
   223 (* decode_term -- transform parse tree into raw term *)
   223 (* decode_term -- transform parse tree into raw term *)
   224 
   224 
   225 fun decode_const ctxt (c, ps) =
   225 fun decode_const ctxt (c, ps) =
   226   let
   226   let
   227     val (Const (c', _), reports) =
   227     val (Const (c', _), reports) =
   228       Proof_Context.check_const ctxt {proper = true, strict = false} (c, ps);
   228       Proof_Context.check_const {proper = true, strict = false} ctxt (c, ps);
   229   in (c', reports) end;
   229   in (c', reports) end;
   230 
   230 
   231 local
   231 local
   232 
   232 
   233 fun get_free ctxt x =
   233 fun get_free ctxt x =