From: Andy Wingo <wingo@pobox.com>
To: No Itisnt <theseaisinhere@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: [PATCH] Allow printing of malformed tree-il
Date: Thu, 08 Jul 2010 11:16:45 +0100 [thread overview]
Message-ID: <m3tyoas2gi.fsf@unquote.localdomain> (raw)
In-Reply-To: <AANLkTiluPuTObi4V9wPnkWgad64JLBD0aQj9KbD-XXDW@mail.gmail.com> (No Itisnt's message of "Fri, 2 Jul 2010 19:32:07 -0500")
Hi,
On Sat 03 Jul 2010 01:32, No Itisnt <theseaisinhere@gmail.com> writes:
> I've noticed while renovating my parser that it's pretty common for
> unwanted values to weasel their way into tree-il. This patch adds an
> optional else clause to unparse-tree-il, so when it's told to be
> permissive, it will allow non-tree-il values through without error, so
> as not to cause errors while printing errors etc.
Looks good; a couple of comments inline. If you want to kill trailing
whitespace, though, please do that as a separate commit, without any
functional changes
> -(define (unparse-tree-il tree-il)
> +(define* (unparse-tree-il tree-il #:optional (permissive? #f))
#f is the default value, there is no need to mention it explicitly.
> + (else
> + (if permissive?
> + tree-il
> + (error "unhandled record in tree-il" tree-il)))
> + ))
Here we should produce a warning, I think, even if we are
"permissive". Also please move the trailing parens to the previous
line.
Feel free to push when you have made these changes.
Cheers,
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2010-07-08 10:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-03 0:32 [PATCH] Allow printing of malformed tree-il No Itisnt
2010-07-08 10:16 ` Andy Wingo [this message]
2010-07-09 6:23 ` No Itisnt
2010-07-17 12:11 ` Andy Wingo
2010-07-17 19:25 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3tyoas2gi.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=theseaisinhere@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).