Uses of Class
org.htmlunit.corejs.javascript.ast.AstNode
Packages that use AstNode
-
Uses of AstNode in org.htmlunit.corejs.javascript
Fields in org.htmlunit.corejs.javascript declared as AstNodeMethods in org.htmlunit.corejs.javascript that return AstNodeModifier and TypeMethodDescriptionprivate AstNodeParser.addExpr()private AstNodeParser.andExpr()private AstNodeParser.arrayComprehension(AstNode result, int pos) Parse a JavaScript 1.7 Array comprehension.private AstNodeParser.arrayLiteral()May return anArrayLiteralorArrayComprehension.private AstNodeParser.arrowFunction(AstNode params) private AstNodeParser.assignExpr()private AstNodeParser.attributeAccess()Xml attribute expression:private AstNodeParser.bitAndExpr()private AstNodeParser.bitOrExpr()private AstNodeParser.bitXorExpr()private AstNodeParser.block()private AstNodeParser.condExpr()private AstNodeParser.createNumericLiteral(int tt, boolean isProperty) private AstNodeParser.defaultXmlNamespace()private AstNodeParser.destructuringPrimaryExpr()private AstNodeParser.eqExpr()private AstNodeParser.expExpr()private AstNodeParser.expr(boolean allowTrailingComma) private AstNodeParser.forLoopInit(int tt) private AstNodeParser.generatorExpression(AstNode result, int pos) private AstNodeParser.generatorExpression(AstNode result, int pos, boolean inFunctionParams) private AstNodeParser.getNextStatementAfterInlineComments(AstNode pn) private AstNodeParser.let(boolean isStatement, int pos) private AstNodeParser.letStatement()private AstNodeParser.memberExpr(boolean allowCallSyntax) Parse a new-expression, or if next token isn'tToken.NEW, a primary expression.private AstNodeParser.memberExprTail(boolean allowCallSyntax, AstNode pn) Parse any number of "(expr)", "[expr]" ".expr", "..expr", or ".(expr)" constructs trailing the passed expression.private AstNodeParser.mulExpr()private AstNodeParser.name(int ttFlagged, int tt) private AstNodeParser.nameOrLabel()Found a name in a statement context.private AstNodeParser.objliteralProperty()private AstNodeParser.orExpr()private AstNodeParser.parenExpr()private AstNodeParser.parseFunctionBody(int type, FunctionNode fnNode) private AstNodeParser.primaryExpr()private AstNodeParser.propertyAccess(int tt, AstNode pn) Handles any construct following a "." or ".." operator.private AstNodeParser.propertyName(int atPos, int memberTypeFlags) Check if :: follows name in which case it becomes a qualified name.private AstNodeParser.relExpr()protected AstNodeParser.removeParens(AstNode node) private AstNodeParser.returnOrYield(int tt, boolean exprContext) private AstNodeParser.shiftExpr()private AstNodeParser.statement()private AstNodeParser.statementHelper()private AstNodeParser.statements()private AstNodeParser.statements(AstNode parent) private AstNodeParser.taggedTemplateLiteral(AstNode pn) private AstNodeParser.templateLiteral(boolean isTaggedLiteral) private AstNodeIRFactory.transformAssignmentLeft(Assignment node, AstNode left, AstNode right) private AstNodeParser.unaryExpr()private AstNodeParser.xmlInitializer()Methods in org.htmlunit.corejs.javascript that return types with arguments of type AstNodeMethods in org.htmlunit.corejs.javascript with parameters of type AstNodeModifier and TypeMethodDescriptionprivate AstNodeParser.arrayComprehension(AstNode result, int pos) Parse a JavaScript 1.7 Array comprehension.private AstNodeParser.arrowFunction(AstNode params) private voidParser.arrowFunctionParams(FunctionNode fnNode, AstNode params, Map<String, Node> destructuring, Set<String> paramNames) private voidParser.autoInsertSemicolon(AstNode pn) private voidParser.checkCallRequiresActivation(AstNode pn) (package private) voidprivate AstNodeParser.generatorExpression(AstNode result, int pos) private AstNodeParser.generatorExpression(AstNode result, int pos, boolean inFunctionParams) private static StringParser.getDirective(AstNode n) private AstNodeParser.getNextStatementAfterInlineComments(AstNode pn) private static intParser.getNodeEnd(AstNode n) (package private) voidParser.markDestructuring(AstNode node) private AstNodeParser.memberExprTail(boolean allowCallSyntax, AstNode pn) Parse any number of "(expr)", "[expr]" ".expr", "..expr", or ".(expr)" constructs trailing the passed expression.private ObjectPropertyParser.methodDefinition(int pos, AstNode propName, int entryKind) private static intprivate ObjectPropertyParser.plainProperty(AstNode property, int ptt) private AstNodeParser.propertyAccess(int tt, AstNode pn) Handles any construct following a "." or ".." operator.protected AstNodeParser.removeParens(AstNode node) private AstNodeParser.statements(AstNode parent) private AstNodeParser.taggedTemplateLiteral(AstNode pn) private AstNodeIRFactory.transformAssignmentLeft(Assignment node, AstNode left, AstNode right) private NodeIRFactory.transformBlock(AstNode node) private NodeIRFactory.transformLiteral(AstNode node) -
Uses of AstNode in org.htmlunit.corejs.javascript.ast
Subclasses of AstNode in org.htmlunit.corejs.javascript.astModifier and TypeClassDescriptionclassAST node for a JavaScript 1.7 Array comprehension.classAST node for a single 'for (foo in bar)' loop construct in a JavaScript 1.7 Array comprehension.classAST node for an Array literal.classAST node representing the set of assignment operators such as=,*=and+=.classNode for the root of a parse tree.classAST node for a BigInt literal.classA block statement delimited by curly braces.classA break statement.classNode representing a catch-clause of a try-statement.classNode representing comments.classAST node representing the ternary operator.classA continue statement.classDo statement.classAST node for an indexed property reference, such asfoo['bar']orfoo[2].classAST node for an empty expression.classAST node for an empty statement.classAST node representing a parse error or a warning.classAST node representing an expression in a statement context.classFor-in or for-each-in or for-of statement.classC-style for-loop statement.classAST node for a function call.classA JavaScript function declaration or expression.classclassclassIf-else statement.classAST node representing an infix (binary operator) expression.classUsed for code generation.classAST node for keyword literals: currently,this,null,true,false, anddebugger.classAST node representing a label.classA labeled statement.classAST node for let statements and expressions.classAbstract base type for loops.classAST node for a simple name.classNew expression.classAST node for a Number literal.classAST node for an Object literal (also called an Object initialiser in Ecma-262).classAST node for a single name:value entry in an Object literal.classAST node for a parenthesized expression.classAST node for the '.' operator.classAST node for a RegExp literal.classReturn statement.classRepresents a scope in the lexical scope chain.classBase type forAstRootandFunctionNodenodes, which need to collect much of the same information.classAST node for a single- or double-quoted string literal.classSwitch-case AST node type.classSwitch statement AST node type.classAST node for a Tagged Template Literal.classAST node for Template Literal Characters.classAST node for a Template literal.classThrow statement.classTry/catch/finally statement.classAST node representing unary operators such astypeofanddelete.classAST node representing update operators such as++.classA list of one or more var, const or let declarations.classA variable declaration or initializer, part of aVariableDeclarationexpression.classWhile statement.classWith statement.classAST node representing an E4Xfoo.(bar)query expression.classAST node for an E4X XML[expr]member-ref expression.classAST node for an embedded JavaScript expression within an E4X XML literal.classAbstract base type for components that comprise anXmlLiteralobject.classAST node for an E4X (Ecma-357) embedded XML literal.classAST node for E4X ".@" and ".." expressions, such asfoo..bar,foo..@bar,@foo.@bar, andfoo..@ns::*.classAST node for an E4X XML[expr]property-ref expression.classBase class for E4X XML attribute-access or property-get expressions.classAST node for an XML-text-only component of an XML literal expression.classAST node for JavaScript 1.7yieldexpression or statement.Fields in org.htmlunit.corejs.javascript.ast declared as AstNodeModifier and TypeFieldDescriptionprivate AstNodeFunctionNode.bodyprivate AstNodeLetNode.bodyprotected AstNodeLoop.bodyprivate AstNodeCatchClause.catchConditionprivate AstNodeDoLoop.conditionprivate AstNodeForLoop.conditionprivate AstNodeIfStatement.conditionprivate AstNodeWhileLoop.conditionprivate AstNodeElementGet.elementprivate AstNodeIfStatement.elseKeyWordInlineCommentprivate AstNodeIfStatement.elsePartprivate AstNodeExpressionStatement.exprprivate AstNodeParenthesizedExpression.expressionprivate AstNodeSwitchCase.expressionprivate AstNodeSwitchStatement.expressionprivate AstNodeThrowStatement.expressionprivate AstNodeWithStatement.expressionprivate AstNodeXmlExpression.expressionprivate AstNodeConditionalExpression.falseExpressionprivate AstNodeArrayComprehension.filterprivate AstNodeGeneratorExpression.filterprivate AstNodeTryStatement.finallyBlockprivate AstNodeForLoop.incrementprivate AstNodeXmlElemRef.indexExprprivate AstNodeForLoop.initializerprivate AstNodeVariableInitializer.initializerprotected AstNodeAstNode.inlineCommentprotected AstNodeForInLoop.iteratedObjectprotected AstNodeForInLoop.iteratorprotected AstNodeInfixExpression.leftprivate AstNodeFunctionNode.memberExprNodeprivate AstNodeUnaryExpression.operandprivate AstNodeUpdateExpression.operandprotected AstNodeAstNode.parentprivate AstNodeArrayComprehension.resultprivate AstNodeGeneratorExpression.resultprivate AstNodeReturnStatement.returnValueprotected AstNodeInfixExpression.rightprivate AstNodeLabeledStatement.statementprivate AstNodeWithStatement.statementprivate AstNodeBreakStatement.targetprivate AstNodeElementGet.targetprotected AstNodeFunctionCall.targetprivate AstNodeTaggedTemplateLiteral.targetprivate AstNodeVariableInitializer.targetprivate AstNodeTaggedTemplateLiteral.templateLiteralprivate AstNodeConditionalExpression.testExpressionprivate AstNodeIfStatement.thenPartprivate AstNodeConditionalExpression.trueExpressionprivate AstNodeTryStatement.tryBlockprivate AstNodeYield.valueFields in org.htmlunit.corejs.javascript.ast with type parameters of type AstNodeModifier and TypeFieldDescriptionFunctionCall.argumentsArrayLiteral.elementsTemplateLiteral.elementsFunctionCall.NO_ARGSArrayLiteral.NO_ELEMSFunctionNode.NO_PARAMSFunctionNode.paramsSwitchCase.statementsMethods in org.htmlunit.corejs.javascript.ast with type parameters of type AstNodeModifier and TypeMethodDescriptionprotected <T extends AstNode>
voidAstNode.printList(List<T> items, StringBuilder sb) Prints a comma-separated item list into aStringBuilder.Methods in org.htmlunit.corejs.javascript.ast that return AstNodeModifier and TypeMethodDescriptionArrayComprehensionLoop.getBody()Returnsnullfor loop bodyFunctionNode.getBody()Returns function body.LetNode.getBody()Returns body statement or expression.Loop.getBody()Returns loop bodyBreakStatement.getBreakTarget()Returns the statement to break toCatchClause.getCatchCondition()Returns catch condition node, if presentDoLoop.getCondition()Returns loop conditionForLoop.getCondition()Returns loop conditionIfStatement.getCondition()Returns if conditionWhileLoop.getCondition()Returns loop conditionArrayLiteral.getElement(int index) Returns element at specified index.ElementGet.getElement()Returns the element being accessedTemplateLiteral.getElement(int index) Returns element at specified index.IfStatement.getElseKeyWordInlineComment()IfStatement.getElsePart()Returns statement to execute if condition is falseExpressionStatement.getExpression()Returns the wrapped expressionParenthesizedExpression.getExpression()Returns the expression between the parensSwitchCase.getExpression()Returns the case expression,nullfor default caseSwitchStatement.getExpression()Returns the switch discriminant expressionThrowStatement.getExpression()Returns the expression being thrownWithStatement.getExpression()Returns object expressionXmlElemRef.getExpression()Returns index expression: the 'expr' in@[expr]or@*::[expr].XmlExpression.getExpression()Returns the expression embedded in {}ConditionalExpression.getFalseExpression()Returns expression to evaluate if test is falseArrayComprehension.getFilter()Returns filter expression, ornullif not presentGeneratorExpression.getFilter()Returns filter expression, ornullif not presentTryStatement.getFinallyBlock()Returns finally block, ornullif not presentForLoop.getIncrement()Returns loop increment expressionForLoop.getInitializer()Returns loop initializer variable declaration list.VariableInitializer.getInitializer()Returns the initial value, ornullif not providedAstNode.getInlineComment()ForInLoop.getIteratedObject()Returns object being iterated overForInLoop.getIterator()Returns loop iterator expressionInfixExpression.getLeft()Returns the left-hand side of the expressionFunctionNode.getMemberExprNode()UnaryExpression.getOperand()UpdateExpression.getOperand()AstNode.getParent()Returns the node parent, ornullif it has noneArrayComprehension.getResult()Returns result expression node (just after opening bracket)GeneratorExpression.getResult()Returns result expression node (just after opening bracket)ReturnStatement.getReturnValue()Returns return value,nullif return value is voidInfixExpression.getRight()Returns the right-hand side of the expressionLabeledStatement.getStatement()Returns the labeled statementWithStatement.getStatement()Returns the statement or blockElementGet.getTarget()Returns the object on which the element is being fetched.FunctionCall.getTarget()Returns node evaluating to the function to callPropertyGet.getTarget()Returns the object on which the property is being fetched.TaggedTemplateLiteral.getTarget()VariableInitializer.getTarget()Returns the variable name or destructuring formXmlMemberGet.getTarget()Returns the object on which the XML member-ref expression is being evaluated.TaggedTemplateLiteral.getTemplateLiteral()ConditionalExpression.getTestExpression()Returns test expressionIfStatement.getThenPart()Returns statement to execute if condition is trueConditionalExpression.getTrueExpression()Returns expression to evaluate if test is trueTryStatement.getTryBlock()Yield.getValue()Returns yielded expression,nullif noneMethods in org.htmlunit.corejs.javascript.ast that return types with arguments of type AstNodeModifier and TypeMethodDescriptionFunctionCall.getArguments()Returns function argument listArrayLiteral.getElements()Returns the element listTemplateLiteral.getElements()Returns the element listFunctionNode.getParams()Returns the function parameter listScope.getStatements()Returns a copy of the child list, with each child cast to anAstNode.SwitchCase.getStatements()Returns statement list, which may benull.TemplateLiteral.getSubstitutions()Returns a list of all substitutions of this template literalMethods in org.htmlunit.corejs.javascript.ast with parameters of type AstNodeModifier and TypeMethodDescriptionvoidFunctionCall.addArgument(AstNode arg) Adds an argument to the list, and sets its parent to this node.voidAdds 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.voidAdds a parameter to the function parameter list.voidBlock.addStatement(AstNode statement) voidSwitchCase.addStatement(AstNode statement) Adds a statement to the end of the statement list.intSorts nodes by (relative) start position.intPermits AST nodes to be sorted based on start position and length.booleanReturns true if the specifiedAstNodenode is a parameter of this Function node.voidThrows an exception on attempts to set the loop body.voidSets function body, and sets its parent to this node.voidSets body statement or expression.voidSets 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.voidSets filter expression, and sets its parent to this node.voidSets 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.voidSets 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.voidSets the node parent.voidSets result expression, and sets its parent to this node.voidSets result expression, and sets its parent to this node.voidReturnStatement.setReturnValue(AstNode returnValue) Sets return value expression, and sets its parent to this node.voidSets 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)voidSets target object, and sets its parent to this node.voidSets node evaluating to the function to call, and sets its parent to this node.voidSets target object, and sets its parent to this node.voidvoidSets the variable name or destructuring form, and sets its parent to this node.voidSets 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.voidSets yielded expression, and sets its parent to this node.booleanbooleanVisits an AST node.Method parameters in org.htmlunit.corejs.javascript.ast with type arguments of type AstNodeModifier and TypeMethodDescriptionvoidFunctionCall.setArguments(List<AstNode> arguments) Sets function argument listvoidArrayLiteral.setElements(List<AstNode> elements) Sets the element list, and sets each element's parent to this node.voidTemplateLiteral.setElements(List<AstNode> elements) Sets the element list, and sets each element's parent to this node.voidSets the function parameter list, and sets the parent for each element of the list.voidSwitchCase.setStatements(List<AstNode> statements) Sets statement list.Constructors in org.htmlunit.corejs.javascript.ast with parameters of type AstNodeModifierConstructorDescriptionAssignment(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) 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)