:wave: I figure it is unlikely, since it’s unnece...
# compiler
t
👋 I figure it is unlikely, since it’s unnecessary for the compiler, but I was wondering if there is a setting in the compiler that will preserve the original PSI from the source code in the FIR? Or are there any utilities I could use to return modifiers and annotations on. FirElement in source code order?
d
The compiler saves original syntax tree in FIR elements in
FirElement.source
property By default compiler does not use PSI during CLI compilation, but you can force it to do it with
-Xuse-fir-lt=false
flag
t
Great, I’ll check that option out. From what I observed the PSI that is stored in the FirElement.source is changed (CR in CRLF is removed, unnecessary parens are removed, etc.), I’ll check out the flag, thank you!