[m-rev.] for review: Add web browser-based term browsing in the debugger.
jfischer at opturion.com
Tue Aug 15 17:08:52 AEST 2017
On Tue, 15 Aug 2017, Peter Wang wrote:
> On Tue, 15 Aug 2017 15:04:55 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
>> Hi Peter,
>> On Tue, 15 Aug 2017, Peter Wang wrote:
>>> I am considering removing the browse --xml command.
>>> Does it still work,
>> Presumably. (I don't have any objections to removing it however.)
> The xsltproc command fails for me (and I don't know how to fix it).
> Also, I thought XUL was being deprecated, but perhaps that doesn't mean
> what I think it means.
Ask Paul, he works for Mozilla now. (FWIW, so did I.)
>>> +:- pred put_unicode_escape(io.output_stream::in, char::in,
>>> + io::di, io::uo) is det.
>>> +put_unicode_escape(Stream, Char, !State) :-
>>> + CodePoint = char.to_int(Char),
>>> + ( if CodePoint > 0xFFFF then
>>> + code_point_to_utf16_surrogates(CodePoint, LS, TS),
>>> + put_hex_digits(Stream, LS, !State),
>>> + put_hex_digits(Stream, TS, !State)
>>> + else
>>> + put_hex_digits(Stream, CodePoint, !State)
>>> + ).
>>> +:- pred code_point_to_utf16_surrogates(int::in, int::out, int::out) is det.
>>> +code_point_to_utf16_surrogates(CodePoint, LS, TS) :-
>>> + AdjustedCodePoint = CodePoint - 0x10000,
>>> + LS = 0xD800 + (AdjustedCodePoint >> 10),
>>> + TS = 0xDC00 + (AdjustedCodePoint /\ 0x3FF).
>> Do we not provide this predicate (or the equivalent) in the standard
> Yes, char.to_utf16.
I guess the disadvantage of the library version is that it returns a
list; which is not so helpful if you know the the code point is above
0xffff (as here).
More information about the reviews