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

* Finished the ATerm-less parser.

This commit is contained in:
Eelco Dolstra 2010-04-12 23:33:23 +00:00
parent 0d272fca79
commit 10e8b1fd15
6 changed files with 68 additions and 102 deletions

View file

@ -56,7 +56,7 @@ void run(Strings args)
doTest(state, "let id = x: x; in [1 2] == [(id 1) (id 2)]");
doTest(state, "let id = x: x; in [1 2] == [(id 1) (id 3)]");
doTest(state, "[1 2] == [3 (let x = x; in x)]");
//doTest(state, "{ x = 1; y.z = 2; } == { y = { z = 2; }; x = 1; }");
doTest(state, "{ x = 1; y.z = 2; } == { y = { z = 2; }; x = 1; }");
doTest(state, "{ x = 1; y = 2; } == { x = 2; }");
doTest(state, "{ x = [ 1 2 ]; } == { x = [ 1 ] ++ [ 2 ]; }");
doTest(state, "1 != 1");
@ -84,7 +84,7 @@ void run(Strings args)
doTest(state, "let as = { x = 1; }; bs = rec { inherit (as) x; y = x; }; in bs.y");
doTest(state, "let as = rec { inherit (y) x; y = { x = 1; }; }; in as.x");
doTest(state, "builtins.toXML 123");
//doTest(state, "builtins.toXML { a.b = \"x\" + \"y\"; c = [ 1 2 ] ++ [ 3 4 ]; }");
doTest(state, "builtins.toXML { a.b = \"x\" + \"y\"; c = [ 1 2 ] ++ [ 3 4 ]; }");
state.printStats();
}