source: webkit/trunk/JavaScriptCore/kjs/completion.h@ 2779

Last change on this file since 2779 was 2760, checked in by darin, 23 years ago

JavaScriptCore:

  • a first step towards atomic identifiers in JavaScript

Most places that work with identifiers now use Identifier
instead of UString.

  • kjs/identifier.cpp: Added.
  • kjs/identifier.h: Added.
  • JavaScriptCore.pbproj/project.pbxproj: Added files.
  • kjs/array_object.cpp:
  • kjs/array_object.h:
  • kjs/completion.cpp:
  • kjs/completion.h:
  • kjs/date_object.cpp:
  • kjs/date_object.h:
  • kjs/function.cpp:
  • kjs/function.h:
  • kjs/function_object.cpp:
  • kjs/grammar.cpp:
  • kjs/grammar.cpp.h:
  • kjs/grammar.h:
  • kjs/grammar.y:
  • kjs/internal.cpp:
  • kjs/internal.h:
  • kjs/lexer.cpp:
  • kjs/lookup.cpp:
  • kjs/lookup.h:
  • kjs/math_object.cpp:
  • kjs/math_object.h:
  • kjs/nodes.cpp:
  • kjs/nodes.h:
  • kjs/number_object.cpp:
  • kjs/number_object.h:
  • kjs/object.cpp:
  • kjs/object.h:
  • kjs/property_map.cpp:
  • kjs/property_map.h:
  • kjs/reference.cpp:
  • kjs/reference.h:
  • kjs/regexp_object.cpp:
  • kjs/regexp_object.h:
  • kjs/string_object.cpp:
  • kjs/string_object.h:

WebCore:

  • a first step towards atomic identifiers in JavaScript

Most places that work with identifiers now use Identifier
instead of UString.

  • khtml/ecma/kjs_binding.cpp:
  • khtml/ecma/kjs_binding.h:
  • khtml/ecma/kjs_css.cpp:
  • khtml/ecma/kjs_css.h:
  • khtml/ecma/kjs_dom.cpp:
  • khtml/ecma/kjs_dom.h:
  • khtml/ecma/kjs_events.cpp:
  • khtml/ecma/kjs_events.h:
  • khtml/ecma/kjs_html.cpp:
  • khtml/ecma/kjs_html.h:
  • khtml/ecma/kjs_navigator.cpp:
  • khtml/ecma/kjs_navigator.h:
  • khtml/ecma/kjs_range.cpp:
  • khtml/ecma/kjs_range.h:
  • khtml/ecma/kjs_traversal.cpp:
  • khtml/ecma/kjs_traversal.h:
  • khtml/ecma/kjs_views.cpp:
  • khtml/ecma/kjs_views.h:
  • khtml/ecma/kjs_window.cpp:
  • khtml/ecma/kjs_window.h:
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1// -*- c-basic-offset: 2 -*-
2/*
3 * This file is part of the KDE libraries
4 * Copyright (C) 1999-2001 Harri Porten ([email protected])
5 * Copyright (C) 2001 Peter Kelly ([email protected])
6 * Copyright (C) 2002 Apple Computer, Inc
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
22 *
23 */
24
25#ifndef _KJS_COMPLETION_H_
26#define _KJS_COMPLETION_H_
27
28#include "identifier.h"
29#include "value.h"
30
31namespace KJS {
32
33 /**
34 * Completion types.
35 */
36 enum ComplType { Normal, Break, Continue, ReturnValue, Throw };
37
38 /**
39 * Completion objects are used to convey the return status and value
40 * from functions.
41 *
42 * See @ref FunctionImp::execute()
43 *
44 * @see FunctionImp
45 *
46 * @short Handle for a Completion type.
47 */
48 class Completion : private Value {
49 public:
50 Completion(ComplType c = Normal, const Value& v = Value(),
51 const Identifier &t = Identifier::null);
52
53 ComplType complType() const { return comp; }
54 Value value() const { return val; }
55 Identifier target() const { return tar; }
56 bool isValueCompletion() const { return !val.isNull(); }
57 private:
58 ComplType comp;
59 Value val;
60 Identifier tar;
61 };
62
63}
64
65#endif
Note: See TracBrowser for help on using the repository browser.