1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

Turn C# destructors into finalize() methods.

TODO: probably should call super.finalize()
This commit is contained in:
Kevin Glynn 2010-07-12 20:11:50 -05:00
parent 4c9ef39275
commit 7069b42023

View File

@ -1424,12 +1424,18 @@ staticConstructorBody [Object w]
: body[w]
;
destructorDeclaration [Object w]
destructorDeclaration! [Object w]
: #( DTOR_DECL attributes[w] modifiers[w] identifier[w]
destructorBody[w]
)
b:destructorBody[w]
)
{ ## = #( [METHOD_DECL],
#( [MODIFIERS], [PROTECTED, "protected"] ),
#( [TYPE], [VOID, "void"], #( [ARRAY_RANKS] ) ),
#( [IDENTIFIER, "finalize"]) ,
#( [FORMAL_PARAMETER_LIST] ), #( [THROWS, "throws"], [IDENTIFIER, "Throwable"] ),
astFactory.dupTree(#b) ); }
;
destructorBody [Object w]
: body[w]
;