--- parser3/src/main/compile.y 2024/12/03 04:07:02 1.301 +++ parser3/src/main/compile.y 2026/04/25 13:38:46 1.304 @@ -2,13 +2,13 @@ /** @file Parser: compiler(lexical parser and grammar). - Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) Authors: Konstantin Morshnev , Alexandr Petrosian */ -volatile const char * IDENT_COMPILE_Y = "$Id: compile.y,v 1.301 2024/12/03 04:07:02 moko Exp $"; +volatile const char * IDENT_COMPILE_Y = "$Id: compile.y,v 1.304 2026/04/25 13:38:46 moko Exp $"; /** @todo parser4: @@ -79,7 +79,7 @@ static const VString vempty; %} -%pure-parser +%define api.pure %lex-param {Parse_control* pc} %parse-param {Parse_control* pc} @@ -674,11 +674,8 @@ name_square_code_value: '[' { } codes { PC.explicit_result=*reinterpret_cast(&$2); } ']' { - $$=N(); -#ifdef OPTIMIZE_BYTECODE_GET_ELEMENT__SPECIAL - if(!maybe_append_simple_diving_code(*$$, *$3)) -#endif - { + $$=N(); + if(!maybe_append_simple_diving_code(*$$, *$3)) { OA(*$$, OP::OP_OBJECT_POOL, $3); /* stack: empty write context */ /* some code that writes to that context */ /* context=pop; stack: context.value() */