]> git.draconx.ca Git - cdecl99.git/commit
libcdecl: Parse function parameters in order.
authorNick Bowler <nbowler@draconx.ca>
Thu, 20 Jul 2023 00:52:21 +0000 (20:52 -0400)
committerNick Bowler <nbowler@draconx.ca>
Thu, 20 Jul 2023 00:52:21 +0000 (20:52 -0400)
commite6c78ce32d1f4d737c0fe52661d8f5d56abe879d
tree2e8e7f387a72667e38fc867ab66d0df199f3882e
parent5383a8b913e74ebe5faa39ef3e570afb95779141
libcdecl: Parse function parameters in order.

Currently the parser collects function parameters in reverse order,
then reverses them at the end.

There is no reason to do this.  It is only a slight restructuring of
the rules to collect parameters in the right order from the get go,
which means we can delete the duplicated list reversal code.

The grammar itself is also simpler this way, using two less nonterminals.
src/parse.y