| 794 | } |
| 795 | |
| 796 | override print(ctx: PrintContext) { |
| 797 | const {isFullDeclaraion, isMethodDeclaration, isClassDeclaration} = this.getPrintMode(ctx); |
| 798 | let result = ctx.prefix; |
| 799 | if (isClassDeclaration && this.modifiers.includes('virtual')) |
| 800 | result += 'virtual '; |
| 801 | if (isMethodDeclaration) |
| 802 | result += `${this.name}::`; |
| 803 | result += `~${this.name}()`; |
| 804 | if (isMethodDeclaration || isFullDeclaraion) |
| 805 | result += ' ' + (this.body?.print(ctx) ?? '= default;'); |
| 806 | else |
| 807 | result += ';'; |
| 808 | return result; |
| 809 | } |
| 810 | } |
| 811 | |
| 812 | export class PropertyDeclaration extends ClassElement { |