(self)
return None
Parse a field.

        field ::= '[' exp ']' '=' exp | Name '=' exp | exp

        Returns:
          FieldExpKey(key_exp, exp)
          FieldNamedKey(key_name, exp)
          FieldExp(exp)
Parse a field.
Parse a field .
def _field(self):
        """Parse a field.

        field ::= '[' exp ']' '=' exp | Name '=' exp | exp

        Returns:
          FieldExpKey(key_exp, exp)
          FieldNamedKey(key_name, exp)
          FieldExp(exp)
        """
        pos = self._pos
        if self._accept(lexer.TokSymbol(b'[')):
            key_exp = self._assert(self._exp(), 'exp key in field')
            self._expect(lexer.TokSymbol(b']'))
            self._expect(lexer.TokSymbol(b'='))
            exp = self._assert(self._exp(), 'exp value in field')
            return FieldExpKey(key_exp, exp, start=pos, end=self._pos)

        key_name = self._accept(lexer.TokName)
        if (key_name is not None and
                self._accept(lexer.TokSymbol(b'=')) is not None):
            exp = self._assert(self._exp(), 'exp value in field')
            return FieldNamedKey(key_name, exp, start=pos, end=self._pos)
        self._pos = pos

        exp = self._exp()
        if exp is not None:
            return FieldExp(exp, start=pos, end=self._pos)

        return None
def _field ( self ) : pos = self . _pos if self . _accept ( lexer . TokSymbol ( b'[' ) ) : key_exp = self . _assert ( self . _exp ( ) , 'exp key in field' ) self . _expect ( lexer . TokSymbol ( b']' ) ) self . _expect ( lexer . TokSymbol ( b'=' ) ) exp = self . _assert ( self . _exp ( ) , 'exp value in field' ) return FieldExpKey ( key_exp , exp , start = pos , end = self . _pos ) key_name = self . _accept ( lexer . TokName ) if ( key_name is not None and self . _accept ( lexer . TokSymbol ( b'=' ) ) is not None ) : exp = self . _assert ( self . _exp ( ) , 'exp value in field' ) return FieldNamedKey ( key_name , exp , start = pos , end = self . _pos ) self . _pos = pos exp = self . _exp ( ) if exp is not None : return FieldExp ( exp , start = pos , end = self . _pos ) return None