--- parser3/src/include/Attic/pa_vbool.h 2001/03/08 12:19:19 1.2 +++ parser3/src/include/Attic/pa_vbool.h 2001/03/10 16:34:36 1.7 @@ -1,5 +1,9 @@ /* - $Id: pa_vbool.h,v 1.2 2001/03/08 12:19:19 paf Exp $ + Parser + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan + + $Id: pa_vbool.h,v 1.7 2001/03/10 16:34:36 paf Exp $ */ #ifndef PA_VBOOL_H @@ -15,26 +19,22 @@ public: // Value // all: for error reporting after fail(), etc const char *type() const { return "bool"; } - // bool: fvalue - String *get_string() { - String *result=NEW String(pool()); - result->APPEND_CONST(fvalue?"TRUE":"FALSE"); - return result; - }; - // bool: fvalue - bool get_bool() { return fvalue; }; - // bool: fvalue - double get_double() { return fvalue; }; + // bool: this + Value *get_expr_result() { return this; } + // bool: fbool + bool get_bool() { return fbool; } + // bool: fbool + double get_double() { return fbool; } public: // usage - VBool(Pool& apool, bool avalue/*=false*/) : Value(apool), - fvalue(avalue) { + VBool(Pool& apool, bool abool) : Value(apool), + fbool(abool) { } private: - bool fvalue; + bool fbool; };