def _typeof_expression(self): keyword = ( pyparsing.Keyword('typeof') | pyparsing.Keyword('__typeof__') ) return pyparsing.Combine( keyword + pyparsing.Literal('(') + parsers.anything_beetween('()') + pyparsing.Literal(')') )
def _maybe_attributes(self): """Possibly match some attributes. The syntax of attributes is described here: https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html """ return pyparsing.Group( pyparsing.ZeroOrMore( _ATTRIBUTE + _DOUBLE_OPEN_PARENTHESIS + pyparsing.delimitedList( pyparsing.Group( self._identifier()("name") + pyparsing.Optional(_OPEN_PARENTHESIS + parsers.anything_beetween("()") ("args") + _CLOSE_PARENTHESIS))) + _DOUBLE_CLOSE_PARENTHESIS).setParseAction( self._make_attribute))("attributes")
def _maybe_attributes(self): """Possibly match some attributes. The syntax of attributes is described here: https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html """ return pyparsing.Group( pyparsing.ZeroOrMore( _ATTRIBUTE + _DOUBLE_OPEN_PARENTHESIS + pyparsing.delimitedList( pyparsing.Group( self._identifier()("name") + pyparsing.Optional( _OPEN_PARENTHESIS + parsers.anything_beetween("()")("args") + _CLOSE_PARENTHESIS ) ) ) + _DOUBLE_CLOSE_PARENTHESIS ).setParseAction(self._make_attribute) )("attributes")
def _typeof_expression(self): keyword = (pyparsing.Keyword('typeof') | pyparsing.Keyword('__typeof__')) return pyparsing.Combine(keyword + pyparsing.Literal('(') + parsers.anything_beetween('()') + pyparsing.Literal(')'))