summaryrefslogtreecommitdiffstats
path: root/ppapi/generators/test_namespace
diff options
context:
space:
mode:
authornoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-04 18:01:45 +0000
committernoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-04 18:01:45 +0000
commit7a9f43db255141b623774a6d9db67276a96bec27 (patch)
treeda901698a8bf2a3729f9ae1a331a3cc480a04dca /ppapi/generators/test_namespace
parent82f9ffb36cbeb063eeb31c02fe82b8355ab4da11 (diff)
downloadchromium_src-7a9f43db255141b623774a6d9db67276a96bec27.zip
chromium_src-7a9f43db255141b623774a6d9db67276a96bec27.tar.gz
chromium_src-7a9f43db255141b623774a6d9db67276a96bec27.tar.bz2
IDL cleanup, added AST node, namespace, StageResult
Added the ability to track namespace within the tree to look for references. Added a BuildTree and Resolve step. Added a StageResult object to return partial trees and error counts. Built test search into parser so now test files no longer need to be specified on the command line. BUG=77551 TEST= python idl_parser.py --test Review URL: http://codereview.chromium.org/6903097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84086 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/generators/test_namespace')
-rw-r--r--ppapi/generators/test_namespace/bar.idl29
-rw-r--r--ppapi/generators/test_namespace/foo.idl18
2 files changed, 47 insertions, 0 deletions
diff --git a/ppapi/generators/test_namespace/bar.idl b/ppapi/generators/test_namespace/bar.idl
new file mode 100644
index 0000000..ea73402
--- /dev/null
+++ b/ppapi/generators/test_namespace/bar.idl
@@ -0,0 +1,29 @@
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* This file tests the namespace functions in the parser. */
+
+/* PPAPI ID */
+typedef int32_t PP_Instance;
+
+/* PPAPI ID */
+typedef int32_t PP_Resource;
+
+/* Interface test */
+interface PPB_Bar_0_3 {
+ /* Face create */
+ PP_Resource Create(
+ [in] PP_Instance instance,
+ [in] PP_Size size,
+ [in] PP_Bool is_always_opaque);
+
+ /* Returns PP_TRUE if the given resource is a valid Graphics2D, PP_FALSE if it
+ * is an invalid resource or is a resource of another type.
+ */
+ PP_Bool IsGraphics2D(
+ [in] PP_Resource resource);
+};
+
+
diff --git a/ppapi/generators/test_namespace/foo.idl b/ppapi/generators/test_namespace/foo.idl
new file mode 100644
index 0000000..75798a9
--- /dev/null
+++ b/ppapi/generators/test_namespace/foo.idl
@@ -0,0 +1,18 @@
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* PPAPI Structure */
+struct PP_Size {
+ /* This value represents the width of the rectangle. */
+ int32_t width;
+ /* This value represents the height of the rectangle. */
+ int32_t height;
+};
+
+/* PPAPI Enum */
+enum PP_Bool {
+ PP_FALSE = 0,
+ PP_TRUE = 1
+};