Skip to content

Commit cc6646f

Browse files
committed
Add docs
1 parent eb5360b commit cc6646f

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

library/src/scala/tasty/reflect/TastyCore.scala

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,14 @@ package scala.tasty.reflect
100100
*/
101101
trait TastyCore {
102102

103+
/** Compilation context */
103104
type Context
104105

105-
// TODO: When bootstrapped, remove and use `Term | TypeTree` type directly
106+
// TODO: When bootstrapped, remove and use `Term | TypeTree` type directly in other files
107+
/** Workaround missing `|` types in Scala 2 to represent `Term | TypeTree` */
106108
type Parent /* Term | TypeTree */
107109

110+
/** Tree representing executable code written in the source */
108111
type Tree
109112
type PackageClause <: Tree
110113
type Statement <: Tree
@@ -115,14 +118,17 @@ trait TastyCore {
115118
type DefDef <: Definition
116119
type ValDef <: Definition
117120
type PackageDef <: Definition
118-
type Term <: Statement with Parent
121+
type Term <: Statement with Parent // TODO: When bootstrapped, remove `Parent`
119122

123+
/** Branch of a pattern match or catch clause */
120124
type CaseDef
121125

126+
/** Pattern tree of the pattern part of a CaseDef */
122127
type Pattern
123128

129+
/** Tree representing a type written in the source */
124130
type TypeOrBoundsTree
125-
type TypeTree <: TypeOrBoundsTree with Parent
131+
type TypeTree <: TypeOrBoundsTree with Parent // TODO: When bootstrapped, remove `Parent`
126132
type TypeBoundsTree <: TypeOrBoundsTree
127133

128134
type TypeOrBounds
@@ -140,12 +146,16 @@ trait TastyCore {
140146

141147
type ImportSelector
142148

149+
/** Untyped identifier */
143150
type Id
144151

152+
/** JVM signature of a method */
145153
type Signature
146154

155+
/** Source position */
147156
type Position
148157

158+
/** Constant value represented as the constant itself */
149159
type Constant
150160

151161
}

0 commit comments

Comments
 (0)