-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
The ampersand macro allows for an out-of-bounds-access of f at two places. This happens, when a single brace is not closed properly. With high probability, this is not noticed but there is little probability that no error message occurs.
Line 307 in 5845716
| if f[i] == ':': |
I'm a very new learner of Nim so that I don't know the software quality standards for Nim's library code but I think the readability of this macro (and the other big thing in the file) is not good. The unfortunate combination of missing parentheses with 2-space indentation makes it hard for me to see the end of big blocks. It's low-level spaghetti code but could have historical reasons. Better variable names and outlining procedures could improve the readability.