Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8535745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:30:16+00:00 2026-06-11T10:30:16+00:00

Compiler codebase is quite big, and I can’t wrap my head around it all

  • 0

Compiler codebase is quite big, and I can’t wrap my head around it all at once 🙂

Currently, I just want to get ASTs after “typer” phase from it. Is there a way to do it?

I run the compiler the following way:

val settings = new Settings
settings.classpath.value = ...
val compiler = new Global(settings, new ConsoleReporter(settings))
new compiler.Run() {
  override def stopPhase(name: String) = name == "superaccessors"
} compileSources files
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:30:18+00:00Added an answer on June 11, 2026 at 10:30 am

    Use -Xprint:typer (to dump trees after typer) together with -Yshow-trees-compact (to dump the trees in raw AST format). If you also use -Yshow-trees-stringified, ASTs will be additionally dumped as pseudo Scala code (note: the last two options require 2.10.0).

    C:\Projects\Kepler\sandbox @ ticket/6356>cat Test.scala
    class C {
      def x = 2
    }
    
    C:\Projects\Kepler\sandbox @ ticket/6356>scalac -Xprint:typer -Yshow-trees-compact -Yshow-trees-stringified Test.scala
    [[syntax trees at end of typer]]// Scala source: Test.scala
    package <empty> {
      class C extends scala.AnyRef {
        def <init>(): C = {
          C.super.<init>();
          ()
        };
        def x: Int = 2
      }
    }
    PackageDef(
      Ident(<empty>), 
      List(
        ClassDef(Modifiers(), newTypeName("C"), List(), 
          Template(List(Select(Ident(scala), newTypeName("AnyRef"))), emptyValDef, 
          List(
            DefDef(Modifiers(), nme.CONSTRUCTOR, List(), List(List()), TypeTree(), Block(List(Apply(Select(Super(This(newTypeName("C")), tpnme.EMPTY), nme.CONSTRUCTOR), List())), Literal(Constant(())))), 
            DefDef(Modifiers(), newTermName("x"), List(), List(), TypeTree(), Literal(Constant(2))))))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with quite a big codebase which compiles fine in linux but vc++
We just upgraded our compiler to gcc 4.6 and now we get some of
I'm getting exceptions thrown from somewhere, but all I get from the compiler is
The compiler complains about this, after I activated all kind of warnings: For MyApp_Prefix.pch
I'm currently working in a codebase where IPv4 addresses are represented as pointers to
I have been refactoring the codebase of the project that I am currently on
I have a codebase that I want to produce several deliverable jar files, each
I am currently porting a .NET codebase in MonoTouch and I'm currently working on
We have huge codebase and some classes are often used via reflection all over
I've just downloaded from SVN the DUnit2 code base. Does someone has compiled it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.