<commit_before>var types = require("ast-types/lib/types");
var defaults = require("ast-types/lib/shared").defaults;
var def = types.Type.def;
var or = types.Type.or;

def("TypeParameter")
  .bases("Type")
  .build("name", "variance", "bound", "default")
  .field("name", String)
  .field("variance",
    or("plus", "minus", null),
    defaults["null"])
  .field("bound",
    or(def("TypeAnnotation"), null),
    defaults["null"])
  .field("default",
    or(def("Type"), null),
    defaults["null"]);

def("DeclareModuleExports")
  .bases("Statement")
  .build("typeAnnotation")
  .field("typeAnnotation", def("TypeAnnotation"));

def("DeclareExportDeclaration")
  .field("declaration", or(
    def("DeclareVariable"),
    def("DeclareFunction"),
    def("DeclareClass"),
    def("Type"), // Implies default type
    def("TypeAlias"), // Implies named type
    def("DeclareOpaqueType"), // Implies named opaque type
    def("InterfaceDeclaration"),
    null
  ))

def("DeclareExportAllDeclaration")
    .bases("Declaration")
    .build("source")
    .field("source", def("Literal"));

def("OpaqueType")
  .bases("Declaration")
  .build("id", "typeParameters", "impltype", "supertype")
  .field("id", def("Identifier"))
  .field("typeParameters", or(def("TypeParameterDeclaration"), null))
  .field("impltype", def("Type"))
  .field("supertype", or(def("Type"), null));

def("DeclareOpaqueType")
  .bases("OpaqueType")
  .build("id", "typeParameters", "impltype", "supertype")
  .field("impltype", or(def("Type"), null));

def("PrivateName")
  .bases("Expression")
  .field("name", def("Identifier"))

def("ClassPrivateProperty")
  .bases("ClassProperty")
  .field("key", def("PrivateName"))

<commit_msg>[parser] forgot to update ast_types<commit_after>var types = require("ast-types/lib/types");
var defaults = require("ast-types/lib/shared").defaults;
var def = types.Type.def;
var or = types.Type.or;

def("TypeParameter")
  .bases("Type")
  .build("name", "variance", "bound", "default")
  .field("name", String)
  .field("variance",
    or("plus", "minus", null),
    defaults["null"])
  .field("bound",
    or(def("TypeAnnotation"), null),
    defaults["null"])
  .field("default",
    or(def("Type"), null),
    defaults["null"]);

def("DeclareModuleExports")
  .bases("Statement")
  .build("typeAnnotation")
  .field("typeAnnotation", def("TypeAnnotation"));

def("DeclareExportDeclaration")
  .field("declaration", or(
    def("DeclareVariable"),
    def("DeclareFunction"),
    def("DeclareClass"),
    def("Type"), // Implies default type
    def("TypeAlias"), // Implies named type
    def("DeclareOpaqueType"), // Implies named opaque type
    def("InterfaceDeclaration"),
    null
  ))

def("DeclareExportAllDeclaration")
    .bases("Declaration")
    .build("source")
    .field("source", def("Literal"));

def("OpaqueType")
  .bases("Declaration")
  .build("id", "typeParameters", "impltype", "supertype")
  .field("id", def("Identifier"))
  .field("typeParameters", or(def("TypeParameterDeclaration"), null))
  .field("impltype", def("Type"))
  .field("supertype", or(def("Type"), null));

def("DeclareOpaqueType")
  .bases("OpaqueType")
  .build("id", "typeParameters", "impltype", "supertype")
  .field("impltype", or(def("Type"), null));

def("PrivateName")
  .bases("Expression")
  .field("name", def("Identifier"))

def("ClassPrivateProperty")
  .bases("ClassProperty")
  .field("key", def("Identifier"))


{'fraction_non_alphanumeric': 0.21243069740297638, 'fraction_numerical': 0.0, 'mean_word_length': 5.221415607985481, 'pattern_counts': {'":': 0, '<': 3, '<?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': '652805', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1109, 'n_words': 198}