|
Scala example source code file (DetachPlugin.scala)
The Scala DetachPlugin.scala source code/* NSC -- new Scala compiler * Copyright 2005-2011 LAMP/EPFL * @author Stephane Micheloud */ package scala.tools.detach import scala.tools.nsc.{Global, Phase} import scala.tools.nsc.plugins.{Plugin, PluginComponent} class DetachPlugin(val global: Global) extends Plugin { import global._ val name = "detach" val description = "Perform detaching of remote closures" object detach extends { val global = DetachPlugin.this.global val runsAfter = List("lambdalift") override val runsBefore = List("constructors") } with Detach val components = List[PluginComponent](detach) def setEnabled(flag: Boolean) { detach.isEnabled = flag } override def processOptions(options: List[String], error: String => Unit) = { var enabled = false for (option <- options) { if (option == "enable") { enabled = true } else { error("Option not understood: "+option) } } setEnabled(enabled) } override val optionsHelp: Option[String] = Some(" -P:detach:enable Enable detaching of remote closures") } Other Scala examples (source code examples)Here is a short list of links related to this Scala DetachPlugin.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.