1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

keep copies of parser inputs that are in-memory only

the parser modifies its inputs, which means that sharing them between
the error context reporting system and the parser itself can confuse the
reporting system. usually this led to early truncation of error context
reports which, while not dangerous, can be quite confusing.
This commit is contained in:
pennae 2024-01-29 06:19:23 +01:00
parent 686405ef41
commit d384ecd553
8 changed files with 20 additions and 7 deletions

View file

@ -3,3 +3,4 @@ error: attribute 'x' already defined at «stdin»:1:3
2| y = 456;
3| x = 789;
| ^
4| }

View file

@ -3,3 +3,4 @@ error: attribute 'x' already defined at «stdin»:9:5
9| x = 789;
10| inherit (as) x;
| ^
11| };

View file

@ -3,3 +3,4 @@ error: attribute 'x' already defined at «stdin»:9:5
9| x = 789;
10| inherit (as) x;
| ^
11| };

View file

@ -3,3 +3,4 @@ error: attribute 'services.ssh.port' already defined at «stdin»:2:3
2| services.ssh.port = 22;
3| services.ssh.port = 23;
| ^
4| }

View file

@ -3,3 +3,4 @@ error: attribute 'x' already defined at «stdin»:6:12
6| inherit x;
7| inherit x;
| ^
8| };

View file

@ -1,5 +1,6 @@
error: syntax error, unexpected ':', expecting '}'
at «stdin»:3:13:
2|
3| f = {x, y :
3| f = {x, y : ["baz" "bar" z "bat"]}: x + y;
| ^
4|

View file

@ -1,4 +1,5 @@
error: syntax error, unexpected invalid token, expecting end of file
at «stdin»:1:5:
1| 123
1| 123 é 4
| ^
2|