File tree 6 files changed +4
-69
lines changed
6 files changed +4
-69
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,6 @@ module P = struct
458
458
| Ppat_extension x -> extension ~loc ~attrs (sub.extension sub x)
459
459
end
460
460
461
-
462
461
(* Now, a generic AST mapper, to be extended to cover all kinds and
463
462
cases of the OCaml grammar. The default behavior of the mapper is
464
463
the identity. *)
Original file line number Diff line number Diff line change @@ -313,34 +313,6 @@ module Ctf = struct
313
313
314
314
end
315
315
316
- module Cf = struct
317
- let mk ?(loc = ! default_loc) ?(attrs = [] )
318
- ?(docs = empty_docs) d =
319
- {
320
- pcf_desc = d;
321
- pcf_loc = loc;
322
- pcf_attributes = add_docs_attrs docs attrs;
323
- }
324
-
325
-
326
- let val_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcf_val (a, b, c))
327
- let method_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcf_method (a, b, c))
328
- let constraint_ ?loc ?attrs a b = mk ?loc ?attrs (Pcf_constraint (a, b))
329
- let initializer_ ?loc ?attrs a = mk ?loc ?attrs (Pcf_initializer a)
330
- let extension ?loc ?attrs a = mk ?loc ?attrs (Pcf_extension a)
331
- let attribute ?loc a = mk ?loc (Pcf_attribute a)
332
- let text txt =
333
- let f_txt = Ext_list. filter txt (fun ds -> docstring_body ds <> " " )in
334
- List. map
335
- (fun ds -> attribute ~loc: (docstring_loc ds) (text_attr ds))
336
- f_txt
337
-
338
- let virtual_ ct = Cfk_virtual ct
339
- let concrete o e = Cfk_concrete (o, e)
340
-
341
- let attr d a = {d with pcf_attributes = d.pcf_attributes @ [a]}
342
-
343
- end
344
316
345
317
module Val = struct
346
318
let mk ?(loc = ! default_loc) ?(attrs = [] ) ?(docs = empty_docs)
Original file line number Diff line number Diff line change @@ -370,29 +370,6 @@ module Ctf:
370
370
val text : text -> class_type_field list
371
371
end
372
372
373
- (* * Class fields *)
374
- module Cf :
375
- sig
376
- val mk : ?loc : loc -> ?attrs : attrs -> ?docs : docs -> class_field_desc ->
377
- class_field
378
- val attr : class_field -> attribute -> class_field
379
-
380
- val val_ : ?loc : loc -> ?attrs : attrs -> str -> mutable_flag ->
381
- class_field_kind -> class_field
382
- val method_ : ?loc : loc -> ?attrs : attrs -> str -> private_flag ->
383
- class_field_kind -> class_field
384
- val constraint_ : ?loc : loc -> ?attrs : attrs -> core_type -> core_type ->
385
- class_field
386
- val initializer_ : ?loc : loc -> ?attrs : attrs -> expression -> class_field
387
- val extension : ?loc : loc -> ?attrs : attrs -> extension -> class_field
388
- val attribute : ?loc : loc -> attribute -> class_field
389
- val text : text -> class_field list
390
-
391
- val virtual_ : core_type -> class_field_kind
392
- val concrete : override_flag -> expression -> class_field_kind
393
-
394
- end
395
-
396
373
(* * Classes *)
397
374
module Ci :
398
375
sig
Original file line number Diff line number Diff line change @@ -139,8 +139,7 @@ let mkstr d = Str.mk ~loc:(symbol_rloc()) d
139
139
let mkcty ?attrs d = Cty.mk ~loc:(symbol_rloc()) ?attrs d
140
140
let mkctf ?attrs ?docs d =
141
141
Ctf.mk ~loc:(symbol_rloc()) ?attrs ?docs d
142
- let mkcf ?attrs ?docs d =
143
- Cf.mk ~loc:(symbol_rloc()) ?attrs ?docs d
142
+ let mkcf ?attrs ?docs _d = let _ = (attrs, docs) in assert false
144
143
145
144
let mkrhs rhs pos = mkloc rhs (rhs_loc pos)
146
145
@@ -346,7 +345,7 @@ let mksig_ext d ext =
346
345
347
346
let text_str pos = Str.text (rhs_text pos)
348
347
let text_sig pos = Sig.text (rhs_text pos)
349
- let text_cstr pos = Cf.text (rhs_text pos)
348
+ let text_cstr _pos = assert false
350
349
let text_csig pos = Ctf.text (rhs_text pos)
351
350
352
351
Original file line number Diff line number Diff line change @@ -33,8 +33,7 @@ let mkstr d = Str.mk ~loc:(symbol_rloc()) d
33
33
let mkcty ?attrs d = Cty. mk ~loc: (symbol_rloc() ) ?attrs d
34
34
let mkctf ?attrs ?docs d =
35
35
Ctf. mk ~loc: (symbol_rloc() ) ?attrs ?docs d
36
- let mkcf ?attrs ?docs d =
37
- Cf. mk ~loc: (symbol_rloc() ) ?attrs ?docs d
36
+ let mkcf ?attrs ?docs d = assert false
38
37
39
38
let mkrhs rhs pos = mkloc rhs (rhs_loc pos)
40
39
@@ -240,7 +239,7 @@ let mksig_ext d ext =
240
239
241
240
let text_str pos = Str. text (rhs_text pos)
242
241
let text_sig pos = Sig. text (rhs_text pos)
243
- let text_cstr pos = Cf. text (rhs_text pos)
242
+ let text_cstr pos = assert false
244
243
let text_csig pos = Ctf. text (rhs_text pos)
245
244
246
245
Original file line number Diff line number Diff line change @@ -564,17 +564,6 @@ and class_type_declaration = class_type class_infos
564
564
(* Value expressions for the class language *)
565
565
566
566
567
- (* object(selfpat) ... end
568
- object ... end (self = Ppat_any)
569
- *)
570
-
571
- and class_field =
572
- {
573
- pcf_desc : class_field_desc ;
574
- pcf_loc : Location .t ;
575
- pcf_attributes : attributes ; (* ... [@@id1] [@@id2] *)
576
- }
577
-
578
567
and class_field_desc =
579
568
| Pcf_inherit of unit
580
569
(* inherit CE
You can’t perform that action at this time.
0 commit comments