SE: SystemVerilog keyword 'class' is not expected to be used in this context

In reply to dave_59:

I am getting as “class” not expected in the first line of generator.sv after parsing transaction.sv. And I have run the same code without package in EDA it was working fine. But in tool it is showing this.