Files
Nim/tests/parser
metagn aa8715afde fix stmtlist expression indent regression (#24883)
follows up #24855

Before #24855, the test would work because the indentation of the `;`
token would be passed to `semiStmtList` and so its indentation of `-1`
would be used. Now the `;` token is skipped and the indentation of the
first `discard` is used which is > -1. However the second discard has an
indentation of -1 because it's on the same line: this fails the
`sameInd(p) or realInd(p)` check since -1 is never >= the indent of the
first discard.

For compatibility with the parser up to this point this indent check is
entirely removed, meaning the indent is ignored. Because the `;` is
basically never on a separate line, this was already the case for
basically every use. `semiStmtList` is wrapped in a `withInd` anyway
which resets the indent after it's done, since the entire statement list
is wrapped in a `()`. To disallow dedents, the above check could be
fixed to use `sameOrNoInd` instead of `sameInd`, which is done in the
commented version of this check.

(cherry picked from commit 3d14381473)
2025-04-17 17:33:04 +02:00
..
2022-09-23 13:05:05 +02:00
2021-04-30 17:17:29 +02:00
2023-04-06 13:36:21 +02:00
2020-09-12 12:39:46 +01:00
2019-03-21 06:48:54 +01:00
2019-05-29 22:21:51 +02:00
2015-03-22 01:38:13 +01:00
2018-05-14 21:38:18 +02:00
2018-05-05 14:17:31 +02:00