File tree Expand file tree Collapse file tree 4 files changed +12
-0
lines changed
testsuite/tests/language-extensions Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -52,3 +52,8 @@ val payload: Format.formatter -> Parsetree.payload -> unit
52
52
53
53
val class_signature : Format .formatter -> Parsetree .class_signature -> unit
54
54
val type_declaration : Format .formatter -> Parsetree .type_declaration -> unit
55
+
56
+ val tyvar : Format .formatter -> string -> unit
57
+ (* * Print a type variable name as a valid identifier, taking care of the
58
+ special treatment required for the single quote character in second
59
+ position, or for keywords by escaping them with \#. No-op on "_". *)
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ module Example = struct
74
74
; ptype_attributes = []
75
75
; ptype_loc = loc
76
76
}
77
+ let tyvar = " no_tyvars_require_extensions"
77
78
end
78
79
79
80
let print_test_header name =
@@ -144,6 +145,8 @@ end = struct
144
145
145
146
let string_of_expression = test_string_of " string_of_expression" string_of_expression Example. expression
146
147
let string_of_structure = test_string_of " string_of_structure" string_of_structure Example. structure
148
+
149
+ let tyvar = test " tyvar" tyvar Example. tyvar
147
150
end
148
151
149
152
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ string_of_expression: [x for x = 1 to 10]
51
51
52
52
string_of_structure: include functor F
53
53
54
+ tyvar: 'no_tyvars_require_extensions
55
+
54
56
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
55
57
56
58
##### Extensions disallowed
@@ -106,6 +108,8 @@ string_of_expression: [x for x = 1 to 10]
106
108
107
109
string_of_structure: include functor F
108
110
111
+ tyvar: 'no_tyvars_require_extensions
112
+
109
113
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
110
114
111
115
##### Calling [Language_extension.For_pprintast.make_printer_exporter ()]
You can’t perform that action at this time.
0 commit comments