Skip to content

IntelliJ plug-in to visualize the Frontend Intermediate Representation (FIR tree) of a piece of Kotlin code

Notifications You must be signed in to change notification settings

cypressious/fir-tree

 
 

Repository files navigation

FIR Tree

Visualize Kotlin's Frontend Intermediate Representation (FIR) right in your IDE

This plug-in helps you to understand the way the K2 Kotlin compiler represents the code internally.

  • Adjustable resolution phase (the last one, BODY_RESOLVE, is the default),
  • Click on a node in the tree to select it in the editor,
  • Non-visible nodes are shown in italics and slightly grayed out.

Here's the outcome for this piece of code, fully resolved.

package function.equality

import kotlinx.coroutines.*

fun increment(x: Int) = x + 1

FIR tree of the code above

About

IntelliJ plug-in to visualize the Frontend Intermediate Representation (FIR tree) of a piece of Kotlin code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%