summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-30 21:44:39 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-30 21:44:39 +0000
commit07facf095ea17412a765f354b8fc17399a259630 (patch)
tree6d7b3ad5c82b0c35b2d2b51939e2455b97cb11fa /o3d/plugin
parentdc5b41997c4e55a9df7245739f4b27a920212b12 (diff)
downloadchromium_src-07facf095ea17412a765f354b8fc17399a259630.zip
chromium_src-07facf095ea17412a765f354b8fc17399a259630.tar.gz
chromium_src-07facf095ea17412a765f354b8fc17399a259630.tar.bz2
This CL contains the the changes needed to build
an externs file for the JSCompiler as well as the code to build a compiled verison of the o3djs sample libs. Review URL: http://codereview.chromium.org/147079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19659 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r--o3d/plugin/o3d_binding.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/o3d/plugin/o3d_binding.py b/o3d/plugin/o3d_binding.py
index 7d7490c..c0ae572 100644
--- a/o3d/plugin/o3d_binding.py
+++ b/o3d/plugin/o3d_binding.py
@@ -28,7 +28,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
"""o3d binding model module.
This module implements the glue functions for the o3d binding model, binding
@@ -300,6 +299,21 @@ def CppGetStatic(scope, type_defn, field):
cpp_utils.GetGetterName(field))
+def JSDocTypeString(type_defn):
+ """Gets the representation of a type in JSDoc notation.
+
+ Args:
+ type_defn: a Definition for the type.
+
+ Returns:
+ a string that is the JSDoc notation of type_defn.
+ """
+ type_defn = type_defn.GetFinalType()
+ type_stack = type_defn.GetParentScopeStack()
+ name = type_defn.name
+ return '!' + '.'.join([s.name for s in type_stack[1:]] + [name])
+
+
_binding_glue_header_template = string.Template('')