Hi,

On Sat 03 Jul 2010 01:32, No Itisnt <theseaisinh...@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/

Reply via email to