Added support for destructors! This is done by making a void, parameterless member method called destruct which is called when a stack object falls out of scope, if it exists. This is implemented by the generator, in this case CGenerator.
This commit is contained in:
@@ -61,7 +61,7 @@ for_loop = "for" WS "\(" WS statement WS boolean_expression WS ";" WS statement
|
||||
|
||||
return_statement = "return" | "return" WS boolean_expression ;
|
||||
|
||||
code_block = "{" WS statement_list WS "}" ;
|
||||
code_block = "{" WS statement_list WS "}" | "{" WS "}" ;
|
||||
|
||||
statement_list = statement_list WS statement | statement ;
|
||||
statement = if_statement | while_loop | for_loop | return_statement WS ";" | boolean_expression WS ";" | assignment_statement WS ";" | declaration_statement WS ";" | code_block | if_comp | simple_passthrough ;
|
||||
|
||||
Reference in New Issue
Block a user