public class IfEmitter extends JSSubEmitter implements ISubEmitter<IIfNode>
Constructor and Description |
---|
IfEmitter(IJSEmitter emitter) |
Modifier and Type | Method and Description |
---|---|
void |
emit(IIfNode node)
The main emitter will call this method of the sub emitter with the
correct generic type implemented.
|
protected void |
emitConditional(IConditionalNode node,
boolean isElseIf) |
protected void |
emitElse(ITerminalNode node) |
endMapping, getEmitter, getModel, getProject, getWalker, indentPop, indentPush, startMapping, startMapping, startMapping, write, write, writeNewline, writeNewline, writeNewline, writeNewline, writeNewline, writeToken, writeToken
public IfEmitter(IJSEmitter emitter)
public void emit(IIfNode node)
ISubEmitter
The main idea here is abstraction. Producing JavaScript can get complicated, the best way to avoid bugs is to avoid as much state and interdependence between emit() calls of the main emitter.
emit
in interface ISubEmitter<IIfNode>
node
- The current IASNode
being emitted by the
IEmitter
.protected void emitConditional(IConditionalNode node, boolean isElseIf)
protected void emitElse(ITerminalNode node)
Copyright © 2016 The Apache Software Foundation. All rights reserved.