def do_statement(source, start):
 start = pass_white(source, start)
 if (not (start < len(source))):
  return (None, start)
 if any((startswith_keyword(source[start:], e) for e in {'case', 'default'})):
  return (None, start)
 rest = source[start:]
 for (key, meth) in KEYWORD_METHODS.iteritems():
  if rest.startswith(key):
   if ((len(key) == len(rest)) or (rest[len(key)] not in IDENTIFIER_PART)):
    return meth(source, start)
 if (rest[0] == '{'):
  return do_block(source, start)
 cand = parse_identifier(source, start, False)
 if (cand is not None):
  (label, cand_start) = cand
  cand_start = pass_white(source, cand_start)
  if (source[cand_start] == ':'):
   return do_label(source, start)
 return do_expression(source, start)

def do_statement ( source , start ) : start = pass_white ( source , start ) if ( not ( start < len ( source ) ) ) : return ( None , start ) if any ( ( startswith_keyword ( source [ start : ] , e ) for e in { 'case' , 'default' } ) ) : return ( None , start ) rest = source [ start : ] for ( key , meth ) in KEYWORD_METHODS . iteritems ( ) : if rest . startswith ( key ) : if ( ( len ( key ) == len ( rest ) ) or ( rest [ len ( key ) ] not in IDENTIFIER_PART ) ) : return meth ( source , start ) if ( rest [ 0 ] == '{' ) : return do_block ( source , start ) cand = parse_identifier ( source , start , False ) if ( cand is not None ) : ( label , cand_start ) = cand cand_start = pass_white ( source , cand_start ) if ( source [ cand_start ] == ':' ) : return do_label ( source , start ) return do_expression ( source , start )
returns none if not found other functions that begin with do_ raise also this do_ type function passes white space .