Does anyone know if there is a way to get the star...
# compiler
m
Does anyone know if there is a way to get the start line number from an IrFunction declaration? (working on a compiler plugin)
s
startOffset usually shows the character offset in file. Not sure it is possible to get the line number though. Why do you need it on this level? If you are working on error detection, it is more correct to use PSI (and call/declaration checkers) for that.
m
I just solved it -> basically you can use the irFile.
irFile.fileEntry.getLineNumber...
accepts the offset as argument and you can calculate the position of any element. In case anyone needs this
👌 2