--- parser3/src/main/compile_tools.h 2023/09/26 20:49:09 1.117 +++ parser3/src/main/compile_tools.h 2024/11/04 03:53:25 1.121 @@ -1,14 +1,14 @@ /** @file Parser: compiler support helper functions decls. - Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) Authors: Konstantin Morshnev , Alexandr Petrosian */ #ifndef COMPILE_TOOLS #define COMPILE_TOOLS -#define IDENT_COMPILE_TOOLS_H "$Id: compile_tools.h,v 1.117 2023/09/26 20:49:09 moko Exp $" +#define IDENT_COMPILE_TOOLS_H "$Id: compile_tools.h,v 1.121 2024/11/04 03:53:25 moko Exp $" #include "pa_opcode.h" #include "pa_types.h" @@ -84,6 +84,7 @@ public: bool in_call_value; bool explicit_result; bool append; + bool array; //@} /// output: filled input 'methods' and 'error' if any @@ -115,12 +116,13 @@ public: in_call_value(false), explicit_result(false), append(false), + array(false), error("") { *cclasses+=aclass; } - /// true if exception should be rised + /// false if exception should be rised bool class_add(){ if(cclass_new){ cclass=cclass_new; @@ -128,11 +130,9 @@ public: cclass_new=0; append=false; // append to request's classes - if(!request.allow_class_replace) - return request.classes().put_dont_replace(cclass->type(), cclass) != 0; - request.classes().put(cclass->type(), cclass); + return request.add_class(cclass->type(), cclass); } - return false; + return true; } VStateless_class* get_existed_class(VStateless_class* aclass){