]> git.draconx.ca Git - cdecl99.git/commitdiff
libcdecl: Remove "too many parentheses" error check.
authorNick Bowler <nbowler@draconx.ca>
Thu, 6 Jul 2023 05:59:43 +0000 (01:59 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 7 Jul 2023 00:26:24 +0000 (20:26 -0400)
It is simply not the case that "int ((int))" is invalid.

Since "int (x(int))" declares x as a function returning int, it follows
that "int ((int))" is simply a type name for function returning int.
Likewise, "int (((int)))" is equivalent, etc.

Rejecting these type names is longstanding broken behaviour.  I think
the entire error check can simply be deleted outright, along with its
associated error message.  The bogus negative test cases are replaced
with new positive tests.

Furthermore, rewrite the big comment that suggests this was reasonable
behaviour, replacing it with a (hopefully) better explanation that
covers how this particular case should be interpreted.


No differences found