|
Scala example source code file (InteractiveTest.scala)
The Scala InteractiveTest.scala source codepackage scala.tools.nsc.interactive package tests import scala.tools.nsc.Settings import scala.tools.nsc.reporters.StoreReporter import scala.tools.nsc.util.{BatchSourceFile, SourceFile, Position} import scala.tools.nsc.io._ /** A base class for writing interactive compiler tests. * * @author Iulian Dragos * */ abstract class InteractiveTest { val settings = new Settings val reporter= new StoreReporter settings.YpresentationDebug.value = true lazy val compiler: CompilerControl = new Global(settings, reporter) def sources(filename: String*): Seq[SourceFile] = filename map source def source(filename: String) = new BatchSourceFile(AbstractFile.getFile(filename)) def pos(filename: String, line: Int, col: Int): Position = source(filename).position(line, col) def runTest: Unit def main(args: Array[String]) { runTest } } Other Scala examples (source code examples)Here is a short list of links related to this Scala InteractiveTest.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 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.