|
Scala example source code file (ScaladocGlobal.scala)
The ScaladocGlobal.scala Scala example source code/* NSC -- new Scala compiler * Copyright 2007-2013 LAMP/EPFL * @author Paul Phillips */ package scala.tools.nsc package doc import scala.tools.nsc.ast.parser.{ SyntaxAnalyzer, BracePatch } import reporters.Reporter import typechecker.Analyzer import scala.reflect.internal.util.{ BatchSourceFile, RangePosition } trait ScaladocGlobalTrait extends Global { outer => override val useOffsetPositions = false override def newUnitParser(unit: CompilationUnit) = new syntaxAnalyzer.ScaladocUnitParser(unit, Nil) override lazy val syntaxAnalyzer = new ScaladocSyntaxAnalyzer[outer.type](outer) { val runsAfter = List[String]() val runsRightAfter = None } override lazy val loaders = new { val global: outer.type = outer val platform: outer.platform.type = outer.platform } with GlobalSymbolLoaders { // SI-5593 Scaladoc's current strategy is to visit all packages in search of user code that can be documented // therefore, it will rummage through the classpath triggering errors whenever it encounters package objects // that are not in their correct place (see bug for details) override protected def signalError(root: Symbol, ex: Throwable) { log(s"Suppressing error involving $root: $ex") } } } class ScaladocGlobal(settings: doc.Settings, reporter: Reporter) extends Global(settings, reporter) with ScaladocGlobalTrait { override protected def computeInternalPhases() { phasesSet += syntaxAnalyzer phasesSet += analyzer.namerFactory phasesSet += analyzer.packageObjects phasesSet += analyzer.typerFactory } override def forScaladoc = true override lazy val analyzer = new { val global: ScaladocGlobal.this.type = ScaladocGlobal.this } with ScaladocAnalyzer } Other Scala source code examplesHere is a short list of links related to this Scala ScaladocGlobal.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.