From 7e836f83e2930755f5d6b896a140909eb686289d Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 29 Jan 2013 13:53:30 +0100 Subject: Analyzer Plugins AnnotationCheckers are insufficient because they live outside the compiler cake and it's not possible to pass a Typer into an annotation checker. Analyzer plugins hook into important places of the compiler: - when the namer assigns a type to a symbol (plus a special hook for accessors) - before typing a tree, to modify the expected type - after typing a tree, to modify the type assigned to the tree Analyzer plugins and annotation checker can be activated only during selected phases of the compiler. Refactored the CPS plugin to use an analyzer plugin (since adaptToAnnotations is now part of analyzer plugins, no longer annotation checkers). --- src/compiler/scala/tools/nsc/typechecker/Analyzer.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'src/compiler/scala/tools/nsc/typechecker/Analyzer.scala') diff --git a/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala b/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala index 78175f393a..b50486306d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala @@ -25,6 +25,7 @@ trait Analyzer extends AnyRef with TypeDiagnostics with ContextErrors with StdAttachments + with AnalyzerPlugins { val global : Global import global._ -- cgit v1.2.3