File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
compiler/src/dotty/tools/dotc/interpreter Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,5 @@ package dotty.tools.dotc.interpreter
2
2
3
3
import dotty .tools .dotc .ast .tpd
4
4
5
- class RawExpr (val tree : tpd.Tree ) extends quoted.Expr [Any ] with RawQuoted {
6
- override def toString : String = s " RawExpr( ${tree.toString}) "
7
- }
5
+ /** Expression `quoted.Expr[_]` for which its internal representation is its tree. */
6
+ final class RawExpr (val tree : tpd.Tree ) extends quoted.Expr [Any ] with RawQuoted
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ package dotty.tools.dotc.interpreter
2
2
3
3
import dotty .tools .dotc .ast .tpd
4
4
5
+ /** Quoted `quoted.Quoted` for which its internal representation is its tree.
6
+ * - Used for trees that cannot be serialized, such as references to local symbols that will be spliced in.
7
+ * - Used for trees that do not need to be serialized to avoid the overhead of serialization/deserialization.
8
+ */
5
9
trait RawQuoted extends quoted.Quoted {
6
10
def tree : tpd.Tree
11
+ override def toString : String = s " ${this .getClass.getName}( ${tree.toString}) "
7
12
}
Original file line number Diff line number Diff line change @@ -2,6 +2,5 @@ package dotty.tools.dotc.interpreter
2
2
3
3
import dotty .tools .dotc .ast .tpd
4
4
5
- class RawType (val tree : tpd.Tree ) extends quoted.Type [Any ] with RawQuoted {
6
- override def toString : String = s " RawType( ${tree.toString}) "
7
- }
5
+ /** Type `quoted.Type[_]` for which its internal representation is its type tree. */
6
+ final class RawType (val tree : tpd.Tree ) extends quoted.Type [Any ] with RawQuoted
You can’t perform that action at this time.
0 commit comments