Remove := operator and fix & usage.

This commit is contained in:
Jason Turner
2011-09-24 15:06:31 -06:00
parent a28dfd8695
commit 52d9e1e871
6 changed files with 10 additions and 22 deletions

View File

@@ -1,5 +0,0 @@
auto i = 3
auto j := i
j = 4
assert_equal(4, i)

View File

@@ -1,14 +1,14 @@
load_module("reflection")
auto parser := ChaiScript_Parser()
auto& parser = ChaiScript_Parser()
auto parse_success = parser.parse("3 + 4", "INPUT")
auto a := parser.ast()
auto& a = parser.ast()
assert_equal(eval(a), 7)
auto childs := a.children.front().children
auto node := childs[0]
auto& childs = a.children.front().children
auto& node = childs[0]
auto parser2 := ChaiScript_Parser()
auto& parser2 = ChaiScript_Parser()
parser2.parse("9", "INPUT")
@@ -30,7 +30,7 @@ assert_equal(false, `+`.has_parse_tree());
assert_throws("Function does not have a parse tree", fun() { `+`.get_parse_tree(); } );
auto parsetree := my_fun.get_parse_tree();
auto& parsetree = my_fun.get_parse_tree();
assert_equal(1, eval(parsetree));