Annotation of parser3/src/types/pa_wcontext.C, revision 1.32
1.6 paf 1: /** @file
2: Parser: write context class.
3:
1.32 ! paf 4: Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com)
1.15 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.20 paf 6: */
1.6 paf 7:
1.32 ! paf 8: static const char * const IDENT_WCONTEXT_C="$Date: 2005/08/09 08:05:09 $";
1.1 paf 9:
10: #include "pa_wcontext.h"
1.31 paf 11:
12: // statics
13:
14: VVoid WContext::empty_result;
1.1 paf 15:
16: // appends a fstring to result
1.25 paf 17: void WContext::write(Value& avalue) {
1.18 paf 18: if(fvalue) { // already have value?
19: // must not construct twice
1.25 paf 20: throw Exception("parser.runtime",
21: fvalue->get_class()?&fvalue->get_class()->name():0,
1.29 paf 22: "%s may not be overwritten with %s, store it to variable instead",
23: fvalue->type(),
24: avalue.type());
1.5 paf 25: } else
1.4 paf 26: fvalue=&avalue;
1.23 paf 27: }
28:
29:
30: void WContext::detach_junctions() {
1.25 paf 31: Array_iterator<Junction*> i(junctions);
1.23 paf 32: while(i.has_next())
1.25 paf 33: i.next()->reattach(fparent);
1.23 paf 34: // someday free junctions
1.25 paf 35: // the day has come?
1.30 paf 36: // no, libgc will do that for us!
1.23 paf 37: }
E-mail: