Opened 15 years ago
Closed 15 years ago
#192 closed defect (fixed)
Only the last clause in COND may be an ELSE clause
Reported by: | Jim Ursetto | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.5.0 |
Component: | compiler | Version: | |
Keywords: | Cc: | ||
Estimated difficulty: |
Description
And patch 0001 will throw a syntax error if additional clauses are found.
Patch 0002 removes an extraneous character in wiki2html.scm, which is now illegal after patch 0001.
Attachments (2)
Change History (5)
Changed 15 years ago by
Attachment: | 0001-Only-the-last-clause-in-COND-may-be-an-ELSE-clause.patch added |
---|
Changed 15 years ago by
Attachment: | 0002-Remove-extraneous-char-in-scripts-wiki2html.scm.patch added |
---|
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
I think multiple else
clauses should be allowed which makes it easier to provide default clauses in macros that expand to cond
or case
. But I have added checks in cond
, case
, and select
that will issue a warning when a non-else clause follows an else-clause and all clauses are checked for being syntactically correct (formerly the clauses after the first else
were just dropped). Perhaps that is an acceptable compromise. If yes, please close the ticket.
See commit b9d091df90f6092573eaf36c22436daa7ef2085f (experimental)
comment:3 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This sounds like a great solution.
Thanks for the patches. The latter will be committed in a short while, the former... I'm not sure. It can be convenient for macros to have the option to provide a default
else
clause, without having to worry about previous occurrences.