Annotation of parser3/src/types/pa_wcontext.C, revision 1.39

1.6       paf         1: /**    @file
                      2:        Parser: write context class.
                      3: 
1.37      moko        4:        Copyright (c) 2001-2015 Art. Lebedev Studio (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.36      moko        8: #include "pa_wcontext.h"
1.1       paf         9: 
1.39    ! moko       10: volatile const char * IDENT_PA_WCONTEXT_C="$Id: pa_wcontext.C,v 1.38 2016/04/01 16:27:32 moko Exp $" IDENT_PA_WCONTEXT_H;
1.31      paf        11: 
1.1       paf        12: // appends a fstring to result
1.25      paf        13: void WContext::write(Value& avalue) {
1.18      paf        14:        if(fvalue) { // already have value?
                     15:                // must not construct twice
1.39    ! moko       16:                throw Exception(PARSER_RUNTIME, 0, "%s may not be overwritten with %s, store it to variable instead", fvalue->type(), avalue.type());
1.5       paf        17:        } else 
1.4       paf        18:                fvalue=&avalue;
1.23      paf        19: }
                     20: 
                     21: 
                     22: void WContext::detach_junctions() {
1.35      misha      23:        Array_iterator<VJunction*> i(junctions);
1.23      paf        24:        while(i.has_next())
1.25      paf        25:                i.next()->reattach(fparent);
1.23      paf        26: }

E-mail: