Uses of Class
org.mozilla.javascript.ast.AstNode
-
Packages that use AstNode Package Description org.mozilla.javascript org.mozilla.javascript.ast -
-
Uses of AstNode in org.mozilla.javascript
Methods in org.mozilla.javascript that return AstNode Modifier and Type Method Description protected AstNodeParser. removeParens(AstNode node)Methods in org.mozilla.javascript with parameters of type AstNode Modifier and Type Method Description protected AstNodeParser. removeParens(AstNode node)NodeIRFactory. transform(AstNode node) -
Uses of AstNode in org.mozilla.javascript.ast
Subclasses of AstNode in org.mozilla.javascript.ast Modifier and Type Class Description classArrayComprehensionAST node for a JavaScript 1.7 Array comprehension.classArrayComprehensionLoopAST node for a single 'for (foo in bar)' loop construct in a JavaScript 1.7 Array comprehension.classArrayLiteralAST node for an Array literal.classAssignmentAST node representing the set of assignment operators such as=,*=and+=.classAstRootNode for the root of a parse tree.classBigIntLiteralAST node for a BigInt literal.classBlockA block statement delimited by curly braces.classBreakStatementA break statement.classCatchClauseNode representing a catch-clause of a try-statement.classCommentNode representing comments.classConditionalExpressionAST node representing the ternary operator.classContinueStatementA continue statement.classDoLoopDo statement.classElementGetAST node for an indexed property reference, such asfoo['bar']orfoo[2].classEmptyExpressionAST node for an empty expression.classEmptyStatementAST node for an empty statement.classErrorNodeAST node representing a parse error or a warning.classExpressionStatementAST node representing an expression in a statement context.classForInLoopFor-in or for-each-in or for-of statement.classForLoopC-style for-loop statement.classFunctionCallAST node for a function call.classFunctionNodeA JavaScript function declaration or expression.classGeneratorExpressionclassGeneratorExpressionLoopclassIfStatementIf-else statement.classInfixExpressionAST node representing an infix (binary operator) expression.classJumpUsed for code generation.classKeywordLiteralAST node for keyword literals: currently,this,null,true,false, anddebugger.classLabelAST node representing a label.classLabeledStatementA labeled statement.classLetNodeAST node for let statements and expressions.classLoopAbstract base type for loops.classNameAST node for a simple name.classNewExpressionNew expression.classNumberLiteralAST node for a Number literal.classObjectLiteralAST node for an Object literal (also called an Object initialiser in Ecma-262).classObjectPropertyAST node for a single name:value entry in an Object literal.classParenthesizedExpressionAST node for a parenthesized expression.classPropertyGetAST node for the '.' operator.classRegExpLiteralAST node for a RegExp literal.classReturnStatementReturn statement.classScopeRepresents a scope in the lexical scope chain.classScriptNodeBase type forAstRootandFunctionNodenodes, which need to collect much of the same information.classStringLiteralAST node for a single- or double-quoted string literal.classSwitchCaseSwitch-case AST node type.classSwitchStatementSwitch statement AST node type.classTaggedTemplateLiteralAST node for a Tagged Template Literal.classTemplateCharactersAST node for Template Literal Characters.classTemplateLiteralAST node for a Template literal.classThrowStatementThrow statement.classTryStatementTry/catch/finally statement.classUnaryExpressionAST node representing unary operators such astypeofanddelete.classUpdateExpressionAST node representing update operators such as++.classVariableDeclarationA list of one or more var, const or let declarations.classVariableInitializerA variable declaration or initializer, part of aVariableDeclarationexpression.classWhileLoopWhile statement.classWithStatementWith statement.classXmlDotQueryAST node representing an E4Xfoo.(bar)query expression.classXmlElemRefAST node for an E4X XML[expr]member-ref expression.classXmlExpressionAST node for an embedded JavaScript expression within an E4X XML literal.classXmlFragmentAbstract base type for components that comprise anXmlLiteralobject.classXmlLiteralAST node for an E4X (Ecma-357) embedded XML literal.classXmlMemberGetAST node for E4X ".@" and ".." expressions, such asfoo..bar,foo..@bar,@foo.@bar, andfoo..@ns::*.classXmlPropRefAST node for an E4X XML[expr]property-ref expression.classXmlRefBase class for E4X XML attribute-access or property-get expressions.classXmlStringAST node for an XML-text-only component of an XML literal expression.classYieldAST node for JavaScript 1.7yieldexpression or statement.Fields in org.mozilla.javascript.ast declared as AstNode Modifier and Type Field Description protected AstNodeLoop. bodyprotected AstNodeAstNode. inlineCommentprotected AstNodeForInLoop. iteratedObjectprotected AstNodeForInLoop. iteratorprotected AstNodeInfixExpression. leftprotected AstNodeAstNode. parentprotected AstNodeInfixExpression. rightprotected AstNodeFunctionCall. targetFields in org.mozilla.javascript.ast with type parameters of type AstNode Modifier and Type Field Description protected java.util.List<AstNode>FunctionCall. argumentsprotected static java.util.List<AstNode>FunctionCall. NO_ARGSMethods in org.mozilla.javascript.ast with type parameters of type AstNode Modifier and Type Method Description protected <T extends AstNode>
voidAstNode. printList(java.util.List<T> items, java.lang.StringBuilder sb)Prints a comma-separated item list into aStringBuilder.Methods in org.mozilla.javascript.ast that return AstNode Modifier and Type Method Description AstNodeArrayComprehensionLoop. getBody()Returnsnullfor loop bodyAstNodeFunctionNode. getBody()Returns function body.AstNodeLetNode. getBody()Returns body statement or expression.AstNodeLoop. getBody()Returns loop bodyAstNodeBreakStatement. getBreakTarget()Returns the statement to break toAstNodeCatchClause. getCatchCondition()Returns catch condition node, if presentAstNodeDoLoop. getCondition()Returns loop conditionAstNodeForLoop. getCondition()Returns loop conditionAstNodeIfStatement. getCondition()Returns if conditionAstNodeWhileLoop. getCondition()Returns loop conditionAstNodeArrayLiteral. getElement(int index)Returns element at specified index.AstNodeElementGet. getElement()Returns the element being accessedAstNodeTemplateLiteral. getElement(int index)Returns element at specified index.AstNodeIfStatement. getElseKeyWordInlineComment()AstNodeIfStatement. getElsePart()Returns statement to execute if condition is falseAstNodeExpressionStatement. getExpression()Returns the wrapped expressionAstNodeParenthesizedExpression. getExpression()Returns the expression between the parensAstNodeSwitchCase. getExpression()Returns the case expression,nullfor default caseAstNodeSwitchStatement. getExpression()Returns the switch discriminant expressionAstNodeThrowStatement. getExpression()Returns the expression being thrownAstNodeWithStatement. getExpression()Returns object expressionAstNodeXmlElemRef. getExpression()Returns index expression: the 'expr' in@[expr]or@*::[expr].AstNodeXmlExpression. getExpression()Returns the expression embedded in {}AstNodeConditionalExpression. getFalseExpression()Returns expression to evaluate if test is falseAstNodeArrayComprehension. getFilter()Returns filter expression, ornullif not presentAstNodeGeneratorExpression. getFilter()Returns filter expression, ornullif not presentAstNodeTryStatement. getFinallyBlock()Returns finally block, ornullif not presentAstNodeForLoop. getIncrement()Returns loop increment expressionAstNodeForLoop. getInitializer()Returns loop initializer variable declaration list.AstNodeVariableInitializer. getInitializer()Returns the initial value, ornullif not providedAstNodeAstNode. getInlineComment()AstNodeForInLoop. getIteratedObject()Returns object being iterated overAstNodeForInLoop. getIterator()Returns loop iterator expressionAstNodeInfixExpression. getLeft()Returns the left-hand side of the expressionAstNodeFunctionNode. getMemberExprNode()AstNodeUnaryExpression. getOperand()AstNodeUpdateExpression. getOperand()AstNodeAstNode. getParent()Returns the node parent, ornullif it has noneAstNodeArrayComprehension. getResult()Returns result expression node (just after opening bracket)AstNodeGeneratorExpression. getResult()Returns result expression node (just after opening bracket)AstNodeReturnStatement. getReturnValue()Returns return value,nullif return value is voidAstNodeInfixExpression. getRight()Returns the right-hand side of the expressionAstNodeLabeledStatement. getStatement()Returns the labeled statementAstNodeWithStatement. getStatement()Returns the statement or blockAstNodeElementGet. getTarget()Returns the object on which the element is being fetched.AstNodeFunctionCall. getTarget()Returns node evaluating to the function to callAstNodePropertyGet. getTarget()Returns the object on which the property is being fetched.AstNodeTaggedTemplateLiteral. getTarget()AstNodeVariableInitializer. getTarget()Returns the variable name or destructuring formAstNodeXmlMemberGet. getTarget()Returns the object on which the XML member-ref expression is being evaluated.AstNodeTaggedTemplateLiteral. getTemplateLiteral()AstNodeConditionalExpression. getTestExpression()Returns test expressionAstNodeIfStatement. getThenPart()Returns statement to execute if condition is trueAstNodeConditionalExpression. getTrueExpression()Returns expression to evaluate if test is trueAstNodeTryStatement. getTryBlock()AstNodeYield. getValue()Returns yielded expression,nullif noneMethods in org.mozilla.javascript.ast that return types with arguments of type AstNode Modifier and Type Method Description java.util.List<AstNode>FunctionCall. getArguments()Returns function argument listjava.util.List<AstNode>ArrayLiteral. getElements()Returns the element listjava.util.List<AstNode>TemplateLiteral. getElements()Returns the element listjava.util.List<AstNode>FunctionNode. getParams()Returns the function parameter listjava.util.List<AstNode>Scope. getStatements()Returns a copy of the child list, with each child cast to anAstNode.java.util.List<AstNode>SwitchCase. getStatements()Returns statement list, which may benull.java.util.List<AstNode>TemplateLiteral. getSubstitutions()Returns a list of all substitutions of this template literalMethods in org.mozilla.javascript.ast with parameters of type AstNode Modifier and Type Method Description voidFunctionCall. addArgument(AstNode arg)Adds an argument to the list, and sets its parent to this node.voidAstNode. addChild(AstNode kid)Adds a child or function to the end of the block.voidArrayLiteral. addElement(AstNode element)Adds an element to the list, and sets its parent to this node.voidTemplateLiteral. addElement(AstNode element)Adds an element to the list, and sets its parent to this node.voidFunctionNode. addParam(AstNode param)Adds a parameter to the function parameter list.voidBlock. addStatement(AstNode statement)Alias foraddChild(org.mozilla.javascript.ast.AstNode).voidSwitchCase. addStatement(AstNode statement)Adds a statement to the end of the statement list.intAstNode.PositionComparator. compare(AstNode n1, AstNode n2)Sorts nodes by (relative) start position.intAstNode. compareTo(AstNode other)Permits AST nodes to be sorted based on start position and length.booleanFunctionNode. isParam(AstNode node)Returns true if the specifiedAstNodenode is a parameter of this Function node.voidArrayComprehensionLoop. setBody(AstNode body)Throws an exception on attempts to set the loop body.voidFunctionNode. setBody(AstNode body)Sets function body, and sets its parent to this node.voidLetNode. setBody(AstNode body)Sets body statement or expression.voidLoop. setBody(AstNode body)Sets loop body.voidCatchClause. setCatchCondition(AstNode catchCondition)Sets catch condition node, and sets its parent to this node.voidDoLoop. setCondition(AstNode condition)Sets loop condition, and sets its parent to this node.voidForLoop. setCondition(AstNode condition)Sets loop condition, and sets its parent to this node.voidIfStatement. setCondition(AstNode condition)Sets if condition.voidWhileLoop. setCondition(AstNode condition)Sets loop conditionvoidElementGet. setElement(AstNode element)Sets the element being accessed, and sets its parent to this node.voidIfStatement. setElseKeyWordInlineComment(AstNode elseKeyWordInlineComment)voidIfStatement. setElsePart(AstNode elsePart)Sets statement to execute if condition is falsevoidExpressionStatement. setExpression(AstNode expression)Sets the wrapped expression, and sets its parent to this node.voidParenthesizedExpression. setExpression(AstNode expression)Sets the expression between the parens, and sets the parent to this node.voidSwitchCase. setExpression(AstNode expression)Sets the case expression,nullfor default case.voidSwitchStatement. setExpression(AstNode expression)Sets the switch discriminant expression, and sets its parent to this node.voidThrowStatement. setExpression(AstNode expression)Sets the expression being thrown, and sets its parent to this node.voidWithStatement. setExpression(AstNode expression)Sets object expression (and its parent link)voidXmlElemRef. setExpression(AstNode expr)Sets index expression, and sets its parent to this node.voidXmlExpression. setExpression(AstNode expression)Sets the expression embedded in {}, and sets its parent to this node.voidConditionalExpression. setFalseExpression(AstNode falseExpression)Sets expression to evaluate if test is false, and sets its parent to this node.voidArrayComprehension. setFilter(AstNode filter)Sets filter expression, and sets its parent to this node.voidGeneratorExpression. setFilter(AstNode filter)Sets filter expression, and sets its parent to this node.voidTryStatement. setFinallyBlock(AstNode finallyBlock)Sets finally block, and sets its parent to this node.voidForLoop. setIncrement(AstNode increment)Sets loop increment expression, and sets its parent to this node.voidForLoop. setInitializer(AstNode initializer)Sets loop initializer expression, and sets its parent to this node.voidVariableInitializer. setInitializer(AstNode initializer)Sets the initial value expression, and sets its parent to this node.voidAstNode. setInlineComment(AstNode inlineComment)voidForInLoop. setIteratedObject(AstNode object)Sets object being iterated over, and sets its parent to this node.voidForInLoop. setIterator(AstNode iterator)Sets loop iterator expression: the part before the "in" or "of" keyword.voidInfixExpression. setLeft(AstNode left)Sets the left-hand side of the expression, and sets its parent to this node.voidInfixExpression. setLeftAndRight(AstNode left, AstNode right)voidFunctionNode. setMemberExprNode(AstNode node)Rhino supports a nonstandard Ecma extension that allows you to say, for instance, function a.b.c(arg1, arg) {...}, and it will be rewritten at codegen time to: a.b.c = function(arg1, arg2) {...} If we detect an expression other than a simple Name in the position where a function name was expected, we record that expression here.voidUnaryExpression. setOperand(AstNode operand)Sets the operand, and sets its parent to be this node.voidUpdateExpression. setOperand(AstNode operand)Sets the operand, and sets its parent to be this node.voidAstNode. setParent(AstNode parent)Sets the node parent.voidArrayComprehension. setResult(AstNode result)Sets result expression, and sets its parent to this node.voidGeneratorExpression. setResult(AstNode result)Sets result expression, and sets its parent to this node.voidReturnStatement. setReturnValue(AstNode returnValue)Sets return value expression, and sets its parent to this node.voidInfixExpression. setRight(AstNode right)Sets the right-hand side of the expression, and sets its parent to this node.voidLabeledStatement. setStatement(AstNode statement)Sets the labeled statement, and sets its parent to this node.voidWithStatement. setStatement(AstNode statement)Sets the statement (and sets its parent link)voidElementGet. setTarget(AstNode target)Sets target object, and sets its parent to this node.voidFunctionCall. setTarget(AstNode target)Sets node evaluating to the function to call, and sets its parent to this node.voidPropertyGet. setTarget(AstNode target)Sets target object, and sets its parent to this node.voidTaggedTemplateLiteral. setTarget(AstNode target)voidVariableInitializer. setTarget(AstNode target)Sets the variable name or destructuring form, and sets its parent to this node.voidXmlMemberGet. setTarget(AstNode target)Sets target object, and sets its parent to this node.voidTaggedTemplateLiteral. setTemplateLiteral(AstNode templateLiteral)voidConditionalExpression. setTestExpression(AstNode testExpression)Sets test expression, and sets its parent.voidIfStatement. setThenPart(AstNode thenPart)Sets statement to execute if condition is truevoidConditionalExpression. setTrueExpression(AstNode trueExpression)Sets expression to evaluate if test is true, and sets its parent to this node.voidTryStatement. setTryBlock(AstNode tryBlock)Sets try block.voidYield. setValue(AstNode expr)Sets yielded expression, and sets its parent to this node.booleanAstNode.DebugPrintVisitor. visit(AstNode node)booleanNodeVisitor. visit(AstNode node)Visits an AST node.Method parameters in org.mozilla.javascript.ast with type arguments of type AstNode Modifier and Type Method Description voidFunctionCall. setArguments(java.util.List<AstNode> arguments)Sets function argument listvoidArrayLiteral. setElements(java.util.List<AstNode> elements)Sets the element list, and sets each element's parent to this node.voidTemplateLiteral. setElements(java.util.List<AstNode> elements)Sets the element list, and sets each element's parent to this node.voidFunctionNode. setParams(java.util.List<AstNode> params)Sets the function parameter list, and sets the parent for each element of the list.voidSwitchCase. setStatements(java.util.List<AstNode> statements)Sets statement list.Constructors in org.mozilla.javascript.ast with parameters of type AstNode Constructor Description Assignment(int pos, int len, AstNode left, AstNode right)Assignment(int operator, AstNode left, AstNode right, int operatorPos)Assignment(AstNode left, AstNode right)ElementGet(AstNode target, AstNode element)ExpressionStatement(int pos, int len, AstNode expr)Constructs a newExpressionStatementExpressionStatement(AstNode expr)Constructs a newExpressionStatementwrapping the specified expression.ExpressionStatement(AstNode expr, boolean hasResult)Constructs a newExpressionStatementwrapping the specified expression.InfixExpression(int pos, int len, AstNode left, AstNode right)InfixExpression(int operator, AstNode left, AstNode right, int operatorPos)Constructs a newInfixExpression.InfixExpression(AstNode left, AstNode right)Constructs a newInfixExpression.ParenthesizedExpression(int pos, int len, AstNode expr)ParenthesizedExpression(AstNode expr)PropertyGet(int pos, int len, AstNode target, Name property)PropertyGet(AstNode target, Name property)Constructor.PropertyGet(AstNode target, Name property, int dotPosition)ReturnStatement(int pos, int len, AstNode returnValue)ThrowStatement(int pos, int len, AstNode expr)ThrowStatement(int pos, AstNode expr)ThrowStatement(AstNode expr)UnaryExpression(int operator, int operatorPosition, AstNode operand)Constructs a new UnaryExpression with the specified operator and operand.UpdateExpression(int operator, int operatorPosition, AstNode operand)Constructs a new prefix UpdateExpression.UpdateExpression(int operator, int operatorPosition, AstNode operand, boolean postFix)Constructs a new UpdateExpression with the specified operator and operand.XmlExpression(int pos, AstNode expr)XmlMemberGet(int pos, int len, AstNode target, XmlRef ref)XmlMemberGet(AstNode target, XmlRef ref)Constructs a newXmlMemberGetnode.XmlMemberGet(AstNode target, XmlRef ref, int opPos)Yield(int pos, int len, AstNode value, boolean isStar)
-