<commit_before>Error.stackTraceLimit = Infinity;
var acorn = require("../src/index")

var pp = acorn.Parser.prototype
var tt = acorn.tokTypes

pp.isRelational = function (op) {
  return this.type === tt.relational && this.value === op
}

pp.expectRelational = function (op) {
  if (this.isRelational(op)) {
    this.next()
  } else {
    this.unexpected()
  }
}

pp.flow_parseDeclareClass = function (node) {
  this.next()
  this.flow_parseInterfaceish(node, true)
  return this.finishNode(node, "DeclareClass")
}

pp.flow_parseDeclareFunction = function (node) {
  this.next()

  var id = node.id = this.parseIdent()

  var typeNode = this.startNode()
  var typeContainer = this.startNode()

  if (this.isRelational("<")) {
    typeNode.typeParameters = this.flow_parseTypeParameterDeclaration()
  } else {
    typeNode.typeParameters = null
  }

  this.expect(tt.parenL)
  var tmp = this.flow_parseFunctionTypeParams()
  typeNode.params = tmp.params
  typeNode.rest = tmp.rest
  this.expect(tt.parenR)

  this.expect(tt.colon)
  typeNode.returnType = this.flow_parseType()

  typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation")
  id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation")

  this.finishNode(id, id.type)

  this.semicolon()

  return this.finishNode(node, "DeclareFunction")
}

pp.flow_parseDeclare = function (node) {
  if (this.type === tt._class) {<commit_msg>add inType assignment in flow parse declare method<commit_after>Error.stackTraceLimit = Infinity;
var acorn = require("../src/index")

var pp = acorn.Parser.prototype
var tt = acorn.tokTypes

pp.isRelational = function (op) {
  return this.type === tt.relational && this.value === op
}

pp.expectRelational = function (op) {
  if (this.isRelational(op)) {
    this.next()
  } else {
    this.unexpected()
  }
}

pp.flow_parseDeclareClass = function (node) {
  this.next()
  this.flow_parseInterfaceish(node, true)
  return this.finishNode(node, "DeclareClass")
}

pp.flow_parseDeclareFunction = function (node) {
  this.next()

  var id = node.id = this.parseIdent()

  var typeNode = this.startNode()
  var typeContainer = this.startNode()

  if (this.isRelational("<")) {
    typeNode.typeParameters = this.flow_parseTypeParameterDeclaration()
  } else {
    typeNode.typeParameters = null
  }

  this.expect(tt.parenL)
  var tmp = this.flow_parseFunctionTypeParams()
  typeNode.params = tmp.params
  typeNode.rest = tmp.rest
  this.expect(tt.parenR)

  var oldInType = this.inType
  this.inType = true
  this.expect(tt.colon)
  typeNode.returnType = this.flow_parseType()
  this.inType = oldInType

  typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation")
  id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation")

  this.finishNode(id, id.type)

  this.semicolon()

  return this.finishNode(node, "DeclareFunction")
}

pp.flow_parseDeclare = function (node) {
  if (this.type === tt._class) {
{'fraction_non_alphanumeric': 0.12972972972972974, 'fraction_numerical': 0.0, 'mean_word_length': 4.2593250444049735, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1495865', 'n_tokens_mistral': 1004, 'n_tokens_neox': 989, 'n_words': 188}