Skip to content

Commit 6adc517

Browse files
authoredOct 31, 2022
Change char payload (#5759)
* change Pconst_char payload (WIP) * tweak * tweak * representation of char for lambda * lib * bugfix: replace wrong pp * libs * bugfix: replace wrong print * use unsafe_chr to handle possible overflow char * safe print int as char * reduce duplication * (re)use encodeCodepoint to support string_of_int_as_char * some refactor * libs * changelog
1 parent f10725b commit 6adc517

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+28927
-25690
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656

5757
- Add `loading`, `aria-*` DOM element attributes in `JsxDOM.domProps`: `ariaCurrent`, `ariaInvalid`, `ariaAutocomplete`, etc.
5858
- Change the internal representation of props for the lowercase components to record. https://github.com/rescript-lang/syntax/pull/665
59+
- Change the payload of Pconst_char for type safety. https://github.com/rescript-lang/syntax/pull/709
5960

6061
# 10.1.0-alpha.2
6162

‎jscomp/core/js_dump.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ and expression_desc cxt ~(level : int) f x : cxt =
630630
match v with
631631
| Float { f } -> Js_number.caml_float_literal_to_js_string f
632632
(* attach string here for float constant folding?*)
633-
| Int { i; c = Some c } -> Format.asprintf "/* %C */%ld" c i
633+
| Int { i; c = Some c } -> Format.asprintf "/* %s */%ld" (Ext_util.string_of_int_as_char c) i
634634
| Int { i; c = None } ->
635635
Int32.to_string i
636636
(* check , js convention with ocaml lexical convention *)

0 commit comments

Comments
 (0)