<commit_before>import scala.{Seq => _}
import scala.collection.immutable.Seq
import org.scalameta.ast._
import org.scalameta.invariants._
import org.scalameta.annotations._
import org.scalameta.unreachable
import scala.meta.syntactic.show._
import scala.meta.syntactic.parsers._, SyntacticInfo._
import scala.{meta => api}
import scala.meta.syntactic.{ast => impl}

package scala.meta {
  @root trait Tree extends Product {
    type ThisType <: Tree
    def parent: Option[Tree]
    final override def toString: String = this.show[Raw]
  }

  @branch trait Ref extends Tree
  @branch trait Name extends Ref
  @branch trait Stat extends Tree
  @branch trait Scope extends Tree

  @branch trait Term extends Stat with Term.Arg
  object Term {
    @branch trait Ref extends Term with api.Ref
    @branch trait Name extends api.Name with Term.Ref with Pat with Member
    @branch trait Arg extends Tree
    @branch trait Param extends Member with Templ.Param
  }

  @branch trait Type extends Tree with Type.Arg with Scope
  object Type {
    @branch trait Ref extends Type with api.Ref
    @branch trait Name extends api.Name with Type.Ref
    @branch trait Arg extends Tree
    @branch trait Param extends Member
  }

  @branch trait Pat extends Tree with Pat.Arg
  object Pat {
    @branch trait Arg extends Tree
  }

  @branch trait Member extends Tree with Stat
  object Member {
    @branch trait Term extends Member
    @branch trait Type extends Member with Scope
    @branch trait Class extends Type with Templ
    @branch trait Trait extends Type with Templ
    @branch trait Field extends Term
    @branch trait Method extends Term with Scope
    @branch trait Object extends Term with Templ
    @branch trait Pkg extends Term with Templ
    @branch trait Templ extends Member with Scope
  }

  @branch trait Ctor extends Tree with Scope
  object Ctor {
    @branch trait Ref extends Tree
  }

  @branch trait Templ extends Tree with Scope
  object Templ {
    // TODO: this design doesn't work unfortunately, because we can't have anonymous params be members
    // Member.ref is expected to never crash, and making anonymous params Member.Term and Member.Type violates it
    // also, having Param.Term extend Param.Templ is very-very awkward
    // UPD: man, I'm totally confused. you know what, why don't we turn `val` and `var` into trivia?
    @branch trait Param extends Member
  }

  @branch trait Mod extends Tree
  @branch trait Enum extends Tree
  @branch trait Selector extends Tree
  @branch trait Case extends Tree
}

