parameters: (self, field, bson_element_variable)
docstring: Add a field to track.
docstring_summary: Add a field to track.
docstring_tokens: Add a field to track .
function: def add(self, field, bson_element_variable):
          # type: (ast.Field, unicode) -> None
          """Add a field to track."""
          if not field in self._fields:
              self._fields.append(field)
  
          with writer.IndentedScopedBlock(self._writer, 'if (MONGO_unlikely(usedFields[%s])) {' %
                                          (_gen_field_usage_constant(field)), '}'):
              self._writer.write_line('ctxt.throwDuplicateField(%s);' % (bson_element_variable))
          self._writer.write_empty_line()
  
          self._writer.write_line('usedFields.set(%s);' % (_gen_field_usage_constant(field)))
          self._writer.write_empty_line()
function_tokens: def add ( self , field , bson_element_variable ) : # type: (ast.Field, unicode) -> None if not field in self . _fields : self . _fields . append ( field ) with writer . IndentedScopedBlock ( self . _writer , 'if (MONGO_unlikely(usedFields[%s])) {' % ( _gen_field_usage_constant ( field ) ) , '}' ) : self . _writer . write_line ( 'ctxt.throwDuplicateField(%s);' % ( bson_element_variable ) ) self . _writer . write_empty_line ( ) self . _writer . write_line ( 'usedFields.set(%s);' % ( _gen_field_usage_constant ( field ) ) ) self . _writer . write_empty_line ( )