emersion / mrsh

A minimal POSIX shell
MIT License
489 stars 35 forks source link

Fix arithmetic parsing with spaces/parentheses #168

Closed mbarbar closed 3 years ago

mbarbar commented 4 years ago

Nice project. This is for #161. Fixing it exposed another bug which is also now fixed. I think the commit messages and the comment in the second diff should explain well enough.

I don't like the idea of putting arith_nested_parens in the parser struct though. It can't be static to arithmetic_word because that is called in a loop by a general function. It can be static to the file, if that is more preferred.

emersion commented 3 years ago

Thanks!