package scala.meta.syntactic.ast {
  @branch trait Tree extends api.Tree

  @branch trait Ref extends api.Ref with Tree
  @branch trait Name extends api.Name with Ref {
    def value: String
    def isBackquoted: Boolean
  }
  @branch trait Stat extends api.Stat with Tree
  @branch trait Scope extends api.Scope with Tree

  @branch trait Term extends api.Term with Stat with Term.Arg
  object Term {
    @branch trait Ref extends api.Term.Ref with Term with impl.Ref
    @ast class This(qual: Option[Predef.String]) extends Term.Ref
    @ast class Super(thisp: Option[Predef.String], superp: Option[Predef.String]) extends Term.Ref
    @ast class Name(value: Predef.String @nonEmpty, @trivia isBackquoted: Boolean = false) extends api.Term.Name with impl.Name with Term.Ref with Pat with Member {
      require(keywords.contains(value) ==> isBackquoted)
      def name: Name = this
      def mods: Seq[Mod] = Nil
    }
    @ast class Select(qual: Term, selector: Term.Name, @trivia isPostfix: Boolean = false) extends Term.Ref with Pat
    @ast class Interpolate(prefix: Name, parts: Seq[Lit.String] @nonEmpty, args: Seq[Term]) extends Term {
      require(parts.length == args.length + 1)
    }
    @ast class Apply(fun: Term, args: Seq[Arg]) extends Term
    @ast class ApplyType(fun: Term, targs: Seq[Type] @nonEmpty) extends Term
    @ast class ApplyInfix(lhs: Term, op: Name, targs: Seq[Type], args: Seq[Arg]) extends Term
    @ast class ApplyUnary(op: Name, arg: Term) extends Term {
      require(op.isUnaryOp)<commit_msg>a todo about renaming the package<commit_after>import scala.{Seq => _}
import scala.collection.immutable.Seq
import org.scalameta.ast._
import org.scalameta.invariants._
import org.scalameta.annotations._
import org.scalameta.unreachable
import scala.meta.syntactic.show._
import scala.meta.syntactic.parsers._, SyntacticInfo._
import scala.{meta => api}
import scala.meta.syntactic.{ast => impl}

package scala.meta {
  @root trait Tree extends Product {
    type ThisType <: Tree
    def parent: Option[Tree]
    final override def toString: String = this.show[Raw]
  }

  @branch trait Ref extends Tree
  @branch trait Name extends Ref
  @branch trait Stat extends Tree
  @branch trait Scope extends Tree

  @branch trait Term extends Stat with Term.Arg
  object Term {
    @branch trait Ref extends Term with api.Ref
    @branch trait Name extends api.Name with Term.Ref with Pat with Member
    @branch trait Arg extends Tree
    @branch trait Param extends Member with Templ.Param
  }

  @branch trait Type extends Tree with Type.Arg with Scope
  object Type {
    @branch trait Ref extends Type with api.Ref
    @branch trait Name extends api.Name with Type.Ref
    @branch trait Arg extends Tree
    @branch trait Param extends Member
  }

  @branch trait Pat extends Tree with Pat.Arg
  object Pat {
    @branch trait Arg extends Tree
  }

  @branch trait Member extends Tree with Stat
  object Member {
    @branch trait Term extends Member
    @branch trait Type extends Member with Scope
    @branch trait Class extends Type with Templ
    @branch trait Trait extends Type with Templ
    @branch trait Field extends Term
    @branch trait Method extends Term with Scope
    @branch trait Object extends Term with Templ
    @branch trait Pkg extends Term with Templ
    @branch trait Templ extends Member with Scope
  }

  @branch trait Ctor extends Tree with Scope
  object Ctor {
    @branch trait Ref extends Tree
  }

  @branch trait Templ extends Tree with Scope
  object Templ {
    // TODO: this design doesn't work unfortunately, because we can't have anonymous params be members
    // Member.ref is expected to never crash, and making anonymous params Member.Term and Member.Type violates it
    // also, having Param.Term extend Param.Templ is very-very awkward
    // UPD: man, I'm totally confused. you know what, why don't we turn `val` and `var` into trivia?
    @branch trait Param extends Member
  }

  @branch trait Mod extends Tree
  @branch trait Enum extends Tree
  @branch trait Selector extends Tree
  @branch trait Case extends Tree
}

// TODO: to be renamed to org.scalameta.trees or similar
package scala.meta.syntactic.ast {
  @branch trait Tree extends api.Tree

  @branch trait Ref extends api.Ref with Tree
  @branch trait Name extends api.Name with Ref {
    def value: String
    def isBackquoted: Boolean
  }
  @branch trait Stat extends api.Stat with Tree
  @branch trait Scope extends api.Scope with Tree

  @branch trait Term extends api.Term with Stat with Term.Arg
  object Term {
    @branch trait Ref extends api.Term.Ref with Term with impl.Ref
    @ast class This(qual: Option[Predef.String]) extends Term.Ref
    @ast class Super(thisp: Option[Predef.String], superp: Option[Predef.String]) extends Term.Ref
    @ast class Name(value: Predef.String @nonEmpty, @trivia isBackquoted: Boolean = false) extends api.Term.Name with impl.Name with Term.Ref with Pat with Member {
      require(keywords.contains(value) ==> isBackquoted)
      def name: Name = this
      def mods: Seq[Mod] = Nil
    }
    @ast class Select(qual: Term, selector: Term.Name, @trivia isPostfix: Boolean = false) extends Term.Ref with Pat
    @ast class Interpolate(prefix: Name, parts: Seq[Lit.String] @nonEmpty, args: Seq[Term]) extends Term {
      require(parts.length == args.length + 1)
    }
    @ast class Apply(fun: Term, args: Seq[Arg]) extends Term
    @ast class ApplyType(fun: Term, targs: Seq[Type] @nonEmpty) extends Term
    @ast class ApplyInfix(lhs: Term, op: Name, targs: Seq[Type], args: Seq[Arg]) extends Term
    @ast class ApplyUnary(op: Name, arg: Term) extends Term {
      require(op.isUnaryOp)
{'fraction_non_alphanumeric': 0.07362784471218206, 'fraction_numerical': 0.00024339783375927954, 'mean_word_length': 3.54786939679026, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6399015', 'n_tokens_mistral': 2375, 'n_tokens_neox': 2348, 'n_words': 992}