Class RhinoToAstTranslator
java.lang.Object
com.ibm.wala.cast.js.translator.RhinoToAstTranslator
- All Implemented Interfaces:
TranslatorToCAst
-
Nested Class Summary
Nested classes/interfaces inherited from interface TranslatorToCAst
TranslatorToCAst.DelegatingContext<C,T>, TranslatorToCAst.DoLoopTranslator, TranslatorToCAst.Error -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRhinoToAstTranslator(CAst Ast, ModuleEntry m, String scriptName, boolean replicateForDoLoops) RhinoToAstTranslator(CAst Ast, ModuleEntry m, String scriptName, boolean replicateForDoLoops, boolean useNewForIn) -
Method Summary
Modifier and TypeMethodDescription<C extends CAstRewriter.RewriteContext<K>, K extends CAstRewriter.CopyKey<K>>
voidaddRewriter(CAstRewriterFactory<C, K> factory, boolean prepend) parse the JavaScript code using Rhino, and then translate the resulting AST to CAstMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TranslatorToCAst
pushSourcePosition
-
Field Details
-
STANDARD_CALL_FN_NAME
a dummy name to use for standard function calls, only used to distinguish them from constructor calls- See Also:
-
CTOR_CALL_FN_NAME
name used for constructor calls, used to distinguish them from standard function calls- See Also:
-
-
Constructor Details
-
RhinoToAstTranslator
public RhinoToAstTranslator(CAst Ast, ModuleEntry m, String scriptName, boolean replicateForDoLoops) -
RhinoToAstTranslator
public RhinoToAstTranslator(CAst Ast, ModuleEntry m, String scriptName, boolean replicateForDoLoops, boolean useNewForIn)
-
-
Method Details
-
translateToCAst
public CAstEntity translateToCAst() throws TranslatorToCAst.Error, IOException, TranslatorToCAst.Errorparse the JavaScript code using Rhino, and then translate the resulting AST to CAst- Specified by:
translateToCAstin interfaceTranslatorToCAst- Throws:
TranslatorToCAst.ErrorIOException
-
addRewriter
public <C extends CAstRewriter.RewriteContext<K>, K extends CAstRewriter.CopyKey<K>> void addRewriter(CAstRewriterFactory<C, K> factory, boolean prepend) - Specified by:
addRewriterin interfaceTranslatorToCAst
-