--- parser3/src/main/execute.C 2001/03/18 16:36:55 1.115 +++ parser3/src/main/execute.C 2001/03/21 14:06:45 1.122 @@ -1,13 +1,15 @@ -/* - Parser +/** @file + Parser: executor part of request class. + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://design.ru/paf) - $Id: execute.C,v 1.115 2001/03/18 16:36:55 paf Exp $ + $Id: execute.C,v 1.122 2001/03/21 14:06:45 paf Exp $ */ -#include "pa_array.h" #include "code.h" +#include "pa_array.h" #include "pa_request.h" #include "pa_vstring.h" #include "pa_vhash.h" @@ -154,13 +156,13 @@ void Request::execute(const Array& ops) wcontext->set_somebody_entered_some_class(); const String& name=POP_NAME(); - VClass *vclass=static_cast(classes().get(name)); - if(!vclass) + Value *value=static_cast(classes().get(name)); + if(!value) THROW(0,0, &name, ": undefined class"); - PUSH(vclass); + PUSH(value); break; } @@ -221,7 +223,7 @@ void Request::execute(const Array& ops) { VString *vstring=static_cast(ops.quick_get(++i)); log_printf(" \"%s\"", vstring->string().cstr()); - write(vstring->string()); + write_no_lang(vstring->string()); break; } @@ -345,14 +347,12 @@ void Request::execute(const Array& ops) wcontext->somebody_entered_some_class()) { // ^class:method[..]? // yes, this is a constructor call // some stateless_object derivates with constructors - if(called_class->name()==TABLE_CLASS_NAME) + if(called_class==table_class)///called_class->name()==TABLE_CLASS_NAME) self=NEW VTable(pool()); - else /*if(called_class->name()==ENV_CLASS_NAME) - self=NEW VEnv(pool()); - else */ // stateful object + else // stateful object self=NEW VObject(pool(), *called_class); frame->write(*self, - String::Untaint_lang::NO // not used, always an object, not string + String::UL_NO // not used, always an object, not string ); } else self=&frame->junction.self; // no, static or simple dynamic call @@ -634,16 +634,17 @@ Value *Request::get_element() { return value; } +/** + intercept_string: + - true: + they want result=string value, + possible object result goes to wcontext + - false: + they want any result[string|object] + nothing goes to wcontext. + used in (expression) params evaluation +*/ Value& Request::process(Value& value, const String *name, bool intercept_string) { - // intercept_string: - // true: - // they want result=string value, - // possible object result goes to wcontext - // false: - // they want any result[string|object] - // nothing goes to wcontext. - // used in (expression) params evaluation - Value *result; Junction *junction=value.get_junction(); if(junction && junction->code) { // is it a code-junction?