parameters: (self, name, contents)
return_statement: return types.Results(types=ret)
docstring: Parses the given IDL code into a Results object.
docstring_summary: Parses the given IDL code into a Results object.
docstring_tokens: Parses the given IDL code into a Results object .
function: def parse(self, name, contents):
      """Parses the given IDL code into a Results object."""
      try:
        self.errors = []
        self.lexer.set_contents(name, contents)
        ret = self.yacc.parse(lexer=self.lexer, tracking=True)
      except SyntaxError as e:
        # Place this error first since we can't continue parsing with it; but
        # keep any errors we saw already.
        self.errors = [e] + self.errors
      if self.errors:
        raise IdlSyntaxError(self.errors)
      return types.Results(types=ret)
function_tokens: def parse ( self , name , contents ) : try : self . errors = [ ] self . lexer . set_contents ( name , contents ) ret = self . yacc . parse ( lexer = self . lexer , tracking = True ) except SyntaxError as e : # Place this error first since we can't continue parsing with it; but # keep any errors we saw already. self . errors = [ e ] + self . errors if self . errors : raise IdlSyntaxError ( self . errors ) return types . Results ( types = ret )