protected override void TranslateReturnStatement(List<string> output, ReturnStatement returnStatement) { output.Add(this.CurrentTabIndention); output.Add("return"); if (returnStatement.Expression != null) { output.Add(" "); TranslateExpression(output, returnStatement.Expression); } output.Add("\r\n"); }
protected override void TranslateReturnStatement(List<string> output, ReturnStatement returnStatement) { output.Add(this.CurrentTabIndention); output.Add("return "); if (returnStatement.Expression != null) { TranslateExpression(output, returnStatement.Expression); } else { this.TranslateNullConstant(output, null); } output.Add(";" + this.NL); }
private void CompileReturnStatement(Parser parser, ByteBuffer buffer, ReturnStatement returnStatement) { if (returnStatement.Expression == null || returnStatement.Expression is NullConstant) { buffer.Add(returnStatement.FirstToken, OpCode.RETURN, 0); } else { this.CompileExpression(parser, buffer, returnStatement.Expression, true); buffer.Add(returnStatement.FirstToken, OpCode.RETURN, 1); } }
protected abstract void TranslateReturnStatement(List<string> output, ReturnStatement returnStatement);