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

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

Issue 10698056: Omit '= null' as default value in generated dart:html code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 8 years, 6 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/frog/dom_frog.dart ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/generator.py
diff --git a/lib/dom/scripts/generator.py b/lib/dom/scripts/generator.py
index dd5b2eb15f09cb5cbdf8c5567558cbb09f5f1c7c..2a8bab7544a98327368403e5c4cf80aac889055a 100644
--- a/lib/dom/scripts/generator.py
+++ b/lib/dom/scripts/generator.py
@@ -425,7 +425,7 @@ class OperationInfo(object):
def FormatParam(param):
"""Returns a parameter declaration fragment for an ParamInfo."""
type = type_fn(param)
- if param.is_optional and default_value:
+ if param.is_optional and default_value and default_value != 'null':
return '%s%s = %s' % (type, param.name, default_value)
return '%s%s' % (type, param.name)
« no previous file with comments | « lib/dom/frog/dom_frog.dart ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698