module Hydra.Sources.Tier4.Langs.Scala.Meta where

import Hydra.Sources.Tier3.All
import Hydra.Dsl.Annotations
import Hydra.Dsl.Bootstrap
import Hydra.Dsl.Types as Types


scalaMetaModule :: Module
scalaMetaModule :: Module
scalaMetaModule = Namespace
-> [Element] -> [Module] -> [Module] -> Maybe String -> Module
Module Namespace
ns [Element]
elements [Module
hydraCoreModule] [Module]
tier0Modules (Maybe String -> Module) -> Maybe String -> Module
forall a b. (a -> b) -> a -> b
$
    String -> Maybe String
forall a. a -> Maybe a
Just String
"A Scala syntax model based on Scalameta (https://scalameta.org)"
  where
    ns :: Namespace
ns = String -> Namespace
Namespace String
"hydra/langs/scala/meta"
    def :: String -> Type -> Element
def = Namespace -> String -> Type -> Element
datatype Namespace
ns
    meta :: String -> Type
meta = Namespace -> String -> Type
typeref Namespace
ns

    elements :: [Element]
elements = [

      String -> Type -> Element
def String
"PredefString" --  See scala/Predef.scala
        Type
string,

      String -> Type -> Element
def String
"ScalaSymbol" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$ --  See scala/Symbol.scala
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: Type
string],

--  scala/meta/Trees.scala source below this line. Hydra type definitions inline

-- package scala.meta
--
-- import org.scalameta.invariants._
-- import scala.meta.classifiers._
-- import scala.meta.inputs._
-- import scala.meta.tokens._
-- import scala.meta.prettyprinters._
-- import scala.meta.internal.trees._
-- import scala.meta.internal.trees.Metadata.binaryCompatField
-- @root trait Tree extends InternalTree {
      String -> Type -> Element
def String
"Tree" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$ --  Note: ignoring fields of Tree and InternalTree for now
        [FieldType] -> Type
union [
          String
"ref"String -> Type -> FieldType
>: String -> Type
meta String
"Ref",
          String
"stat"String -> Type -> FieldType
>: String -> Type
meta String
"Stat",
          String
"type"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"bounds"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Bounds",
          String
"pat"String -> Type -> FieldType
>: String -> Type
meta String
"Pat",
          String
"member"String -> Type -> FieldType
>: String -> Type
meta String
"Member",
          String
"ctor"String -> Type -> FieldType
>: String -> Type
meta String
"Ctor",
          String
"template"String -> Type -> FieldType
>: String -> Type
meta String
"Template",
          String
"mod"String -> Type -> FieldType
>: String -> Type
meta String
"Mod",
          String
"enumerator"String -> Type -> FieldType
>: String -> Type
meta String
"Enumerator",
          String
"importer"String -> Type -> FieldType
>: String -> Type
meta String
"Importer",
          String
"importee"String -> Type -> FieldType
>: String -> Type
meta String
"Importee",
          String
"caseTree"String -> Type -> FieldType
>: String -> Type
meta String
"CaseTree",
          String
"source"String -> Type -> FieldType
>: String -> Type
meta String
"Source",
          String
"quasi"String -> Type -> FieldType
>: String -> Type
meta String
"Quasi"],
--   def parent: Option[Tree]
--   def children: List[Tree]
--
--   def pos: Position
--   def tokens(implicit dialect: Dialect): Tokens
--
--   final override def canEqual(that: Any): Boolean = this eq that.asInstanceOf[AnyRef]
--   final override def equals(that: Any): Boolean = this eq that.asInstanceOf[AnyRef]
--   final override def hashCode: Int = System.identityHashCode(this)
--   final override def toString = scala.meta.internal.prettyprinters.TreeToString(this)
-- }
--
-- object Tree extends InternalTreeXtensions {
--   implicit def classifiable[T <: Tree]: Classifiable[T] = null
--   implicit def showStructure[T <: Tree]: Structure[T] =
--     scala.meta.internal.prettyprinters.TreeStructure.apply[T]
--   implicit def showSyntax[T <: Tree](implicit dialect: Dialect): Syntax[T] =
--     scala.meta.internal.prettyprinters.TreeSyntax.apply[T](dialect)
-- }
--
-- @branch trait Ref extends Tree
      String -> Type -> Element
def String
"Ref" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
          String
"init"String -> Type -> FieldType
>: String -> Type
meta String
"Init"],
-- @branch trait Stat extends Tree
      String -> Type -> Element
def String
"Stat" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"term"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"decl"String -> Type -> FieldType
>: String -> Type
meta String
"Decl",
          String
"defn"String -> Type -> FieldType
>: String -> Type
meta String
"Defn",
          String
"importExport"String -> Type -> FieldType
>: String -> Type
meta String
"ImportExportStat"],
--
-- @branch trait Name extends Ref { def value: String }
      String -> Type -> Element
def String
"Name" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"value"String -> Type -> FieldType
>: Type
string,
          String
"anonymous"String -> Type -> FieldType
>: Type
unit,
          String
"indeterminate"String -> Type -> FieldType
>: String -> Type
meta String
"PredefString"],
-- object Name {
--   def apply(value: String): Name = if (value == "") Name.Anonymous() else Name.Indeterminate(value)
--   def unapply(name: Name): Option[String] = Some(name.value)
--   @ast class Anonymous() extends Name {
--     def value = ""
--     checkParent(ParentChecks.NameAnonymous)
--   }
--   @ast class Indeterminate(value: Predef.String @nonEmpty) extends Name
-- }
--
-- @branch trait Lit extends Data with Pat with Type {
      String -> Type -> Element
def String
"Lit" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
--   def value: Any
-- }
-- object Lit {
--   def unapply(arg: Lit): Option[Any] = Some(arg.value)
--   @ast class Null() extends Lit { def value: Any = null }
          String
"null"String -> Type -> FieldType
>: Type
unit,
--   @ast class Int(value: scala.Int) extends Lit
          String
"int"String -> Type -> FieldType
>: Type
int32,
--   // NOTE: Lit.Double/Float are strings to work the same across JS/JVM. Example:
--   // 1.4f.toString == "1.399999976158142" // in JS
--   // 1.4f.toString == "1.4"               // in JVM
--   // See https://www.scala-js.org/doc/semantics.html-- tostring-of-float-double-and-unit
--   @ast class Double(format: scala.Predef.String) extends Lit { val value = format.toDouble }
          String
"double"String -> Type -> FieldType
>: Type
float64,
--   object Double { def apply(double: scala.Double): Double = Lit.Double(double.toString) }
--   @ast class Float(format: scala.Predef.String) extends Lit { val value = format.toFloat }
          String
"float"String -> Type -> FieldType
>: Type
float32,
--   object Float { def apply(float: scala.Float): Float = Lit.Float(float.toString) }
--   @ast class Byte(value: scala.Byte) extends Lit
          String
"byte"String -> Type -> FieldType
>: Type
int8,
--   @ast class Short(value: scala.Short) extends Lit
          String
"short"String -> Type -> FieldType
>: Type
int16,
--   @ast class Char(value: scala.Char) extends Lit
          String
"char"String -> Type -> FieldType
>: Type
uint16,
--   @ast class Long(value: scala.Long) extends Lit
          String
"long"String -> Type -> FieldType
>: Type
int64,
--   @ast class Boolean(value: scala.Boolean) extends Lit
          String
"boolean"String -> Type -> FieldType
>: Type
boolean,
--   @ast class Unit() extends Lit { def value: Any = () }
          String
"unit"String -> Type -> FieldType
>: Type
unit,
--   @ast class String(value: scala.Predef.String) extends Lit
          String
"string"String -> Type -> FieldType
>: Type
string,
--   @ast class Symbol(value: scala.Symbol) extends Lit
          String
"symbol"String -> Type -> FieldType
>: String -> Type
meta String
"ScalaSymbol"],
-- }
--
-- @branch trait Data extends Stat
      String -> Type -> Element
def String
"Data" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"lit"String -> Type -> FieldType
>: String -> Type
meta String
"Lit",
          String
"ref"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Ref",
          String
"interpolate"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Interpolate",
          String
"xml"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Xml",
          String
"apply"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Apply",
          String
"applyUsing"String -> Type -> FieldType
>: String -> Type
meta String
"Data.ApplyUsing",
          String
"applyType"String -> Type -> FieldType
>: String -> Type
meta String
"Data.ApplyType",
          String
"assign"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Assign",
          String
"return"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Return",
          String
"throw"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Throw",
          String
"ascribe"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Ascribe",
          String
"annotate"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Annotate",
          String
"tuple"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Tuple",
          String
"block"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Block",
          String
"endMarker"String -> Type -> FieldType
>: String -> Type
meta String
"Data.EndMarker",
          String
"if"String -> Type -> FieldType
>: String -> Type
meta String
"Data.If",
          String
"quotedMacroExpr"String -> Type -> FieldType
>: String -> Type
meta String
"Data.QuotedMacroExpr",
          String
"quotedMacroType"String -> Type -> FieldType
>: String -> Type
meta String
"Data.QuotedMacroType",
          String
"splicedMacroExpr"String -> Type -> FieldType
>: String -> Type
meta String
"Data.SplicedMacroExpr",
          String
"match"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Match",
          String
"try"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Try",
          String
"tryWithHandler"String -> Type -> FieldType
>: String -> Type
meta String
"Data.TryWithHandler",
          String
"functionData"String -> Type -> FieldType
>: String -> Type
meta String
"Data.FunctionData",
          String
"polyFunction"String -> Type -> FieldType
>: String -> Type
meta String
"Data.PolyFunction",
          String
"partialFunction"String -> Type -> FieldType
>: String -> Type
meta String
"Data.PartialFunction",
          String
"while"String -> Type -> FieldType
>: String -> Type
meta String
"Data.While",
          String
"do"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Do",
          String
"for"String -> Type -> FieldType
>: String -> Type
meta String
"Data.For",
          String
"forYield"String -> Type -> FieldType
>: String -> Type
meta String
"Data.ForYield",
          String
"new"String -> Type -> FieldType
>: String -> Type
meta String
"Data.New",
          String
"newAnonymous"String -> Type -> FieldType
>: String -> Type
meta String
"Data.NewAnonymous",
          String
"placeholder"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Placeholder",
          String
"eta"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Eta",
          String
"repeated"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Repeated",
          String
"param"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Param"],
-- object Data {
--   @branch trait Ref extends Data with scala.meta.Ref
      String -> Type -> Element
def String
"Data.Ref" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"this"String -> Type -> FieldType
>: String -> Type
meta String
"Data.This",
          String
"super"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Super",
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
          String
"anonymous"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Anonymous",
          String
"select"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Select",
          String
"applyUnary"String -> Type -> FieldType
>: String -> Type
meta String
"Data.ApplyUnary"],
--   @ast class This(qual: scala.meta.Name) extends Data.Ref
      String -> Type -> Element
def String
"Data.This"
        Type
unit,
--   @ast class Super(thisp: scala.meta.Name, superp: scala.meta.Name) extends Data.Ref
      String -> Type -> Element
def String
"Data.Super" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"thisp"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
          String
"superp"String -> Type -> FieldType
>: String -> Type
meta String
"Name"],
--   @ast class Name(value: Predef.String @nonEmpty) extends scala.meta.Name with Data.Ref with Pat
      String -> Type -> Element
def String
"Data.Name" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"value"String -> Type -> FieldType
>: String -> Type
meta String
"PredefString"],
--   @ast class Anonymous() extends scala.meta.Name with Data.Ref {
      String -> Type -> Element
def String
"Data.Anonymous"
        Type
unit,
--     def value = ""
--     checkParent(ParentChecks.AnonymousImport)
--   }
--   @ast class Select(qual: Data, name: Data.Name) extends Data.Ref with Pat
      String -> Type -> Element
def String
"Data.Select" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"qual"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name"],
--   @ast class Interpolate(prefix: Name, parts: List[Lit] @nonEmpty, args: List[Data]) extends Data {
      String -> Type -> Element
def String
"Data.Interpolate" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"prefix"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
          String
"parts"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Lit",
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--     checkFields(parts.length == args.length + 1)
--   }
--   @ast class Xml(parts: List[Lit] @nonEmpty, args: List[Data]) extends Data {
      String -> Type -> Element
def String
"Data.Xml" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"parts"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Lit",
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--     checkFields(parts.length == args.length + 1)
--   }
--   @ast class Apply(fun: Data, args: List[Data]) extends Data
      String -> Type -> Element
def String
"Data.Apply" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"fun"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--   @ast class ApplyUsing(fun: Data, args: List[Data]) extends Data
      String -> Type -> Element
def String
"Data.ApplyUsing" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"fun"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"targs"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--   @ast class ApplyType(fun: Data, targs: List[Type] @nonEmpty) extends Data
      String -> Type -> Element
def String
"Data.ApplyType" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"op"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
          String
"targs"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--   @ast class ApplyInfix(lhs: Data, op: Name, targs: List[Type], args: List[Data]) extends Data
      String -> Type -> Element
def String
"Data.ApplyInfix" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"op"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
          String
"targs"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--   @ast class ApplyUnary(op: Name, arg: Data) extends Data.Ref {
      String -> Type -> Element
def String
"Data.ApplyUnary" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"op"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
          String
"arg"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--     checkFields(op.isUnaryOp)
--   }
--   @ast class Assign(lhs: Data, rhs: Data) extends Data {
      String -> Type -> Element
def String
"Data.Assign" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--     checkFields(lhs.is[Data.Quasi] || lhs.is[Data.Ref] || lhs.is[Data.Apply])
--     checkParent(ParentChecks.DataAssign)
--   }
--   @ast class Return(expr: Data) extends Data
      String -> Type -> Element
def String
"Data.Return" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class Throw(expr: Data) extends Data
      String -> Type -> Element
def String
"Data.Throw" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class Ascribe(expr: Data, tpe: Type) extends Data
      String -> Type -> Element
def String
"Data.Ascribe" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class Annotate(expr: Data, annots: List[Mod.Annot] @nonEmpty) extends Data
      String -> Type -> Element
def String
"Data.Annotate" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"annots"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod.Annot"],
--   @ast class Tuple(args: List[Data] @nonEmpty) extends Data {
      String -> Type -> Element
def String
"Data.Tuple" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--     // tuple must have more than one element
--     // however, this element may be Quasi with "hidden" list of elements inside
--     checkFields(args.length > 1 || (args.length == 1 && args.head.is[Data.Quasi]))
--   }
--   @ast class Block(stats: List[Stat]) extends Data {
      String -> Type -> Element
def String
"Data.Block" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"stats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Stat"],
--     // extension group block can have declarations without body too
--     checkFields(stats.forall(st => st.isBlockStat || st.is[Decl]))
--   }
--   @ast class EndMarker(name: Data.Name) extends Data
      String -> Type -> Element
def String
"Data.EndMarker" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name"],
--   @ast class If(cond: Data, thenp: Data, elsep: Data) extends Data {
      String -> Type -> Element
def String
"Data.If" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"cond"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"thenp"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"elsep"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--     @binaryCompatField(since = "4.4.0")
--     private var _mods: List[Mod] = Nil
--   }
--   @ast class QuotedMacroExpr(body: Data) extends Data
      String -> Type -> Element
def String
"Data.QuotedMacroExpr" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class QuotedMacroType(tpe: Type) extends Data
      String -> Type -> Element
def String
"Data.QuotedMacroType" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class SplicedMacroExpr(body: Data) extends Data
      String -> Type -> Element
def String
"Data.SplicedMacroExpr" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class Match(expr: Data, cases: List[Case] @nonEmpty) extends Data {
      String -> Type -> Element
def String
"Data.Match" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"cases"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Case"],
--     @binaryCompatField(since = "4.4.5")
--     private var _mods: List[Mod] = Nil
--   }
--   @ast class Try(expr: Data, catchp: List[Case], finallyp: Option[Data]) extends Data
      String -> Type -> Element
def String
"Data.Try" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"catchp"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Case",
          String
"finallyp"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--   @ast class TryWithHandler(expr: Data, catchp: Data, finallyp: Option[Data]) extends Data
      String -> Type -> Element
def String
"Data.TryWithHandler" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"catchp"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"finallyp"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--
--   @branch trait FunctionData extends Data {
      String -> Type -> Element
def String
"Data.FunctionData" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"contextFunction"String -> Type -> FieldType
>: String -> Type
meta String
"Data.ContextFunction",
          String
"function"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Function"],
--     def params: List[Data.Param]
--     def body: Data
--   }
--   @ast class ContextFunction(params: List[Data.Param], body: Data) extends FunctionData {
      String -> Type -> Element
def String
"Data.ContextFunction" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"params"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--     checkFields(
--       params.forall(param =>
--         param.is[Data.Param.Quasi] ||
--           (param.name.is[scala.meta.Name.Anonymous] ==> param.default.isEmpty)
--       )
--     )
--   }
--   @ast class Function(params: List[Data.Param], body: Data) extends FunctionData {
      String -> Type -> Element
def String
"Data.Function" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"params"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--     checkFields(
--       params.forall(param =>
--         param.is[Data.Param.Quasi] ||
--           (param.name.is[scala.meta.Name.Anonymous] ==> param.default.isEmpty)
--       )
--     )
--     checkFields(
--       params.exists(_.is[Data.Param.Quasi]) ||
--         params.exists(_.mods.exists(_.is[Mod.Implicit])) ==> (params.length == 1)
--     )
--   }
--   @ast class PolyFunction(tparams: List[Type.Param], body: Data) extends Data
      String -> Type -> Element
def String
"Data.PolyFunction" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class PartialFunction(cases: List[Case] @nonEmpty) extends Data
      String -> Type -> Element
def String
"Data.PartialFunction" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"cases"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Case"],
--   @ast class While(expr: Data, body: Data) extends Data
      String -> Type -> Element
def String
"Data.While" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class Do(body: Data, expr: Data) extends Data
      String -> Type -> Element
def String
"Data.Do" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class For(enums: List[Enumerator] @nonEmpty, body: Data) extends Data {
      String -> Type -> Element
def String
"Data.For" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"enums"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Enumerator"],
--     checkFields(
--       enums.head.is[Enumerator.Generator] || enums.head.is[Enumerator.CaseGenerator] || enums.head
--         .is[Enumerator.Quasi]
--     )
--   }
--   @ast class ForYield(enums: List[Enumerator] @nonEmpty, body: Data) extends Data
      String -> Type -> Element
def String
"Data.ForYield" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"enums"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Enumerator"],
--   @ast class New(init: Init) extends Data
      String -> Type -> Element
def String
"Data.New" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"init"String -> Type -> FieldType
>: String -> Type
meta String
"Init"],
--   @ast class NewAnonymous(templ: Template) extends Data
      String -> Type -> Element
def String
"Data.NewAnonymous" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"templ"String -> Type -> FieldType
>: String -> Type
meta String
"Template"],
--   @ast class Placeholder() extends Data
      String -> Type -> Element
def String
"Data.Placeholder"
        Type
unit,
--   @ast class Eta(expr: Data) extends Data
      String -> Type -> Element
def String
"Data.Eta" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class Repeated(expr: Data) extends Data {
      String -> Type -> Element
def String
"Data.Repeated" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"expr"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--     checkParent(ParentChecks.DataRepeated)
--   }
--   @ast class Param(mods: List[Mod], name: meta.Name, decltpe: Option[Type], default: Option[Data])
--       extends Member
      String -> Type -> Element
def String
"Data.Param" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
          String
"decltpe"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
          String
"default"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--   def fresh(): Data.Name = fresh("fresh")
--   def fresh(prefix: String): Data.Name = Data.Name(prefix + Fresh.nextId())
-- }
--
-- @branch trait Type extends Tree
      String -> Type -> Element
def String
"Type" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"ref"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Ref",
          String
"anonymousName"String -> Type -> FieldType
>: String -> Type
meta String
"Type.AnonymousName",
          String
"apply"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Apply",
          String
"applyInfix"String -> Type -> FieldType
>: String -> Type
meta String
"Type.ApplyInfix",
          String
"functionType"String -> Type -> FieldType
>: String -> Type
meta String
"Type.FunctionType",
          String
"polyFunction"String -> Type -> FieldType
>: String -> Type
meta String
"Type.PolyFunction",
          String
"implicitFunction"String -> Type -> FieldType
>: String -> Type
meta String
"Type.ImplicitFunction",
          String
"tuple"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Tuple",
          String
"with"String -> Type -> FieldType
>: String -> Type
meta String
"Type.With",
          String
"and"String -> Type -> FieldType
>: String -> Type
meta String
"Type.And",
          String
"or"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Or",
          String
"refine"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Refine",
          String
"existential"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Existential",
          String
"annotate"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Annotate",
          String
"lambda"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Lambda",
          String
"macro"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Macro",
          String
"method"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Method",
          String
"placeholder"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Placeholder",
          String
"byName"String -> Type -> FieldType
>: String -> Type
meta String
"Type.ByName",
          String
"repeated"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Repeated",
          String
"var"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Var",
          String
"typedParam"String -> Type -> FieldType
>: String -> Type
meta String
"Type.TypedParam",
          String
"match"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Match"],
-- object Type {
--   @branch trait Ref extends Type with scala.meta.Ref
      String -> Type -> Element
def String
"Type.Ref" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name",
          String
"select"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Select",
          String
"project"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Project",
          String
"singleton"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Singleton"],
--   @ast class Name(value: String @nonEmpty) extends scala.meta.Name with Type.Ref
      String -> Type -> Element
def String
"Type.Name" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"value"String -> Type -> FieldType
>: Type
string],
--   @ast class AnonymousName() extends Type
      String -> Type -> Element
def String
"Type.AnonymousName"
        Type
unit,
--   @ast class Select(qual: Data.Ref, name: Type.Name) extends Type.Ref {
      String -> Type -> Element
def String
"Type.Select" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"qual"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Ref",
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name"],
--     checkFields(qual.isPath || qual.is[Data.Super] || qual.is[Data.Ref.Quasi])
--   }
--   @ast class Project(qual: Type, name: Type.Name) extends Type.Ref
      String -> Type -> Element
def String
"Type.Project" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"qual"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name"],
--   @ast class Singleton(ref: Data.Ref) extends Type.Ref {
      String -> Type -> Element
def String
"Type.Singleton" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"ref"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Ref"],
--     checkFields(ref.isPath || ref.is[Data.Super])
--   }
--   @ast class Apply(tpe: Type, args: List[Type] @nonEmpty) extends Type
      String -> Type -> Element
def String
"Type.Apply" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type"],
--   @ast class ApplyInfix(lhs: Type, op: Name, rhs: Type) extends Type
      String -> Type -> Element
def String
"Type.ApplyInfix" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"op"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @branch trait FunctionType extends Type {
      String -> Type -> Element
def String
"Type.FunctionType" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"function"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Function",
          String
"contextFunction"String -> Type -> FieldType
>: String -> Type
meta String
"Type.ContextFunction"],
--     def params: List[Type]
--     def res: Type
--   }
--   @ast class Function(params: List[Type], res: Type) extends FunctionType
      String -> Type -> Element
def String
"Type.Function" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"params"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
          String
"res"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class PolyFunction(tparams: List[Type.Param], tpe: Type) extends Type
      String -> Type -> Element
def String
"Type.PolyFunction" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class ContextFunction(params: List[Type], res: Type) extends FunctionType
      String -> Type -> Element
def String
"Type.ContextFunction" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"params"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
          String
"res"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast @deprecated("Implicit functions are not supported in any dialect")
--   class ImplicitFunction(
      String -> Type -> Element
def String
"Type.ImplicitFunction" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       params: List[Type],
          String
"params"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
--       res: Type
          String
"res"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   ) extends Type
--   @ast class Tuple(args: List[Type] @nonEmpty) extends Type {
      String -> Type -> Element
def String
"Type.Tuple" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type"],
--     checkFields(args.length > 1 || (args.length == 1 && args.head.is[Type.Quasi]))
--   }
--   @ast class With(lhs: Type, rhs: Type) extends Type
      String -> Type -> Element
def String
"Type.With" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class And(lhs: Type, rhs: Type) extends Type
      String -> Type -> Element
def String
"Type.And" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class Or(lhs: Type, rhs: Type) extends Type
      String -> Type -> Element
def String
"Type.Or" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class Refine(tpe: Option[Type], stats: List[Stat]) extends Type {
      String -> Type -> Element
def String
"Type.Refine" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
          String
"stats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Stat"],
--     checkFields(stats.forall(_.isRefineStat))
--   }
--   @ast class Existential(tpe: Type, stats: List[Stat] @nonEmpty) extends Type {
      String -> Type -> Element
def String
"Type.Existential" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"stats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Stat"],
--     checkFields(stats.forall(_.isExistentialStat))
--   }
--   @ast class Annotate(tpe: Type, annots: List[Mod.Annot] @nonEmpty) extends Type
      String -> Type -> Element
def String
"Type.Annotate" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"annots"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod.Annot"],
--   @ast class Lambda(tparams: List[Type.Param], tpe: Type) extends Type {
      String -> Type -> Element
def String
"Type.Lambda" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--     checkParent(ParentChecks.LambdaType)
--   }
--   @ast class Macro(body: Data) extends Type
      String -> Type -> Element
def String
"Type.Macro" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @deprecated("Method type syntax is no longer supported in any dialect", "4.4.3")
--   @ast class Method(paramss: List[List[Data.Param]], tpe: Type) extends Type {
      String -> Type -> Element
def String
"Type.Method" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"paramss"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--     checkParent(ParentChecks.TypeMethod)
--   }
--   @ast class Placeholder(bounds: Bounds) extends Type
      String -> Type -> Element
def String
"Type.Placeholder" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"bounds"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Bounds"],
--   @ast class Bounds(lo: Option[Type], hi: Option[Type]) extends Tree
      String -> Type -> Element
def String
"Type.Bounds" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lo"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
          String
"hi"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type"],
--   @ast class ByName(tpe: Type) extends Type {
      String -> Type -> Element
def String
"Type.ByName" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--     checkParent(ParentChecks.TypeByName)
--   }
--   @ast class Repeated(tpe: Type) extends Type {
      String -> Type -> Element
def String
"Type.Repeated" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--     checkParent(ParentChecks.TypeRepeated)
--   }
--   @ast class Var(name: Name) extends Type with Member.Type {
      String -> Type -> Element
def String
"Type.Var" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name"],
--     checkFields(name.value(0).isLower)
--     checkParent(ParentChecks.TypeVar)
--   }
--
--   @ast class TypedParam(name: Name, typ: Type) extends Type with Member.Type
      String -> Type -> Element
def String
"Type.TypedParam" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
          String
"typ"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class Param(
      String -> Type -> Element
def String
"Type.Param" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: meta.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
--       tparams: List[Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       tbounds: Type.Bounds,
          String
"tbounds"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Bounds",
--       vbounds: List[Type],
          String
"vbounds"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
--       cbounds: List[Type]
          String
"cbounds"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type"],
--   ) extends Member
--
--   @ast class Match(tpe: Type, cases: List[TypeCase] @nonEmpty) extends Type
      String -> Type -> Element
def String
"Type.Match" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"cases"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"TypeCase"],
--   def fresh(): Type.Name = fresh("fresh")
--   def fresh(prefix: String): Type.Name = Type.Name(prefix + Fresh.nextId())
-- }
--
-- @branch trait Pat extends Tree
      String -> Type -> Element
def String
"Pat" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"var"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Var",
          String
"wildcard"String -> Type -> FieldType
>: Type
unit,
          String
"seqWildcard"String -> Type -> FieldType
>: Type
unit,
          String
"bind"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Bind",
          String
"alternative"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Alternative",
          String
"tuple"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Tuple",
          String
"repeated"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Repeated",
          String
"extract"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Extract",
          String
"extractInfix"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.ExtractInfix",
          String
"interpolate"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Interpolate",
          String
"xml"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Xml",
          String
"typed"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Typed",
          String
"macro"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Macro",
          String
"given"String -> Type -> FieldType
>: String -> Type
meta String
"Pat.Given"],
-- object Pat {
--   @ast class Var(name: scala.meta.Data.Name) extends Pat with Member.Data { @
      String -> Type -> Element
def String
"Pat.Var" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name"],
--     // NOTE: can't do this check here because of things like `val X = 2`
--     // checkFields(name.value(0).isLower)
--     checkParent(ParentChecks.PatVar)
--   }
--   @ast class Wildcard() extends Pat
--   @ast class SeqWildcard() extends Pat {
--     checkParent(ParentChecks.PatSeqWildcard)
--   }
--   @ast class Bind(lhs: Pat, rhs: Pat) extends Pat {
      String -> Type -> Element
def String
"Pat.Bind" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Pat",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Pat"],
--     checkFields(lhs.is[Pat.Var] || lhs.is[Pat.Quasi])
--   }
--   @ast class Alternative(lhs: Pat, rhs: Pat) extends Pat
      String -> Type -> Element
def String
"Pat.Alternative" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Pat",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Pat"],
--   @ast class Tuple(args: List[Pat] @nonEmpty) extends Pat {
      String -> Type -> Element
def String
"Pat.Tuple" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Pat"],
--     checkFields(args.length > 1 || (args.length == 1 && args.head.is[Pat.Quasi]))
--   }
--   @ast class Repeated(name: scala.meta.Data.Name) extends Pat
      String -> Type -> Element
def String
"Pat.Repeated" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name"],
--   @ast class Extract(fun: Data, args: List[Pat]) extends Pat {
      String -> Type -> Element
def String
"Pat.Extract" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"fun"String -> Type -> FieldType
>: String -> Type
meta String
"Data",
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Pat"],
--     checkFields(fun.isExtractor)
--   }
--   @ast class ExtractInfix(lhs: Pat, op: Data.Name, rhs: List[Pat]) extends Pat
      String -> Type -> Element
def String
"Pat.ExtractInfix" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Pat",
          String
"op"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
          String
"rhs"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Pat"],
--   @ast class Interpolate(prefix: Data.Name, parts: List[Lit] @nonEmpty, args: List[Pat])
      String -> Type -> Element
def String
"Pat.Interpolate" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"prefix"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
          String
"parts"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Lit"],
--       extends Pat {
--     checkFields(parts.length == args.length + 1)
--   }
--   @ast class Xml(parts: List[Lit] @nonEmpty, args: List[Pat]) extends Pat {
      String -> Type -> Element
def String
"Pat.Xml" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"parts"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Lit",
          String
"args"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Pat"],
--     checkFields(parts.length == args.length + 1)
--   }
--   @ast class Typed(lhs: Pat, rhs: Type) extends Pat {
      String -> Type -> Element
def String
"Pat.Typed" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"lhs"String -> Type -> FieldType
>: String -> Type
meta String
"Pat",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--     checkFields(!rhs.is[Type.Var] && !rhs.is[Type.Placeholder])
--   }
--   @ast class Macro(body: Data) extends Pat {
      String -> Type -> Element
def String
"Pat.Macro" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--     checkFields(body.is[Data.QuotedMacroExpr] || body.is[Data.QuotedMacroType])
--   }
--   @ast class Given(tpe: Type) extends Pat
      String -> Type -> Element
def String
"Pat.Given" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   def fresh(): Pat.Var = Pat.Var(Data.fresh())
--   def fresh(prefix: String): Pat.Var = Pat.Var(Data.fresh(prefix))
-- }
--
-- @branch trait Member extends Tree {
      String -> Type -> Element
def String
"Member" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"term"String -> Type -> FieldType
>: String -> Type
meta String
"Member.Data",
          String
"type"String -> Type -> FieldType
>: String -> Type
meta String
"Member.Type",
          String
"termParam"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Param",
          String
"typeParam"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Param",
          String
"self"String -> Type -> FieldType
>: String -> Type
meta String
"Self"],
--   def name: Name
-- }
-- object Member {
--   @branch trait Data extends Member {
      String -> Type -> Element
def String
"Member.Data" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"pkg"String -> Type -> FieldType
>: String -> Type
meta String
"Pkg",
          String
"object"String -> Type -> FieldType
>: String -> Type
meta String
"Pkg.Object"],
--     def name: scala.meta.Data.Name
--   }
--   @branch trait Type extends Member {
      String -> Type -> Element
def String
"Member.Type" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--     def name: scala.meta.Type.Name
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name"],
--   }
-- }
--
-- @branch trait Decl extends Stat
      String -> Type -> Element
def String
"Decl" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"val"String -> Type -> FieldType
>: String -> Type
meta String
"Decl.Val",
          String
"var"String -> Type -> FieldType
>: String -> Type
meta String
"Decl.Var",
          String
"def"String -> Type -> FieldType
>: String -> Type
meta String
"Decl.Def",
          String
"type"String -> Type -> FieldType
>: String -> Type
meta String
"Decl.Type",
          String
"given"String -> Type -> FieldType
>: String -> Type
meta String
"Decl.Given"],
-- object Decl {
--   @ast class Val(mods: List[Mod], pats: List[Pat] @nonEmpty, decltpe: scala.meta.Type) extends Decl
      String -> Type -> Element
def String
"Decl.Val" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
          String
"pats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Pat",
          String
"decltpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class Var(mods: List[Mod], pats: List[Pat] @nonEmpty, decltpe: scala.meta.Type) extends Decl
      String -> Type -> Element
def String
"Decl.Var" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
          String
"pats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Pat",
          String
"decltpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class Def(
      String -> Type -> Element
def String
"Decl.Def" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: Data.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       paramss: List[List[Data.Param]],
          String
"paramss"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
--       decltpe: scala.meta.Type
          String
"decltpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   ) extends Decl with Member.Data @
      --   @ast class Type(
      String -> Type -> Element
def String
"Decl.Type" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: scala.meta.Type.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       bounds: scala.meta.Type.Bounds
          String
"bounds"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Bounds"],
--   ) extends Decl with Member.Type
--   @ast class Given(
      String -> Type -> Element
def String
"Decl.Given" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: Data.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       sparams: List[List[Data.Param]],
          String
"sparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
--       decltpe: scala.meta.Type
          String
"decltpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   ) extends Decl with Member.Data @
-- }
--
-- @branch trait Defn extends Stat
      String -> Type -> Element
def String
"Defn" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"val"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.Val",
          String
"var"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.Var",
          String
"given"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.Given",
          String
"enum"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.Enum",
          String
"enumCase"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.EnumCase",
          String
"repeatedEnumCase"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.RepeatedEnumCase",
          String
"givenAlias"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.GivenAlias",
          String
"extensionGroup"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.ExtensionGroup",
          String
"def"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.Def",
          String
"macro"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.Macro",
          String
"type"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.Type",
          String
"class"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.Class",
          String
"trait"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.Trait",
          String
"object"String -> Type -> FieldType
>: String -> Type
meta String
"Defn.Object"],
-- object Defn {
--   @ast class Val(
      String -> Type -> Element
def String
"Defn.Val" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       pats: List[Pat] @nonEmpty,
          String
"pats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Pat",
--       decltpe: Option[scala.meta.Type],
          String
"decltpe"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
--       rhs: Data
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   ) extends Defn {
--     checkFields(pats.forall(!_.is[Data.Name]))
--   }
--   @ast class Var(
      String -> Type -> Element
def String
"Defn.Var" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       pats: List[Pat] @nonEmpty,
          String
"pats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Pat",
--       decltpe: Option[scala.meta.Type],
          String
"decltpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
--       rhs: Option[Data]
          String
"rhs"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--   ) extends Defn {
--     checkFields(pats.forall(!_.is[Data.Name]))
--     checkFields(decltpe.nonEmpty || rhs.nonEmpty)
--     checkFields(rhs.isEmpty ==> pats.forall(_.is[Pat.Var]))
--   }
--   @ast class Given(
      String -> Type -> Element
def String
"Defn.Given" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: scala.meta.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       sparams: List[List[Data.Param]],
          String
"sparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
--       templ: Template
          String
"templ"String -> Type -> FieldType
>: String -> Type
meta String
"Template"],
--   ) extends Defn
--   @ast class Enum(
      String -> Type -> Element
def String
"Defn.Enum" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: scala.meta.Type.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       ctor: Ctor.Primary,
          String
"ctor"String -> Type -> FieldType
>: String -> Type
meta String
"Ctor.Primary",
--       templ: Template
          String
"template"String -> Type -> FieldType
>: String -> Type
meta String
"Template"],
--   ) extends Defn with Member.Type
--   @ast class EnumCase(
      String -> Type -> Element
def String
"Defn.EnumCase" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: Data.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       ctor: Ctor.Primary,
          String
"ctor"String -> Type -> FieldType
>: String -> Type
meta String
"Ctor.Primary",
--       inits: List[Init]
          String
"inits"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Init"],
--   ) extends Defn with Member.Data { @
--     checkParent(ParentChecks.EnumCase)
--   }
--   @ast class RepeatedEnumCase(
      String -> Type -> Element
def String
"Defn.RepeatedEnumCase" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       cases: List[Data.Name]
          String
"cases"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Name"],
--   ) extends Defn {
--     checkParent(ParentChecks.EnumCase)
--   }
--   @ast class GivenAlias(
      String -> Type -> Element
def String
"Defn.GivenAlias" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: scala.meta.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       sparams: List[List[Data.Param]],
          String
"sparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
--       decltpe: scala.meta.Type,
          String
"decltpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
--       body: Data
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   ) extends Defn
--   @ast class ExtensionGroup(
      String -> Type -> Element
def String
"Defn.ExtensionGroup" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       paramss: List[List[Data.Param]],
          String
"parmss"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
--       body: Stat
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Stat"],
--   ) extends Defn
--   @ast class Def(
      String -> Type -> Element
def String
"Defn.Def" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: Data.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       paramss: List[List[Data.Param]],
          String
"paramss"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
--       decltpe: Option[scala.meta.Type],
          String
"decltpe"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
--       body: Data
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   ) extends Defn with Member.Data { @
--     checkFields(paramss.forall(onlyLastParamCanBeRepeated))
--   }
--   @ast class Macro(
      String -> Type -> Element
def String
"Defn.Macro" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: Data.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       paramss: List[List[Data.Param]],
          String
"paramss"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
--       decltpe: Option[scala.meta.Type],
          String
"decltpe"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type",
--       body: Data
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   ) extends Defn with Member.Data @
--   @ast class Type(
      String -> Type -> Element
def String
"Defn.Type" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: scala.meta.Type.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       body: scala.meta.Type
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   ) extends Defn with Member.Type {
--     @binaryCompatField("4.4.0")
--     private var _bounds: scala.meta.Type.Bounds = scala.meta.Type.Bounds(None, None)
--   }
--   @ast class Class(
      String -> Type -> Element
def String
"Defn.Class" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: scala.meta.Type.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       ctor: Ctor.Primary,
          String
"ctor"String -> Type -> FieldType
>: String -> Type
meta String
"Ctor.Primary",
--       templ: Template
          String
"template"String -> Type -> FieldType
>: String -> Type
meta String
"Template"],
--   ) extends Defn with Member.Type
--   @ast class Trait(
      String -> Type -> Element
def String
"Defn.Trait" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: scala.meta.Type.Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Type.Name",
--       tparams: List[scala.meta.Type.Param],
          String
"tparams"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Type.Param",
--       ctor: Ctor.Primary,
          String
"ctor"String -> Type -> FieldType
>: String -> Type
meta String
"Ctor.Primary",
--       templ: Template
          String
"template"String -> Type -> FieldType
>: String -> Type
meta String
"Template"],
--   ) extends Defn with Member.Type {
--     checkFields(templ.is[Template.Quasi] || templ.stats.forall(!_.is[Ctor]))
--   }
--   @ast class Object(mods: List[Mod], name: Data.Name, templ: Template)
      String -> Type -> Element
def String
"Defn.Object" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name"], --  from Member.Data
--       extends Defn with Member.Data { @
--     checkFields(templ.is[Template.Quasi] || templ.stats.forall(!_.is[Ctor]))
--   }
-- }
--
-- @ast class Pkg(ref: Data.Ref, stats: List[Stat]) extends Member.Data with Stat { @
      String -> Type -> Element
def String
"Pkg" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name", --  from Member.Data
          String
"ref"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Ref",
          String
"stats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Stat"],
--   checkFields(ref.isQualId)
--   def name: Data.Name = ref match {
--     case name: Data.Name => name
--     case Data.Select(_, name: Data.Name) => name
--   }
-- }
-- object Pkg {
--   @ast class Object(mods: List[Mod], name: Data.Name, templ: Template)
--       extends Member.Data with Stat { @
      String -> Type -> Element
def String
"Pkg.Object" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Name",
          String
"template"String -> Type -> FieldType
>: String -> Type
meta String
"Template"],
--     checkFields(templ.is[Template.Quasi] || templ.stats.forall(!_.is[Ctor]))
--   }
-- }
--
-- // NOTE: The names of Ctor.Primary and Ctor.Secondary here is always Name.Anonymous.
-- // While seemingly useless, this name is crucial to one of the key principles behind the semantic API:
-- // "every definition and every reference should carry a name".
-- @branch trait Ctor extends Tree with Member
      String -> Type -> Element
def String
"Ctor" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"primary"String -> Type -> FieldType
>: String -> Type
meta String
"Ctor.Primary",
          String
"secondary"String -> Type -> FieldType
>: String -> Type
meta String
"Ctor.Secondary"],
-- object Ctor {
--   @ast class Primary(mods: List[Mod], name: Name, paramss: List[List[Data.Param]]) extends Ctor
      String -> Type -> Element
def String
"Ctor.Primary" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
          String
"paramss"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param"],
--   @ast class Secondary(
      String -> Type -> Element
def String
"Ctor.Secondary" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--       mods: List[Mod],
          String
"mods"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Mod",
--       name: Name,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
--       paramss: List[List[Data.Param]] @nonEmpty,
          String
"paramss"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data.Param",
--       init: Init,
          String
"init"String -> Type -> FieldType
>: String -> Type
meta String
"Init",
--       stats: List[Stat]
          String
"stats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Stat"],
--   ) extends Ctor with Stat {
--     checkFields(stats.forall(_.isBlockStat))
--   }
-- }
--
-- // NOTE: The name here is always Name.Anonymous.
-- // See comments to Ctor.Primary and Ctor.Secondary for justification.
-- @ast class Init(tpe: Type, name: Name, argss: List[List[Data]]) extends Ref {
      String -> Type -> Element
def String
"Init" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
          String
"argss"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data"],
--   checkFields(tpe.isConstructable)
--   checkParent(ParentChecks.Init)
-- }
--
-- @ast class Self(name: Name, decltpe: Option[Type]) extends Member
      String -> Type -> Element
def String
"Self"
        Type
unit,
--
-- @ast class Template(
      String -> Type -> Element
def String
"Template" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
--     early: List[Stat],
          String
"early"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Stat",
--     inits: List[Init],
          String
"inits"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Init",
--     self: Self,
          String
"self"String -> Type -> FieldType
>: String -> Type
meta String
"Self",
--     stats: List[Stat]
          String
"stats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Stat"],
-- ) extends Tree {
--   @binaryCompatField("4.4.0")
--   private var _derives: List[Type] = Nil
--   checkFields(early.forall(_.isEarlyStat && inits.nonEmpty))
--   checkFields(stats.forall(_.isTemplateStat))
-- }
--
-- @branch trait Mod extends Tree
      String -> Type -> Element
def String
"Mod" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"annot"String -> Type -> FieldType
>: String -> Type
meta String
"Mod.Annot",
          String
"private"String -> Type -> FieldType
>: String -> Type
meta String
"Mod.Private",
          String
"protected"String -> Type -> FieldType
>: String -> Type
meta String
"Mod.Protected",
          String
"implicit"String -> Type -> FieldType
>: Type
unit,
          String
"final"String -> Type -> FieldType
>: Type
unit,
          String
"sealed"String -> Type -> FieldType
>: Type
unit,
          String
"open"String -> Type -> FieldType
>: Type
unit,
          String
"super"String -> Type -> FieldType
>: Type
unit,
          String
"override"String -> Type -> FieldType
>: Type
unit,
          String
"case"String -> Type -> FieldType
>: Type
unit,
          String
"abstract"String -> Type -> FieldType
>: Type
unit,
          String
"covariant"String -> Type -> FieldType
>: Type
unit,
          String
"contravariant"String -> Type -> FieldType
>: Type
unit,
          String
"lazy"String -> Type -> FieldType
>: Type
unit,
          String
"valParam"String -> Type -> FieldType
>: Type
unit,
          String
"varParam"String -> Type -> FieldType
>: Type
unit,
          String
"infix"String -> Type -> FieldType
>: Type
unit,
          String
"inline"String -> Type -> FieldType
>: Type
unit,
          String
"using"String -> Type -> FieldType
>: Type
unit,
          String
"opaque"String -> Type -> FieldType
>: Type
unit,
          String
"transparent"String -> Type -> FieldType
>: Type
unit],
-- object Mod {
--   @ast class Annot(init: Init) extends Mod {
      String -> Type -> Element
def String
"Mod.Annot" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"init"String -> Type -> FieldType
>: String -> Type
meta String
"Init"],
--     @deprecated("Use init instead", "1.9.0")
--     def body = init
--   }
--   @ast class Private(within: Ref) extends Mod {
      String -> Type -> Element
def String
"Mod.Private" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"within"String -> Type -> FieldType
>: String -> Type
meta String
"Ref"],
--     checkFields(within.isWithin)
--   }
--   @ast class Protected(within: Ref) extends Mod {
      String -> Type -> Element
def String
"Mod.Protected" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"within"String -> Type -> FieldType
>: String -> Type
meta String
"Ref"],
--     checkFields(within.isWithin)
--   }
--   @ast class Implicit() extends Mod
--   @ast class Final() extends Mod
--   @ast class Sealed() extends Mod
--   @ast class Open() extends Mod
--   @deprecated("Super traits introduced in dotty, but later removed.")
--   @ast class Super() extends Mod
--   @ast class Override() extends Mod
--   @ast class Case() extends Mod
--   @ast class Abstract() extends Mod
--   @ast class Covariant() extends Mod
--   @ast class Contravariant() extends Mod
--   @ast class Lazy() extends Mod
--   @ast class ValParam() extends Mod
--   @ast class VarParam() extends Mod
--   @ast class Infix() extends Mod
--   @ast class Inline() extends Mod
--   @ast class Using() extends Mod
--   @ast class Opaque() extends Mod
--   @ast class Transparent() extends Mod
-- }
--
-- @branch trait Enumerator extends Tree
      String -> Type -> Element
def String
"Enumerator" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"generator"String -> Type -> FieldType
>: String -> Type
meta String
"Enumerator.Generator",
          String
