You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
536 B

2 years ago
import Node from './Node.js';
class BypassNode extends Node {
constructor( returnNode, callNode ) {
super();
this.isBypassNode = true;
this.outputNode = returnNode;
this.callNode = callNode;
}
getNodeType( builder ) {
return this.outputNode.getNodeType( builder );
}
generate( builder, output ) {
const snippet = this.callNode.build( builder, 'void' );
if ( snippet !== '' ) {
builder.addFlowCode( snippet );
}
return this.outputNode.build( builder, output );
}
}
export default BypassNode;