Annotation of parser3/src/types/pa_vjunction.C, revision 1.21
1.1 paf 1: /** @file
1.4 misha 2: Parser: @b junction class decl.
1.1 paf 3:
1.21 ! moko 4: Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com)
! 5: Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru>
1.1 paf 6: */
7:
1.4 misha 8: // include
1.2 paf 9:
1.1 paf 10: #include "pa_vjunction.h"
1.4 misha 11: #include "pa_vbool.h"
1.6 misha 12: #include "pa_wcontext.h"
1.17 moko 13: #include "pa_symbols.h"
1.6 misha 14:
1.21 ! moko 15: volatile const char * IDENT_PA_VJUNCTION_C="$Id: pa_vjunction.C,v 1.20 2020/12/15 17:10:41 moko Exp $" IDENT_PA_VJUNCTION_H IDENT_PA_JUNCTION_H;
1.11 moko 16:
1.6 misha 17: void VJunction::reattach(WContext *new_wcontext){
18: if(new_wcontext) {
19: assert(fjunction.wcontext!=new_wcontext);
20: fjunction.wcontext=new_wcontext;
21: fjunction.wcontext->attach_junction(this);
1.8 misha 22: } else {
23: fjunction.method_frame=0;
24: fjunction.rcontext=0;
25: fjunction.wcontext=0;
1.7 misha 26: }
1.6 misha 27: }
28:
1.1 paf 29:
1.12 moko 30: override Value& VJunction::as_expr_result() {
31: return VBool::get(false);
1.1 paf 32: }
1.9 misha 33:
34:
1.18 moko 35: Value* VJunction::get_element(const String& aname) {
1.13 misha 36: #ifndef OPTIMIZE_BYTECODE_GET_ELEMENT__SPECIAL
1.17 moko 37: // $CLASS
38: if(SYMBOLS_EQ(aname,CLASS_SYMBOL))
1.9 misha 39: return this;
1.17 moko 40:
41: // $CLASS_NAME
42: if(SYMBOLS_EQ(aname,CLASS_NAME_SYMBOL))
1.9 misha 43: return new VString(junction_class_name);
1.18 moko 44: #endif
45:
46: // $name
47: if(SYMBOLS_EQ(aname,NAME_SYMBOL))
48: if(fjunction.method)
49: return new VString(*fjunction.method->name);
1.17 moko 50:
1.9 misha 51: return Value::get_element(aname);
1.10 misha 52: }
E-mail: