Fix duplicate object attribute name problem
This commit is contained in:
@@ -1147,8 +1147,19 @@ namespace chaiscript
|
|||||||
virtual ~Attr_Decl_AST_Node() {}
|
virtual ~Attr_Decl_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss){
|
||||||
try {
|
try {
|
||||||
t_ss.add(fun(boost::function<Boxed_Value (dispatch::Dynamic_Object &)>(boost::bind(&dispatch::detail::Dynamic_Object_Attribute::func, this->children[0]->text,
|
|
||||||
this->children[1]->text, _1))), this->children[1]->text);
|
t_ss.add(Proxy_Function
|
||||||
|
(new dispatch::detail::Dynamic_Object_Function(
|
||||||
|
this->children[0]->text,
|
||||||
|
fun(boost::function<Boxed_Value (dispatch::Dynamic_Object &)>(boost::bind(&dispatch::Dynamic_Object::get_attr,
|
||||||
|
_1,
|
||||||
|
this->children[1]->text
|
||||||
|
)))
|
||||||
|
)
|
||||||
|
), this->children[1]->text);
|
||||||
|
|
||||||
|
// t_ss.add(fun(boost::function<Boxed_Value (dispatch::Dynamic_Object &)>(boost::bind(&dispatch::detail::Dynamic_Object_Attribute::func, this->children[0]->text,
|
||||||
|
// this->children[1]->text, _1))), this->children[1]->text);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (const exception::reserved_word_error &) {
|
catch (const exception::reserved_word_error &) {
|
||||||
|
Reference in New Issue
Block a user