Files
Nim/compiler
ringabout 4856b9e32c fixes #25821; unary minus off by one mistake [backport] (#25823)
fixes #25821

This pull request includes a minor bug fix in the lexer and adds new
test cases for string formatting with binary operators in interpolated
expressions.

Lexer bug fix:

* Fixed an off-by-one error in the unary minus detection logic in the
`rawGetTok` procedure in `lexer.nim`, ensuring that the start-of-buffer
condition is correctly checked.

Testing improvements:

* Added tests to `tstrformat.nim` to verify that binary operators (such
as subtraction) work correctly inside interpolated string expressions
using both `&` and `fmt`.

(cherry picked from commit f9647276d8)
2026-05-22 08:57:23 +02:00
..
2023-12-15 10:20:57 +01:00
2026-01-09 09:03:51 +01:00
2026-04-20 09:45:51 +02:00
2026-03-17 10:12:06 +01:00
2026-01-09 09:03:51 +01:00
2026-01-09 09:03:51 +01:00
2026-03-09 10:13:31 +01:00
2025-01-15 10:21:20 +01:00
2026-01-09 09:03:51 +01:00
2021-01-12 09:36:51 +01:00
2024-07-09 09:29:45 +02:00
2026-01-09 09:03:51 +01:00
2025-01-14 07:51:55 +01:00
2023-07-02 22:36:05 +02:00
2023-11-06 18:33:28 +01:00
2025-09-22 08:47:23 +02:00
2026-04-15 09:23:21 +02:00
2024-03-16 08:35:18 +08:00
2023-12-25 07:12:54 +01:00

Nim Compiler

  • This directory contains the Nim compiler written in Nim.
  • Note that this code has been translated from a bootstrapping version written in Pascal.
  • So the code is not a poster child of good Nim code.

See Internals of the Nim Compiler for more information.