diff options
author | Juerg Billeter <j@bitron.ch> | 2007-09-17 18:28:38 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2007-09-17 18:28:38 +0000 |
commit | d4b0b21e6b8b2e35b8049c618b7f9dc704b5f744 (patch) | |
tree | 231fbb9dcc8fb18e84296958033ed6884b209ecf /vala/valareturnstatement.vala | |
parent | 6b906cd7c6d906854564cdb09035a46e687d0215 (diff) | |
download | vala-d4b0b21e6b8b2e35b8049c618b7f9dc704b5f744.tar.gz |
switch return statement to external visitor
2007-09-17 Juerg Billeter <j@bitron.ch>
* vala/valacodevisitor.vala, vala/valamemorymanager.vala,
vala/valareturnstatement.vala, vala/valasemanticanalyzer.vala,
vala/valasymbolresolver.vala, gobject/valacodegenerator.vala: switch
return statement to external visitor
svn path=/trunk/; revision=613
Diffstat (limited to 'vala/valareturnstatement.vala')
-rw-r--r-- | vala/valareturnstatement.vala | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/vala/valareturnstatement.vala b/vala/valareturnstatement.vala index b082450f5..a5886228f 100644 --- a/vala/valareturnstatement.vala +++ b/vala/valareturnstatement.vala @@ -30,9 +30,7 @@ public class Vala.ReturnStatement : CodeNode, Statement { * The optional expression to return. */ public Expression return_expression { - get { - return _return_expression; - } + get { return _return_expression; } set { _return_expression = value; if (_return_expression != null) { @@ -46,25 +44,23 @@ public class Vala.ReturnStatement : CodeNode, Statement { /** * Creates a new return statement. * - * @param result the return expression - * @param source reference to source code - * @return newly created return statement + * @param return_expression the return expression + * @param source_reference reference to source code + * @return newly created return statement */ - public ReturnStatement (Expression result = null, SourceReference source = null) { - return_expression = result; - source_reference = source; + public ReturnStatement (construct Expression return_expression = null, construct SourceReference source_reference = null) { } - + public override void accept (CodeVisitor! visitor) { - visitor.visit_begin_return_statement (this); + visitor.visit_return_statement (this); + } + public override void accept_children (CodeVisitor! visitor) { if (return_expression != null) { return_expression.accept (visitor); visitor.visit_end_full_expression (return_expression); } - - visitor.visit_end_return_statement (this); } public override void replace (CodeNode! old_node, CodeNode! new_node) { |