completion.h
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 #ifndef _KJS_COMPLETION_H_
00026 #define _KJS_COMPLETION_H_
00027 
00028 #include "identifier.h"
00029 #include "value.h"
00030 
00031 namespace KJS {
00032 
00036   enum ComplType { Normal, Break, Continue, ReturnValue, Throw };
00037 
00048 
00049   class Completion : public Value {
00050 
00051 
00052   public:
00053     Completion(ComplType c = Normal, const Value& v = Value(),
00054                const Identifier &t = Identifier::null())
00055         : comp(c), val(v), tar(t) { }
00056 
00057     ComplType complType() const { return comp; }
00058     Value value() const { return val; }
00059     Identifier target() const { return tar; }
00060     bool isValueCompletion() const { return val.isValid(); }
00061   private:
00062     ComplType comp;
00063     Value val;
00064     Identifier tar;
00065   };
00066 
00067 }
00068 
00069 #endif 
 
This file is part of the documentation for kjs Library Version 3.2.0.