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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/parse/ast.py

Issue 366873007: Mojo: Reformat parser_unittest.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: docstring for BaseNode Created 6 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 | « no previous file | mojo/public/tools/bindings/pylib/mojom/parse/parser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/pylib/mojom/parse/ast.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/parse/ast.py b/mojo/public/tools/bindings/pylib/mojom/parse/ast.py
index 5a2ad90a69b65cb5a32ffe21d6b7310219ec0488..be8d20e634dd9987a57a41c23ae9a406c1c0545b 100644
--- a/mojo/public/tools/bindings/pylib/mojom/parse/ast.py
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/ast.py
@@ -10,6 +10,8 @@
class BaseNode(object):
+ """Base class for nodes in the AST."""
+
def __init__(self, filename=None, lineno=None):
self.filename = filename
self.lineno = lineno
@@ -17,6 +19,7 @@ class BaseNode(object):
class Ordinal(BaseNode):
"""Represents an ordinal value labeling, e.g., a struct field."""
+
def __init__(self, value, **kwargs):
BaseNode.__init__(self, **kwargs)
self.value = value
@@ -24,8 +27,10 @@ class Ordinal(BaseNode):
def __eq__(self, other):
return self.value == other.value
+
class Parameter(BaseNode):
"""Represents a method request or response parameter."""
+
def __init__(self, typename, name, ordinal, **kwargs):
assert isinstance(ordinal, Ordinal)
BaseNode.__init__(self, **kwargs)
« no previous file with comments | « no previous file | mojo/public/tools/bindings/pylib/mojom/parse/parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698