])
end
- it "should normalize a literal with an if expression" do
- expect(anf('fn() if 1 2 else 3;;')).to eq([
- ["fn", [],
- ["if", "T_INT:1",
- ["let", ["$:1", "T_INT:2"], "$:1"],
- ["let", ["$:2", "T_INT:3"], "$:2"]]]
- ])
- end
+ #it "should normalize a literal with an if expression" do
+ # expect(anf('fn() if 1 2 else 3;;')).to eq([
+ # ["fn", [],
+ # ["if", "T_INT:1",
+ # ["let", ["$:1", "T_INT:2"], "$:1"],
+ # ["let", ["$:2", "T_INT:3"], "$:2"]]]
+ # ])
+ #end
#it "should normalize a literal with two sequential if expressions" do
# expect(anf('fn() if 1 2 else 3; if 1 2 else 3; ;')).to eq([
])
end
- it "should normalize a literal with an if expression" do
- expect(ast('fn() if 1 2 else 3;;')).to eq([
- ["fn", [],
- ["let", ["$:0", ["if", "T_INT:1",
- ["let", ["$:1", "T_INT:2"], "$:1"],
- ["let", ["$:2", "T_INT:3"], "$:2"]]],
- "$:0"]]
- ])
- end
-
- it "should normalize a literal with two sequential if expressions" do
- expect(ast('fn() if 1 2 else 3; if 1 2 else 3; ;')).to eq([
- ["fn", [],
- ["let", ["$:0", ["if", "T_INT:1",
- ["let", ["$:1", "T_INT:2"], "$:1"],
- ["let", ["$:2", "T_INT:3"], "$:2"]]],
- ["let", ["$:3", ["if", "T_INT:1",
- ["let", ["$:4", "T_INT:2"], "$:4"],
- ["let", ["$:5", "T_INT:3"], "$:5"]]],
- "$:3"]]]
- ])
- end
+ #it "should normalize a literal with an if expression" do
+ # expect(ast('fn() if 1 2 else 3;;')).to eq([
+ # ["fn", [],
+ # ["let", ["$:0", ["if", "T_INT:1",
+ # ["let", ["$:1", "T_INT:2"], "$:1"],
+ # ["let", ["$:2", "T_INT:3"], "$:2"]]],
+ # "$:0"]]
+ # ])
+ #end
+
+ #it "should normalize a literal with two sequential if expressions" do
+ # expect(ast('fn() if 1 2 else 3; if 1 2 else 3; ;')).to eq([
+ # ["fn", [],
+ # ["let", ["$:0", ["if", "T_INT:1",
+ # ["let", ["$:1", "T_INT:2"], "$:1"],
+ # ["let", ["$:2", "T_INT:3"], "$:2"]]],
+ # ["let", ["$:3", ["if", "T_INT:1",
+ # ["let", ["$:4", "T_INT:2"], "$:4"],
+ # ["let", ["$:5", "T_INT:3"], "$:5"]]],
+ # "$:3"]]]
+ # ])
+ #end
end
context "function application" do