--- parser3/src/main/Attic/core.C 2001/02/12 11:34:12 1.2 +++ parser3/src/main/Attic/core.C 2001/02/12 13:26:55 1.4 @@ -8,10 +8,14 @@ void process(Pool& pool, // ^ on code? process_bird(pool, rcontext, wcontext, code, char_to_stop_before); + + // TODO + // 1. случаи :: и this. в начале + // 2. вызовы статических методов } void process_dollar(Pool& pool, - Value& THIS, + Value& self, RContext& rcontext, WContext& wcontext, StringIterator& iter, char char_to_stop_before) { @@ -29,6 +33,7 @@ void process_dollar(Pool& pool, Value *context=read_mode?rcontext:wcontext; if(read_mode) { + // 'context' dive into dotted path for(int i=0; iget_element(static_cast(names.get[i])); if(!context) // no such object field, nothing bad, just ignore that @@ -40,7 +45,9 @@ void process_dollar(Pool& pool, bool construct_mode=names_ended_before=='('; + // 'context' dive into dotted path, int steps=names.count(); + // if constructing then "excluding last .name" if(construct_mode) steps--; for(int i=0; i(names.get[steps]); WContext local_wcontext(pool /* empty */); process(pool, rcontext, local_wcontext, iter, ')'); context->put_element(name, local_wcontext.value()); } else { // =='[' + // .name[with-code], processing on 'context' WContext local_context(pool, context); process(pool, local_context, local_context, iter, ']'); wcontext.write(local_context); @@ -84,6 +94,7 @@ void process_bird(Pool& pool, Value *context=rcontext; iter++; // skip '[' + // 'context' dive into dotted path, excluding last .name Value *local_self=context; int steps=names.count()-1; for(int i=0; i(names.get[steps]); // first we're trying to locate method with that 'name' Method *method=context.get_method(name);