Lines Matching refs:stmt
607 def parse_stmt(self, stmt, end_token):
628 colon_pos = stmt.find(":")
631 w = stmt[:colon_pos].strip()
637 stmt = stmt[colon_pos+1:].strip()
641 if not stack_top[self.PUBLIC_SECTION] or stmt.startswith("template"):
645 if not self.wrap_mode and stmt.startswith("typedef struct"):
648 classname, bases, modlist = self.parse_class_decl(stmt[len("typedef "):])
659 if stmt.startswith("class") or stmt.startswith("struct"):
660 stmt_type = stmt.split()[0]
661 if stmt.strip() != stmt_type:
663 classname, bases, modlist = self.parse_class_decl(stmt)
668 if ("CV_EXPORTS_W" in stmt) or ("CV_EXPORTS_AS" in stmt) or (not self.wrap_mode):# and ("CV_EXPORTS" in stmt)):
674 if stmt.startswith("enum"):
677 if stmt.startswith("namespace"):
678 stmt_list = stmt.split()
682 if stmt.startswith("extern") and "\"C\"" in stmt:
686 decl = self.parse_enum(stmt)
689 if end_token == ";" and stmt.startswith("typedef"):
693 paren_pos = stmt.find("(")
699 decl = self.parse_func_decl(stmt)
704 if (context == "struct" or context == "class") and end_token == ";" and stmt:
707 if ("CV_PROP" in stmt): # or (class_decl and ("/Map" in class_decl[2])):
709 if "CV_PROP_RW" in stmt:
711 stmt = self.batch_replace(stmt, [("CV_PROP_RW", ""), ("CV_PROP", "")]).strip()
712 var_list = stmt.split(",")
823 stmt = (block_head + " " + l[:pos]).strip()
824 stmt = " ".join(stmt.split()) # normalize the statement
827 if stmt.startswith("@"):
835 stmt_type, name, parse_flag, decl = self.parse_stmt(stmt, token)