public class JSEmitter extends ASEmitter implements IJSEmitter
IJSEmitter.SourceMapMapping| Constructor and Description |
|---|
JSEmitter(FilterWriter out) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLineToMappings(int lineIndex)
Adjusts the line numbers saved in the source map when a line should be
added during post processing.
|
void |
emitArguments(IContainerNode node) |
void |
emitBlockClose(IContainerNode node) |
void |
emitBlockOpen(IContainerNode node) |
void |
emitCatch(ICatchNode node)
Emit a
catch(){} statement. |
void |
emitClosureEnd(IASNode node,
IDefinition nodeDef) |
void |
emitClosureStart() |
void |
emitDoLoop(IWhileLoopNode node)
Emit a
do{}while() statement. |
void |
emitDynamicAccess(IDynamicAccessNode node) |
void |
emitForLoop(IForLoopNode node)
Emit a
for statement. |
void |
emitFunctionObject(IFunctionObjectNode node)
Emit an anonymous
IFunctionObjectNode. |
void |
emitIf(IIfNode node)
Emit a
if(){}else if(){}else{} statement. |
void |
emitIterationFlow(IIterationFlowNode node) |
void |
emitLanguageIdentifier(ILanguageIdentifierNode node) |
void |
emitLiteralContainer(ILiteralContainerNode node) |
void |
emitLocalNamedFunction(IFunctionNode node)
Emit an local named function
IFunctionNode. |
void |
emitMemberKeyword(IDefinitionNode node) |
void |
emitNumericLiteral(INumericLiteralNode node) |
void |
emitObjectLiteralValuePair(IObjectLiteralValuePairNode node) |
void |
emitParameter(IParameterNode node) |
void |
emitParameters(IContainerNode node) |
void |
emitReturn(IReturnNode node) |
void |
emitSourceMapDirective(ITypeNode node) |
void |
emitStatement(IASNode node)
Emit a statement found within an
IBlockNode. |
void |
emitSwitch(ISwitchNode node)
Emit a
switch(){} statement. |
void |
emitTernaryOperator(ITernaryOperatorNode node) |
void |
emitThrow(IThrowNode node)
Emit a
throw statement. |
void |
emitTry(ITryNode node)
Emit a
try{} statement. |
void |
emitTypedExpression(ITypedExpressionNode node) |
void |
emitUnaryOperator(IUnaryOperatorNode node) |
void |
emitWhileLoop(IWhileLoopNode node)
Emit a
while(){} statement. |
void |
emitWith(IWithNode node)
Emit a
with(){} statement. |
void |
endMapping(ISourceLocation node)
Commits a mapping to the source map.
|
String |
formatQualifiedName(String name) |
JSSessionModel |
getModel() |
List<IJSEmitter.SourceMapMapping> |
getSourceMapMappings() |
void |
popSourceMapName() |
void |
pushSourceMapName(ISourceLocation node) |
protected void |
removeLineFromMappings(int lineIndex)
Adjusts the line numbers saved in the source map when a line should be
removed during post processing.
|
void |
startMapping(ISourceLocation node)
Adds a node to the source map.
|
void |
startMapping(ISourceLocation node,
int line,
int column)
Adds a node to the source map using custom line and column values,
instead of the node's own line and column.
|
void |
startMapping(ISourceLocation node,
ISourceLocation afterNode)
Adds a node to the source map after a particular node instead using the
node's own line and column.
|
emitAccessorKeyword, emitAsOperator, emitAssignedValue, emitBinaryOperator, emitClass, emitContainer, emitDeclarationName, emitE4XFilter, emitField, emitFieldDocumentation, emitForEachLoop, emitFunctionBlockHeader, emitFunctionCall, emitFunctionScope, emitGetAccessor, emitGetAccessorDocumentation, emitIdentifier, emitImport, emitInterface, emitIsOperator, emitKeyword, emitLabelStatement, emitLiteral, emitMemberAccessExpression, emitMemberName, emitMetaTag, emitMethod, emitMethodDocumentation, emitMethodScope, emitModifiers, emitNamespace, emitNamespaceAccessExpression, emitNamespaceIdentifier, emitPackageContents, emitPackageFooter, emitPackageHeader, emitPackageHeaderContents, emitSetAccessor, emitSetAccessorDocumentation, emitType, emitUseNamespace, emitVarDeclaration, emitVariableExpression, findType, findTypeNode, flushBuilder, getBuilder, getConstructor, getCurrentColumn, getCurrentIndent, getCurrentLine, getDocEmitter, getIndent, getProblems, getWalker, indentPop, indentPush, isBufferWrite, isImplicit, isLastStatement, postProcess, setBufferWrite, setBuilder, setDocEmitter, setWalker, stringifyNode, visitForBody, write, write, writeIndent, writeNewline, writeNewline, writeNewline, writeNewline, writeNewline, writeSymbol, writeToken, writeTokenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitemitAsOperator, emitBinaryOperator, emitClass, emitContainer, emitE4XFilter, emitField, emitFieldDocumentation, emitForEachLoop, emitFunctionBlockHeader, emitFunctionCall, emitGetAccessor, emitGetAccessorDocumentation, emitIdentifier, emitImport, emitInterface, emitIsOperator, emitKeyword, emitLabelStatement, emitLiteral, emitMemberAccessExpression, emitMetaTag, emitMethod, emitMethodDocumentation, emitNamespace, emitNamespaceAccessExpression, emitPackageContents, emitPackageFooter, emitPackageHeader, emitPackageHeaderContents, emitSetAccessor, emitSetAccessorDocumentation, emitUseNamespace, emitVarDeclaration, emitVariableExpression, getDocEmitter, getWalker, postProcess, setDocEmitter, setWalkerindentPop, indentPush, stringifyNode, write, write, writeNewline, writeNewline, writeNewline, writeNewline, writeNewline, writeToken, writeTokenpublic ISubEmitter<IContainerNode> blockOpenEmitter
public ISubEmitter<IContainerNode> blockCloseEmitter
public ISubEmitter<INumericLiteralNode> numericLiteralEmitter
public ISubEmitter<IContainerNode> parametersEmitter
public ISubEmitter<IParameterNode> parameterEmitter
public ISubEmitter<IContainerNode> functionCallArgumentsEmitter
public ISubEmitter<ILiteralContainerNode> literalContainerEmitter
public ISubEmitter<IObjectLiteralValuePairNode> objectLiteralValuePairEmitter
public ISubEmitter<IReturnNode> returnEmitter
public ISubEmitter<IDynamicAccessNode> dynamicAccessEmitter
public ISubEmitter<IUnaryOperatorNode> unaryOperatorEmitter
public ISubEmitter<ITernaryOperatorNode> ternaryOperatorEmitter
public ISubEmitter<IDefinitionNode> memberKeywordEmitter
public ISubEmitter<IIfNode> ifEmitter
public ISubEmitter<ISwitchNode> switchEmitter
public ISubEmitter<IWhileLoopNode> whileLoopEmitter
public ISubEmitter<IWhileLoopNode> doWhileLoopEmitter
public ISubEmitter<IForLoopNode> forLoopEmitter
public ISubEmitter<IIterationFlowNode> interationFlowEmitter
public ISubEmitter<ITryNode> tryEmitter
public ISubEmitter<ICatchNode> catchEmitter
public ISubEmitter<IThrowNode> throwEmitter
public ISubEmitter<IWithNode> withEmitter
public ISubEmitter<IASNode> statementEmitter
public ISubEmitter<ILanguageIdentifierNode> languageIdentifierEmitter
public SourceMapDirectiveEmitter sourceMapDirectiveEmitter
public JSEmitter(FilterWriter out)
public JSSessionModel getModel()
getModel in interface IJSEmitterpublic List<IJSEmitter.SourceMapMapping> getSourceMapMappings()
getSourceMapMappings in interface IJSEmitterpublic String formatQualifiedName(String name)
formatQualifiedName in interface IJSEmitterpublic void emitLocalNamedFunction(IFunctionNode node)
IASEmitterIFunctionNode.emitLocalNamedFunction in interface IASEmitteremitLocalNamedFunction in class ASEmitternode - The local named function IFunctionNode.public void emitFunctionObject(IFunctionObjectNode node)
IASEmitterIFunctionObjectNode.emitFunctionObject in interface IASEmitteremitFunctionObject in class ASEmitternode - The anonymous IFunctionObjectNode.public void emitClosureStart()
emitClosureStart in interface IJSEmitterpublic void emitClosureEnd(IASNode node, IDefinition nodeDef)
emitClosureEnd in interface IJSEmitterpublic void emitSourceMapDirective(ITypeNode node)
emitSourceMapDirective in interface IJSEmitterpublic void emitParameters(IContainerNode node)
emitParameters in class ASEmitterpublic void emitParameter(IParameterNode node)
emitParameter in interface IASEmitteremitParameter in class ASEmitterpublic void emitArguments(IContainerNode node)
emitArguments in interface IASEmitteremitArguments in class ASEmitterpublic void emitNumericLiteral(INumericLiteralNode node)
emitNumericLiteral in interface IASEmitteremitNumericLiteral in class ASEmitterpublic void emitLiteralContainer(ILiteralContainerNode node)
emitLiteralContainer in interface IASEmitteremitLiteralContainer in class ASEmitterpublic void emitObjectLiteralValuePair(IObjectLiteralValuePairNode node)
emitObjectLiteralValuePair in interface IASEmitteremitObjectLiteralValuePair in class ASEmitterpublic void emitTry(ITryNode node)
IASEmittertry{} statement.emitTry in interface IASEmitteremitTry in class ASEmitternode - The ITryNode node.public void emitCatch(ICatchNode node)
IASEmittercatch(){} statement.emitCatch in interface IASEmitteremitCatch in class ASEmitternode - The ICatchNode node.public void emitWith(IWithNode node)
IASEmitterwith(){} statement.emitWith in interface IASEmitteremitWith in class ASEmitternode - The IWithNode node.public void emitThrow(IThrowNode node)
IASEmitterthrow statement.emitThrow in interface IASEmitteremitThrow in class ASEmitternode - The IThrowNode node.public void emitReturn(IReturnNode node)
emitReturn in interface IASEmitteremitReturn in class ASEmitterpublic void emitTypedExpression(ITypedExpressionNode node)
emitTypedExpression in interface IASEmitteremitTypedExpression in class ASEmitterpublic void emitDynamicAccess(IDynamicAccessNode node)
emitDynamicAccess in interface IASEmitteremitDynamicAccess in class ASEmitterpublic void emitMemberKeyword(IDefinitionNode node)
emitMemberKeyword in class ASEmitterpublic void emitUnaryOperator(IUnaryOperatorNode node)
emitUnaryOperator in interface IASEmitteremitUnaryOperator in class ASEmitterpublic void emitTernaryOperator(ITernaryOperatorNode node)
emitTernaryOperator in interface IASEmitteremitTernaryOperator in class ASEmitterpublic void emitLanguageIdentifier(ILanguageIdentifierNode node)
emitLanguageIdentifier in interface IASEmitteremitLanguageIdentifier in class ASEmitterpublic void emitStatement(IASNode node)
IASEmitterIBlockNode.emitStatement in interface IASEmitteremitStatement in class ASEmitternode - The IASNode statement.public void emitIf(IIfNode node)
IASEmitterif(){}else if(){}else{} statement.emitIf in interface IASEmitteremitIf in class ASEmitternode - The IIfNode node.public void emitSwitch(ISwitchNode node)
IASEmitterswitch(){} statement.emitSwitch in interface IASEmitteremitSwitch in class ASEmitternode - The ISwitchNode node.public void emitWhileLoop(IWhileLoopNode node)
IASEmitterwhile(){} statement.emitWhileLoop in interface IASEmitteremitWhileLoop in class ASEmitternode - The IWhileLoopNode node.public void emitDoLoop(IWhileLoopNode node)
IASEmitterdo{}while() statement.emitDoLoop in interface IASEmitteremitDoLoop in class ASEmitternode - The IWhileLoopNode node.public void emitForLoop(IForLoopNode node)
IASEmitterfor statement.emitForLoop in interface IASEmitteremitForLoop in class ASEmitternode - The IForLoopNode node.public void emitIterationFlow(IIterationFlowNode node)
emitIterationFlow in interface IASEmitteremitIterationFlow in class ASEmitterpublic void emitBlockOpen(IContainerNode node)
emitBlockOpen in interface IASEmitteremitBlockOpen in class ASEmitterpublic void emitBlockClose(IContainerNode node)
emitBlockClose in interface IASEmitteremitBlockClose in class ASEmitterpublic void pushSourceMapName(ISourceLocation node)
pushSourceMapName in interface IJSEmitterpublic void popSourceMapName()
popSourceMapName in interface IJSEmitterpublic void startMapping(ISourceLocation node)
IJSEmitterstartMapping in interface IJSEmitterpublic void startMapping(ISourceLocation node, int line, int column)
IJSEmitterstartMapping in interface IJSEmitterpublic void startMapping(ISourceLocation node, ISourceLocation afterNode)
IJSEmitterstartMapping in interface IJSEmitterpublic void endMapping(ISourceLocation node)
IJSEmitterendMapping in interface IJSEmitterprotected void addLineToMappings(int lineIndex)
lineIndex - protected void removeLineFromMappings(int lineIndex)
lineIndex - Copyright © 2016 The Apache Software Foundation. All rights reserved.