[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Allow printing of malformed tree-il
From: |
Andy Wingo |
Subject: |
Re: [PATCH] Allow printing of malformed tree-il |
Date: |
Thu, 08 Jul 2010 11:16:45 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Hi,
On Sat 03 Jul 2010 01:32, No Itisnt <address@hidden> 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/