public class EvalFunctionsAtTopScope extends JsModVisitor
StaticEvalVisitor
simpler in that we no
longer have to worry about function declarations within expressions. After
this runs, only statements can contain declarations. Moved functions will end
up just before the statement in which they presently reside.didChange
LVALUE_CONTEXT, UNMODIFIABLE_CONTEXT
Constructor and Description |
---|
EvalFunctionsAtTopScope(JavaToJavaScriptMap java2jsMap) |
Modifier and Type | Method and Description |
---|---|
void |
endVisit(JsExprStmt x,
JsContext ctx) |
void |
endVisit(JsFunction x,
JsContext ctx) |
void |
endVisit(JsProgramFragment x,
JsContext ctx) |
void |
endVisit(JsProgram x,
JsContext ctx) |
static void |
exec(JsProgram jsProgram,
JavaToJavaScriptMap map) |
boolean |
visit(JsBlock x,
JsContext ctx) |
boolean |
visit(JsExprStmt x,
JsContext ctx) |
boolean |
visit(JsFunction x,
JsContext ctx) |
boolean |
visit(JsProgramFragment x,
JsContext ctx) |
boolean |
visit(JsProgram x,
JsContext ctx) |
checkReplacement, didChange, doAccept, doAcceptList, doAcceptLvalue, doAcceptWithInsertRemove
accept, acceptList, acceptLvalue, acceptWithInsertRemove, doTraverse, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
public EvalFunctionsAtTopScope(JavaToJavaScriptMap java2jsMap)
public static void exec(JsProgram jsProgram, JavaToJavaScriptMap map)
public void endVisit(JsExprStmt x, JsContext ctx)
public void endVisit(JsFunction x, JsContext ctx)
public void endVisit(JsProgramFragment x, JsContext ctx)
public boolean visit(JsExprStmt x, JsContext ctx)
public boolean visit(JsFunction x, JsContext ctx)
public boolean visit(JsProgramFragment x, JsContext ctx)
Copyright © 2018. All rights reserved.