Bug 1317180, part 1 - Remove trailing whitespace from ast.py and parser.py. r=billm draft
authorAndrew McCreight <continuation@gmail.com>
Sun, 13 Nov 2016 09:18:23 -0800
changeset 438678 8778a1d1c24f623cd8b5d1885f89bf22b670fad3
parent 438623 a1e5bc41fcffc976afdfa0fa6c28b1f4a3216c5c
child 438679 377477b2c4750c1dd78e6a89f04680df15a352b1
push id35795
push userbmo:continuation@gmail.com
push dateMon, 14 Nov 2016 22:23:52 +0000
reviewersbillm
bugs1317180
milestone53.0a1
Bug 1317180, part 1 - Remove trailing whitespace from ast.py and parser.py. r=billm MozReview-Commit-ID: IrQ7kiddrYO
ipc/ipdl/ipdl/ast.py
ipc/ipdl/ipdl/parser.py
--- a/ipc/ipdl/ipdl/ast.py
+++ b/ipc/ipdl/ipdl/ast.py
@@ -145,17 +145,17 @@ class Node:
         if not hasattr(self, attrsName):
             setattr(self, attrsName, _struct())
 
 
 class NamespacedNode(Node):
     def __init__(self, loc=Loc.NONE, name=None):
         Node.__init__(self, loc)
         self.name = name
-        self.namespaces = [ ]  
+        self.namespaces = [ ]
 
     def addOuterNamespace(self, namespace):
         self.namespaces.insert(0, namespace)
 
     def qname(self):
         return QualifiedId(self.loc, self.name,
                            [ ns.name for ns in self.namespaces ])
 
@@ -209,17 +209,17 @@ class UsingStmt(Node):
         return self.kind == 'struct'
 
 # "singletons"
 class PrettyPrinted:
     @classmethod
     def __hash__(cls): return hash(cls.pretty)
     @classmethod
     def __str__(cls):  return cls.pretty
-    
+
 class ASYNC(PrettyPrinted):
     pretty = 'async'
 class INTR(PrettyPrinted):
     pretty = 'intr'
 class SYNC(PrettyPrinted):
     pretty = 'sync'
 
 class INOUT(PrettyPrinted):
--- a/ipc/ipdl/ipdl/parser.py
+++ b/ipc/ipdl/ipdl/parser.py
@@ -252,17 +252,17 @@ def p_PreambleStmt(p):
 def p_CxxIncludeStmt(p):
     """CxxIncludeStmt : INCLUDE STRING"""
     p[0] = CxxInclude(locFromTok(p, 1), p[2])
 
 def p_IncludeStmt(p):
     """IncludeStmt : INCLUDE PROTOCOL ID
                    | INCLUDE ID"""
     loc = locFromTok(p, 1)
- 
+
     Parser.current.loc = loc
     if 4 == len(p):
         id = p[3]
         type = 'protocol'
     else:
         id = p[2]
         type = 'header'
     inc = Include(loc, type, id)
@@ -605,17 +605,17 @@ def p_Transitions(p):
         p[0] = [ p[1] ]
 
 def p_Transition(p):
     """Transition : Trigger ID GOTO StateList ';'
                   | Trigger __DELETE__ ';'
                   | Trigger DELETE ';'"""
     if 'delete' == p[2]:
         _error(locFromTok(p, 1), "`delete' is a reserved identifier")
-    
+
     loc, trigger = p[1]
     if 6 == len(p):
         nextstates = p[4]
     else:
         nextstates = [ State.DEAD ]
     p[0] = Transition(loc, trigger, p[2], nextstates)
 
 def p_Trigger(p):
@@ -755,17 +755,17 @@ def p_ScalarType(p):
     else:
         loc, id = p[1]
         p[0] = TypeSpec(loc, QualifiedId(loc, id))
 
 def p_ActorType(p):
     """ActorType : ID ':' State"""
     loc = locFromTok(p, 1)
     p[0] = TypeSpec(loc, QualifiedId(loc, p[1]), state=p[3])
- 
+
 def p_MaybeNullable(p):
     """MaybeNullable : NULLABLE
                      | """
     p[0] = (2 == len(p))
 
 ##--------------------
 ## C++ stuff
 def p_CxxType(p):