| java.lang.Object com.google.gwt.dev.js.rhino.IRFactory
IRFactory | public class IRFactory (Code) | | This class allows the creation of nodes, and follows the Factory pattern.
See Also: Node author: Mike McCabe author: Norris Boyd |
Method Summary | |
public void | addChildToBack(Object parent, Object child) Add a child to the back of the given node. | public Object | createArrayLiteral(Object obj) | public Object | createAssignment(int nodeOp, Node left, Node right, Class convert, boolean postfix) | public Object | createBinary(int nodeType, Object left, Object right) | public Object | createBinary(int nodeType, int nodeOp, Object left, Object right) | public Object | createBlock(int lineno) | public Object | createBreak(String label, int lineno) | public Object | createCatch(String varName, Object catchCond, Object stmts, int lineno) | public Object | createContinue(String label, int lineno) | public Object | createDebugger(int lineno) | public Object | createDoWhile(Object body, Object cond, int lineno) | public Object | createExprStatement(Object expr, int lineno) | public Object | createFor(Object init, Object test, Object incr, Object body, int lineno) | public Object | createForIn(Object lhs, Object obj, Object body, int lineno) For .. | public Object | createFunction(String name, Object args, Object statements, String sourceName, int baseLineno, int endLineno, Object source, boolean isExpr) | public Object | createIf(Object cond, Object ifTrue, Object ifFalse, int lineno) | public Object | createLabel(String label, int lineno) | public Object | createLeaf(int nodeType) | public Object | createLeaf(int nodeType, int nodeOp) | public Object | createName(String name) | public Object | createNumber(double number) | public Object | createObjectLiteral(Object obj) | public Object | createRegExp(String string, String flags) | public Object | createReturn(Object expr, int lineno) | public Object | createScript(Object body, String sourceName, int baseLineno, int endLineno, Object source) | public Object | createString(String string) | public Object | createSwitch(int lineno) Statement leaf nodes. | public Object | createTernary(Object cond, Object ifTrue, Object ifFalse) | public Object | createThrow(Object expr, int lineno) | public Object | createTryCatchFinally(Object tryblock, Object catchblocks, Object finallyblock, int lineno) | public Object | createUnary(int nodeType, Object child) | public Object | createUnary(int nodeType, int nodeOp, Object child) | public Object | createVariables(int lineno) | public Object | createWhile(Object cond, Object body, int lineno) | public Object | createWith(Object obj, Object body, int lineno) | public int | getLeafType(Object leaf) | public static boolean | hasSideEffects(Node exprTree) |
addChildToBack | public void addChildToBack(Object parent, Object child)(Code) | | Add a child to the back of the given node. This function
breaks the Factory abstraction, but it removes a requirement
from implementors of Node.
|
createBlock | public Object createBlock(int lineno)(Code) | | Statement block
Creates the empty statement block
Must make subsequent calls to add statements to the node
|
createBreak | public Object createBreak(String label, int lineno)(Code) | | Break (possibly labeled)
|
createCatch | public Object createCatch(String varName, Object catchCond, Object stmts, int lineno)(Code) | | Catch clause of try/catch/finally
Parameters: varName - the name of the variable to bind to the exception Parameters: catchCond - the condition under which to catch the exception.May be null if no condition is given. Parameters: stmts - the statements in the catch clause Parameters: lineno - the starting line number of the catch clause |
createContinue | public Object createContinue(String label, int lineno)(Code) | | Continue (possibly labeled)
|
createDebugger | public Object createDebugger(int lineno)(Code) | | debugger
|
createLeaf | public Object createLeaf(int nodeType, int nodeOp)(Code) | | |
createNumber | public Object createNumber(double number)(Code) | | Number (for literals)
|
createScript | public Object createScript(Object body, String sourceName, int baseLineno, int endLineno, Object source)(Code) | | Script (for associating file/url names with toplevel scripts.)
|
createSwitch | public Object createSwitch(int lineno)(Code) | | Statement leaf nodes.
|
createTryCatchFinally | public Object createTryCatchFinally(Object tryblock, Object catchblocks, Object finallyblock, int lineno)(Code) | | Try/Catch/Finally
|
createVariables | public Object createVariables(int lineno)(Code) | | |
hasSideEffects | public static boolean hasSideEffects(Node exprTree)(Code) | | |
|
|