mojo/public/tools/mojom/mojom/parse/parser.py
def p_handletype(self, p):
    """handletype : HANDLE
                  | HANDLE LANGLE NAME RANGLE"""
    if len(p) == 2:
      p[0] = p[1]
    else:
      if p[3] not in ('data_pipe_consumer', 'data_pipe_producer',
                      'message_pipe', 'shared_buffer', 'platform'):
        # Note: We don't enable tracking of line numbers for everything, so we
        # can't use |p.lineno(3)|.
        raise ParseError(
            self.filename,
            "Invalid handle type %r:" % p[3],
            lineno=p.lineno(1),
            snippet=self._GetSnippet(p.lineno(1)))
      p[0] = "handle<" + p[3] + ">"
handletype : HANDLE
                  | HANDLE LANGLE NAME RANGLE
handletype : HANDLE
| HANDLE LANGLE NAME RANGLE
handletype : HANDLE | HANDLE LANGLE NAME RANGLE
def p_handletype(self, p):
    if len(p) == 2:
      p[0] = p[1]
    else:
      if p[3] not in ('data_pipe_consumer', 'data_pipe_producer',
                      'message_pipe', 'shared_buffer', 'platform'):
        raise ParseError(
            self.filename,
            "Invalid handle type %r:" % p[3],
            lineno=p.lineno(1),
            snippet=self._GetSnippet(p.lineno(1)))
      p[0] = "handle<" + p[3] + ">"
def p_handletype ( self , p ) : if len ( p ) == 2 : p [ 0 ] = p [ 1 ] else : if p [ 3 ] not in ( 'data_pipe_consumer' , 'data_pipe_producer' , 'message_pipe' , 'shared_buffer' , 'platform' ) : raise ParseError ( self . filename , "Invalid handle type %r:" % p [ 3 ] , lineno = p . lineno ( 1 ) , snippet = self . _GetSnippet ( p . lineno ( 1 ) ) ) p [ 0 ] = "handle<" + p [ 3 ] + ">"
handletype : HANDLE
| HANDLE LANGLE NAME RANGLE
handletype : HANDLE | HANDLE LANGLE NAME RANGLE
"""handletype : HANDLE
                  | HANDLE LANGLE NAME RANGLE""" # Note: We don't enable tracking of line numbers for everything, so we # can't use |p.lineno(3)|.
self
p