(self, src)
Updates self.funcs_dict.
Updates self.funcs_dict.
Updates self . funcs_dict .
def parse_functions(self, src):
    """Updates self.funcs_dict."""
    parser = header_parsing.MJAPI_FUNCTION_DECL
    for tokens, _, _ in parser.scanString(src):
      for token in tokens:
        name = codegen_util.mangle_varname(token.name)
        comment = codegen_util.mangle_comment(token.comment)
        if token.arguments:
          args = codegen_util.UniqueOrderedDict()
          for arg in token.arguments:
            a = self.get_type_from_token(arg)
            args[a.name] = a
        else:
          args = None
        if token.return_value:
          ret_val = self.get_type_from_token(token.return_value)
        else:
          ret_val = None
        func = c_declarations.Function(name, args, ret_val, comment)
        self.funcs_dict[func.name] = func
def parse_functions ( self , src ) : parser = header_parsing . MJAPI_FUNCTION_DECL for tokens , _ , _ in parser . scanString ( src ) : for token in tokens : name = codegen_util . mangle_varname ( token . name ) comment = codegen_util . mangle_comment ( token . comment ) if token . arguments : args = codegen_util . UniqueOrderedDict ( ) for arg in token . arguments : a = self . get_type_from_token ( arg ) args [ a . name ] = a else : args = None if token . return_value : ret_val = self . get_type_from_token ( token . return_value ) else : ret_val = None func = c_declarations . Function ( name , args , ret_val , comment ) self . funcs_dict [ func . name ] = func