def expect_comment_end ( self ) : match = self . _expect_match ( '#}' , COMMENT_END_PATTERN ) self . advance ( match . end ( ) )
catch the matched comment in regex in python
Expect a comment end and return the match object .
def expect_comment_end(self):
        """Expect a comment end and return the match object.
        """
        match = self._expect_match('#}', COMMENT_END_PATTERN)
        self.advance(match.end())