Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(634)

Unified Diff: lib/dom/scripts/systemfrog.py

Issue 10107010: Map IDBAny and IDBKey to Dynamic (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/dom/scripts/generator.py ('k') | lib/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemfrog.py
diff --git a/lib/dom/scripts/systemfrog.py b/lib/dom/scripts/systemfrog.py
index 30d5efa4c803e2e9c4c0f10e9684e1f5783cf2f6..6289873ac445f044fd7d41a9125648f5a6f678e7 100644
--- a/lib/dom/scripts/systemfrog.py
+++ b/lib/dom/scripts/systemfrog.py
@@ -216,7 +216,8 @@ class FrogInterfaceGenerator(object):
' // Use implementation from $SUPER.\n'
' // final $TYPE $NAME;\n',
SUPER=super_getter_interface.id,
- NAME=DartDomNameOfAttribute(getter), TYPE=output_type)
+ NAME=DartDomNameOfAttribute(getter),
+ TYPE=output_type)
return
self._members_emitter.Emit('\n // Shadowing definition.')
@@ -231,12 +232,14 @@ class FrogInterfaceGenerator(object):
if getter and setter and input_type == output_type:
self._members_emitter.Emit(
'\n $TYPE $NAME;\n',
- NAME=DartDomNameOfAttribute(getter), TYPE=output_type)
+ NAME=DartDomNameOfAttribute(getter),
+ TYPE=TypeOrVar(output_type))
return
if getter and not setter:
self._members_emitter.Emit(
- '\n final $TYPE $NAME;\n',
- NAME=DartDomNameOfAttribute(getter), TYPE=output_type)
+ '\n final $OPT_TYPE$NAME;\n',
+ NAME=DartDomNameOfAttribute(getter),
+ OPT_TYPE=TypeOrNothing(output_type))
return
self._AddAttributeUsingProperties(getter, setter)
@@ -252,18 +255,19 @@ class FrogInterfaceGenerator(object):
def _AddGetter(self, attr):
# TODO(sra): Remove native body when Issue 829 fixed.
self._members_emitter.Emit(
- '\n $TYPE get $NAME() native "return this.$NATIVE_NAME;";\n',
+ '\n $(OPT_TYPE)get $NAME() native "return this.$NATIVE_NAME;";\n',
NAME=DartDomNameOfAttribute(attr),
NATIVE_NAME=attr.id,
- TYPE=self._NarrowOutputType(attr.type.id))
+ OPT_TYPE=TypeOrNothing(self._NarrowOutputType(attr.type.id)))
def _AddSetter(self, attr):
# TODO(sra): Remove native body when Issue 829 fixed.
self._members_emitter.Emit(
- ' void set $NAME($TYPE value) native "this.$NATIVE_NAME = value;";\n',
+ ' void set $NAME($(OPT_TYPE)value)'
+ ' native "this.$NATIVE_NAME = value;";\n',
NAME=DartDomNameOfAttribute(attr),
NATIVE_NAME=attr.id,
- TYPE=self._NarrowInputType(attr.type.id))
+ OPT_TYPE=TypeOrNothing(self._NarrowInputType(attr.type.id)))
def _FindShadowedAttribute(self, attr):
"""Returns (attribute, superinterface) or (None, None)."""
« no previous file with comments | « lib/dom/scripts/generator.py ('k') | lib/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698