[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with trailing comment in repl

From: Noah Lavine
Subject: Re: problem with trailing comment in repl
Date: Sun, 13 Feb 2011 16:27:16 -0500

The attached patch does it. I almost hate to commit it because it's
such a hack, but this is from my last Guile session:

scheme@(guile-user)> 'foo
$2 = foo
scheme@(guile-user)> 'foo ; hi there!
$3 = foo
scheme@(guile-user)> ; why, hello!
scheme@(guile-user)> ,q


On Sun, Feb 13, 2011 at 2:19 PM, Andy Wingo <address@hidden> wrote:
> Hi Noah,
> I think it makes sense to have a reader that actually returns comments.
> That, to me, is the general solution: the REPL reader just treats a
> comment as whitespace.
> On Sun 13 Feb 2011 16:22, Noah Lavine <address@hidden> writes:
>> - The quicker way: if the language in use is scheme, change the
>> next-char function (repl.scm line 205) to know about comments, so that
>> if it saw a semicolon, it would snarf everything until the end of the
>> line.
> Nasty, but a good idea I think!  Care to submit a patch? :)
> Andy
> --

Attachment: 0001-Show-prompts-after-a-comment-in-the-REPL.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]