{"size": 678, "ext": "js", "max_stars_repo_path": "src/operators/super-keyword-deletion.js", "max_stars_repo_name": "MorenaBarboni/SuMo-SOlidity-MUtator", "max_stars_repo_stars_event_min_datetime": "2022-02-23T02:34:42.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-23T02:34:42.000Z", "max_issues_repo_path": "src/operators/super-keyword-deletion.js", "max_issues_repo_name": "MorenaBarboni/SuMo-SOlidity-MUtator", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/operators/super-keyword-deletion.js", "max_forks_repo_name": "MorenaBarboni/SuMo-SOlidity-MUtator", "max_forks_repo_forks_event_min_datetime": "2021-12-08T09:49:53.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-02T17:55:32.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 3, "avg_line_length": 22.6, "max_line_length": 68, "alphanum_fraction": 0.610619469}
const Mutation = require('../mutation')

function SKDOperator() {}

SKDOperator.prototype.ID = 'SKD'
SKDOperator.prototype.name = 'super-keyword-deletion'

SKDOperator.prototype.getMutations = function(file, source, visit) {
  const mutations = []


  visit({
    ContractDefinition: (node) => {
      if(node.baseContracts.length >0)
      visit({
        MemberAccess: (node) => {
         if(node.expression.name == "super"){
          var start = node.expression.range[0]
          var end = node.expression.range[1]
          mutations.push(new Mutation(file, start, end+2, ""))
         }
        }
      })
    }
  })  
  return mutations
}

module.exports = SKDOperator
