https://github.com/serras/fir-tree
IntelliJ plug-in to visualize the Frontend Intermediate Representation (FIR tree) of a piece of Kotlin code
https://github.com/serras/fir-tree
Last synced: about 1 year ago
JSON representation
IntelliJ plug-in to visualize the Frontend Intermediate Representation (FIR tree) of a piece of Kotlin code
- Host: GitHub
- URL: https://github.com/serras/fir-tree
- Owner: serras
- Created: 2023-12-03T09:44:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-22T07:06:00.000Z (about 1 year ago)
- Last Synced: 2025-03-27T19:41:53.230Z (about 1 year ago)
- Language: Kotlin
- Size: 511 KB
- Stars: 40
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FIR Tree
> Visualize Kotlin's Frontend Intermediate Representation (FIR) and Control Flow Graphs (CFG) right in your IDE
### Available at [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/23270-fir-tree)
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,
- Visualize the control flow graph of a declaration.
Here's the outcome for this piece of code, fully resolved.
```kotlin
package function.equality
import kotlinx.coroutines.*
fun increment(x: Int) = x + 1
```