"caseGenerator"String -> Type -> FieldType
>: String -> Type
meta String
"Enumerator.CaseGenerator",
          String
"val"String -> Type -> FieldType
>: String -> Type
meta String
"Enumerator.Val",
          String
"guard"String -> Type -> FieldType
>: String -> Type
meta String
"Enumerator.Guard"],
-- object Enumerator {
--   @ast class Generator(pat: Pat, rhs: Data) extends Enumerator
      String -> Type -> Element
def String
"Enumerator.Generator" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"pat"String -> Type -> FieldType
>: String -> Type
meta String
"Pat",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class CaseGenerator(pat: Pat, rhs: Data) extends Enumerator
      String -> Type -> Element
def String
"Enumerator.CaseGenerator" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"pat"String -> Type -> FieldType
>: String -> Type
meta String
"Pat",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class Val(pat: Pat, rhs: Data) extends Enumerator
      String -> Type -> Element
def String
"Enumerator.Val" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"pat"String -> Type -> FieldType
>: String -> Type
meta String
"Pat",
          String
"rhs"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
--   @ast class Guard(cond: Data) extends Enumerator
      String -> Type -> Element
def String
"Enumerator.Guard" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"cond"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
-- }
--
-- @branch trait ImportExportStat extends Stat {
      String -> Type -> Element
def String
"ImportExportStat" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"import"String -> Type -> FieldType
>: String -> Type
meta String
"Import",
          String
"export"String -> Type -> FieldType
>: String -> Type
meta String
"Export"],
--   def importers: List[Importer]
-- }
-- @ast class Import(importers: List[Importer] @nonEmpty) extends ImportExportStat
      String -> Type -> Element
def String
"Import" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"importers"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Importer"],
-- @ast class Export(importers: List[Importer] @nonEmpty) extends ImportExportStat
      String -> Type -> Element
def String
"Export" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"importers"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Importer"],
--
-- @ast class Importer(ref: Data.Ref, importees: List[Importee] @nonEmpty) extends Tree {
      String -> Type -> Element
def String
"Importer" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"ref"String -> Type -> FieldType
>: String -> Type
meta String
"Data.Ref",
          String
"importees"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Importee"],
--   checkFields(ref.isStableId)
-- }
--
-- @branch trait Importee extends Tree with Ref
      String -> Type -> Element
def String
"Importee" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"wildcard"String -> Type -> FieldType
>: Type
unit,
          String
"given"String -> Type -> FieldType
>: String -> Type
meta String
"Importee.Given",
          String
"givenAll"String -> Type -> FieldType
>: Type
unit,
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Importee.Name",
          String
"rename"String -> Type -> FieldType
>: String -> Type
meta String
"Importee.Rename",
          String
"unimport"String -> Type -> FieldType
>: String -> Type
meta String
"Importee.Unimport"],
-- object Importee {
--   @ast class Wildcard() extends Importee
--   @ast class Given(tpe: Type) extends Importee
      String -> Type -> Element
def String
"Importee.Given" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"tpe"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--   @ast class GivenAll() extends Importee
--   @ast class Name(name: scala.meta.Name) extends Importee {
      String -> Type -> Element
def String
"Importee.Name" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name"],
--     checkFields(name.is[scala.meta.Name.Quasi] || name.is[scala.meta.Name.Indeterminate])
--   }
--   @ast class Rename(name: scala.meta.Name, rename: scala.meta.Name) extends Importee {
      String -> Type -> Element
def String
"Importee.Rename" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name",
          String
"rename"String -> Type -> FieldType
>: String -> Type
meta String
"Name"],
--     checkFields(name.is[scala.meta.Name.Quasi] || name.is[scala.meta.Name.Indeterminate])
--     checkFields(rename.is[scala.meta.Name.Quasi] || rename.is[scala.meta.Name.Indeterminate])
--   }
--   @ast class Unimport(name: scala.meta.Name) extends Importee {
      String -> Type -> Element
def String
"Importee.Unimport" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"name"String -> Type -> FieldType
>: String -> Type
meta String
"Name"],
--     checkFields(name.is[scala.meta.Name.Quasi] || name.is[scala.meta.Name.Indeterminate])
--   }
-- }
--
-- @branch trait CaseTree extends Tree {
      String -> Type -> Element
def String
"CaseTree" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
union [
          String
"case"String -> Type -> FieldType
>: String -> Type
meta String
"Case",
          String
"typeCase"String -> Type -> FieldType
>: String -> Type
meta String
"TypeCase"],
--   def pat: Tree
--   def body: Tree
-- }
-- @ast class Case(pat: Pat, cond: Option[Data], body: Data) extends CaseTree
      String -> Type -> Element
def String
"Case" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"pat"String -> Type -> FieldType
>: String -> Type
meta String
"Pat",
          String
"cond"String -> Type -> FieldType
>: Type -> Type
optional (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Data",
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Data"],
-- @ast class TypeCase(pat: Type, body: Type) extends CaseTree
      String -> Type -> Element
def String
"TypeCase" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"pat"String -> Type -> FieldType
>: String -> Type
meta String
"Type",
          String
"body"String -> Type -> FieldType
>: String -> Type
meta String
"Type"],
--
-- @ast class Source(stats: List[Stat]) extends Tree {
      String -> Type -> Element
def String
"Source" (Type -> Element) -> Type -> Element
forall a b. (a -> b) -> a -> b
$
        [FieldType] -> Type
record [
          String
"stats"String -> Type -> FieldType
>: Type -> Type
list (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ String -> Type
meta String
"Stat"],
--   // NOTE: This validation has been removed to allow dialects with top-level terms.
--   // Ideally, we should push the validation into a dialect-specific prettyprinter when -- 220 is fixed.
--   // checkFields(stats.forall(_.isTopLevelStat))
-- }
--
-- package internal.trees {
--   // NOTE: Quasi is a base trait for a whole bunch of classes.
--   // Every root, branch and ast trait/class among scala.meta trees (except for quasis themselves)
--   // has a corresponding quasi, e.g. Data.Quasi or Type.Quasi.
--   //
--   // Here's how quasis represent unquotes
--   // (XXX below depends on the position where the unquote occurs, e.g. q"$x" will result in Data.Quasi):
--   //   * $x => XXX.Quasi(0, XXX.Name("x"))
--   //   * ..$xs => XXX.Quasi(1, XXX.Quasi(0, XXX.Name("xs"))
--   //   * ...$xss => XXX.Quasi(2, XXX.Quasi(0, XXX.Name("xss"))
--   //   * ..{$fs($args)} => Complex ellipses aren't supported yet
--   @branch trait Quasi extends Tree {
      String -> Type -> Element
def String
"Quasi" --  TODO
        Type
unit]
--     def rank: Int
--     def tree: Tree
--     def pt: Class[_]
--     def become[T <: Quasi: AstInfo]: T
--   }
--
--   @registry object All
-- }