[m-rev.] for review: Add web browser-based term browsing in the debugger.
Peter Wang
novalazy at gmail.com
Tue Aug 15 16:41:52 AEST 2017
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.
> > scripts/32px.png:
> > scripts/40px.png:
> > scripts/throbber.gif:
> > scripts/jstree.min.js:
> > scripts/jstree.style.min.css:
> > Add local copy of jstree files <https://www.jstree.com/>
> >
> > scripts/jquery.slim.min.js:
> > Add local copy of jquery <https://jquery.com/>
>
> Mention the above in the README file (in the bit where we list other
> third party components and their licenses).
Done. Should we move all the licensing information into a separate
LICENSE file? It's getting quite long.
> > new file mode 100644
> > index 0000000..ff679c3
> > --- /dev/null
> > +++ b/browser/term_to_html.m
> > @@ -0,0 +1,427 @@
> > +%---------------------------------------------------------------------------%
>
> ...
>
> > +:- pred char_is_ascii(char::in) is semidet.
> > +
> > +char_is_ascii(Char) :-
> > + Code = char.to_int(Char),
> > + Code >= 0x00,
> > + Code =< 0x7f.
>
> That is arguably worth having in the char module.
I've added it.
> > +:- 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
> library?
Yes, char.to_utf16.
> > diff --git a/doc/user_guide.texi b/doc/user_guide.texi
> > index a067e1d..97b515d 100644
> > --- a/doc/user_guide.texi
> > +++ b/doc/user_guide.texi
> > @@ -3013,8 +3013,8 @@ and @samp{-v} or @samp{--verbose} specify the format to use for printing.
> > @c The options @samp{-f} or @samp{--flat}, @samp{-p} or @samp{--pretty},
> > @c and @samp{-v} or @samp{--verbose} specify the format to use for printing.
> > @sp 1
> > - at item browse [-fpvx] @var{name}[@var{termpath}]
> > - at itemx browse [-fpvx] @var{num}[@var{termpath}]
> > + at item browse [-fpvxw] @var{name}[@var{termpath}]
> > + at itemx browse [-fpvxw] @var{num}[@var{termpath}]
> > @kindex browse (mdb command)
> > Invokes an interactive term browser to browse
> > the value of the variable in the current environment
> > @@ -3034,13 +3034,15 @@ variable to an XML file and then invoke an XML browser on the file.
> > The XML filename as well as the command to invoke the XML browser can
> > be set using the @samp{set} command. See the documentation for @samp{set}
> > for more details.
> > +The @samp{-w} or @samp{--web} option tells mdb to dump the value of the
> > +variable to an HTML file and then invoke a web browser on the file.
>
> ... on that file.
>
> (And similarly below.)
>
Done, thanks.
Peter
More information about the reviews
mailing list