blob: eef184c7848fd1823b3f952fa16cc49ec531d904 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 2016 IBM Corporation and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
*******************************************************************************/
package org.eclipse.dltk.python.parser.ast;
import org.eclipse.dltk.ast.DLTKToken;
import org.eclipse.dltk.ast.expressions.Expression;
import org.eclipse.dltk.python.parser.ast.statements.SimpleStatement;
import org.eclipse.dltk.utils.CorePrinter;
public class PythonYieldStatement extends SimpleStatement {
public PythonYieldStatement(DLTKToken t, Expression expression) {
super(t, expression);
}
@Override
public int getKind() {
return PythonConstants.S_YIELD;
}
@Override
public void printNode( CorePrinter output ) {
output.formatPrintLn( "yield " );
if( this.fExpression != null ) {
this.fExpression.printNode(output);
}
}
}