|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use AstNode | |
|---|---|
| org.mozilla.javascript | |
| org.mozilla.javascript.ast | |
| Uses of AstNode in org.mozilla.javascript |
|---|
| Methods in org.mozilla.javascript that return AstNode | |
|---|---|
protected AstNode |
Parser.removeParens(AstNode node)
|
| Methods in org.mozilla.javascript with parameters of type AstNode | |
|---|---|
protected AstNode |
Parser.removeParens(AstNode node)
|
Node |
IRFactory.transform(AstNode node)
|
| Uses of AstNode in org.mozilla.javascript.ast |
|---|
| Subclasses of AstNode in org.mozilla.javascript.ast | |
|---|---|
class |
ArrayComprehension
AST node for a JavaScript 1.7 Array comprehension. |
class |
ArrayComprehensionLoop
AST node for a single 'for (foo in bar)' loop construct in a JavaScript 1.7 Array comprehension. |
class |
ArrayLiteral
AST node for an Array literal. |
class |
Assignment
AST node representing the set of assignment operators such as =,
*= and +=. |
class |
AstRoot
Node for the root of a parse tree. |
class |
Block
A block statement delimited by curly braces. |
class |
BreakStatement
A break statement. |
class |
CatchClause
Node representing a catch-clause of a try-statement. |
class |
Comment
Node representing comments. |
class |
ConditionalExpression
AST node representing the ternary operator. |
class |
ContinueStatement
A continue statement. |
class |
DoLoop
Do statement. |
class |
ElementGet
AST node for an indexed property reference, such as foo['bar'] or
foo[2]. |
class |
EmptyExpression
AST node for an empty expression. |
class |
EmptyStatement
AST node for an empty statement. |
class |
ErrorNode
AST node representing a parse error or a warning. |
class |
ExpressionStatement
AST node representing an expression in a statement context. |
class |
ForInLoop
For-in or for-each-in statement. |
class |
ForLoop
C-style for-loop statement. |
class |
FunctionCall
AST node for a function call. |
class |
FunctionNode
A JavaScript function declaration or expression. |
class |
GeneratorExpression
|
class |
GeneratorExpressionLoop
|
class |
IfStatement
If-else statement. |
class |
InfixExpression
AST node representing an infix (binary operator) expression. |
class |
Jump
Used for code generation. |
class |
KeywordLiteral
AST node for keyword literals: currently, this,
null, true, false, and debugger. |
class |
Label
AST node representing a label. |
class |
LabeledStatement
A labeled statement. |
class |
LetNode
AST node for let statements and expressions. |
class |
Loop
Abstract base type for loops. |
class |
Name
AST node for a simple name. |
class |
NewExpression
New expression. |
class |
NumberLiteral
AST node for a Number literal. |
class |
ObjectLiteral
AST node for an Object literal (also called an Object initialiser in Ecma-262). |
class |
ObjectProperty
AST node for a single name:value entry in an Object literal. |
class |
ParenthesizedExpression
AST node for a parenthesized expression. |
class |
PropertyGet
AST node for the '.' operator. |
class |
RegExpLiteral
AST node for a RegExp literal. |
class |
ReturnStatement
Return statement. |
class |
Scope
Represents a scope in the lexical scope chain. |
class |
ScriptNode
Base type for AstRoot and FunctionNode nodes, which need to
collect much of the same information. |
class |
StringLiteral
AST node for a single- or double-quoted string literal. |
class |
SwitchCase
Switch-case AST node type. |
class |
SwitchStatement
Switch statement AST node type. |
class |
ThrowStatement
Throw statement. |
class |
TryStatement
Try/catch/finally statement. |
class |
UnaryExpression
AST node representing unary operators such as ++,
~, typeof and delete. |
class |
VariableDeclaration
A list of one or more var, const or let declarations. |
class |
VariableInitializer
A variable declaration or initializer, part of a VariableDeclaration
expression. |
class |
WhileLoop
While statement. |
class |
WithStatement
With statement. |
class |
XmlDotQuery
AST node representing an E4X foo.(bar) query expression. |
class |
XmlElemRef
AST node for an E4X XML [expr] member-ref expression. |
class |
XmlExpression
AST node for an embedded JavaScript expression within an E4X XML literal. |
class |
XmlFragment
Abstract base type for components that comprise an XmlLiteral
object. |
class |
XmlLiteral
AST node for an E4X (Ecma-357) embedded XML literal. |
class |
XmlMemberGet
AST node for E4X ".@" and ".." expressions, such as foo..bar, foo..@bar, @foo.@bar, and
foo..@ns::*. |
class |
XmlPropRef
AST node for an E4X XML [expr] property-ref expression. |
class |
XmlRef
Base class for E4X XML attribute-access or property-get expressions. |
class |
XmlString
AST node for an XML-text-only component of an XML literal expression. |
class |
Yield
AST node for JavaScript 1.7 yield expression or statement. |
| Fields in org.mozilla.javascript.ast declared as AstNode | |
|---|---|
protected AstNode |
Loop.body
|
protected AstNode |
ForInLoop.iteratedObject
|
protected AstNode |
ForInLoop.iterator
|
protected AstNode |
InfixExpression.left
|
protected AstNode |
AstNode.parent
|
protected AstNode |
InfixExpression.right
|
protected AstNode |
FunctionCall.target
|
| Fields in org.mozilla.javascript.ast with type parameters of type AstNode | |
|---|---|
protected List<AstNode> |
FunctionCall.arguments
|
protected static List<AstNode> |
FunctionCall.NO_ARGS
|
| Methods in org.mozilla.javascript.ast with type parameters of type AstNode | ||
|---|---|---|
protected
|
AstNode.printList(List<T> items,
StringBuilder sb)
Prints a comma-separated item list into a StringBuilder. |
|
| Methods in org.mozilla.javascript.ast that return AstNode | |
|---|---|
AstNode |
ArrayComprehensionLoop.getBody()
Returns null for loop body |
AstNode |
FunctionNode.getBody()
Returns function body. |
AstNode |
Loop.getBody()
Returns loop body |
AstNode |
LetNode.getBody()
Returns body statement or expression. |
AstNode |
BreakStatement.getBreakTarget()
Returns the statement to break to |
AstNode |
CatchClause.getCatchCondition()
Returns catch condition node, if present |
AstNode |
DoLoop.getCondition()
Returns loop condition |
AstNode |
ForLoop.getCondition()
Returns loop condition |
AstNode |
IfStatement.getCondition()
Returns if condition |
AstNode |
WhileLoop.getCondition()
Returns loop condition |
AstNode |
ElementGet.getElement()
Returns the element being accessed |
AstNode |
ArrayLiteral.getElement(int index)
Returns element at specified index. |
AstNode |
IfStatement.getElsePart()
Returns statement to execute if condition is false |
AstNode |
ExpressionStatement.getExpression()
Returns the wrapped expression |
AstNode |
ParenthesizedExpression.getExpression()
Returns the expression between the parens |
AstNode |
SwitchCase.getExpression()
Returns the case expression, null for default case |
AstNode |
ThrowStatement.getExpression()
Returns the expression being thrown |
AstNode |
WithStatement.getExpression()
Returns object expression |
AstNode |
XmlElemRef.getExpression()
Returns index expression: the 'expr' in @[expr]
or @*::[expr]. |
AstNode |
XmlExpression.getExpression()
Returns the expression embedded in {} |
AstNode |
SwitchStatement.getExpression()
Returns the switch discriminant expression |
AstNode |
ConditionalExpression.getFalseExpression()
Returns expression to evaluate if test is false |
AstNode |
ArrayComprehension.getFilter()
Returns filter expression, or null if not present |
AstNode |
GeneratorExpression.getFilter()
Returns filter expression, or null if not present |
AstNode |
TryStatement.getFinallyBlock()
Returns finally block, or null if not present |
AstNode |
ForLoop.getIncrement()
Returns loop increment expression |
AstNode |
ForLoop.getInitializer()
Returns loop initializer variable declaration list. |
AstNode |
VariableInitializer.getInitializer()
Returns the initial value, or null if not provided |
AstNode |
ForInLoop.getIteratedObject()
Returns object being iterated over |
AstNode |
ForInLoop.getIterator()
Returns loop iterator expression |
AstNode |
InfixExpression.getLeft()
Returns the left-hand side of the expression |
AstNode |
FunctionNode.getMemberExprNode()
|
AstNode |
UnaryExpression.getOperand()
|
AstNode |
AstNode.getParent()
Returns the node parent, or null if it has none |
AstNode |
ArrayComprehension.getResult()
Returns result expression node (just after opening bracket) |
AstNode |
GeneratorExpression.getResult()
Returns result expression node (just after opening bracket) |
AstNode |
ReturnStatement.getReturnValue()
Returns return value, null if return value is void |
AstNode |
InfixExpression.getRight()
Returns the right-hand side of the expression |
AstNode |
LabeledStatement.getStatement()
Returns the labeled statement |
AstNode |
WithStatement.getStatement()
Returns the statement or block |
AstNode |
ElementGet.getTarget()
Returns the object on which the element is being fetched. |
AstNode |
FunctionCall.getTarget()
Returns node evaluating to the function to call |
AstNode |
PropertyGet.getTarget()
Returns the object on which the property is being fetched. |
AstNode |
VariableInitializer.getTarget()
Returns the variable name or destructuring form |
AstNode |
XmlMemberGet.getTarget()
Returns the object on which the XML member-ref expression is being evaluated. |
AstNode |
ConditionalExpression.getTestExpression()
Returns test expression |
AstNode |
IfStatement.getThenPart()
Returns statement to execute if condition is true |
AstNode |
ConditionalExpression.getTrueExpression()
Returns expression to evaluate if test is true |
AstNode |
TryStatement.getTryBlock()
|
AstNode |
Yield.getValue()
Returns yielded expression, null if none |
| Methods in org.mozilla.javascript.ast that return types with arguments of type AstNode | |
|---|---|
List<AstNode> |
FunctionCall.getArguments()
Returns function argument list |
List<AstNode> |
ArrayLiteral.getElements()
Returns the element list |
List<AstNode> |
FunctionNode.getParams()
Returns the function parameter list |
List<AstNode> |
Scope.getStatements()
Returns a copy of the child list, with each child cast to an AstNode. |
List<AstNode> |
SwitchCase.getStatements()
Returns statement list, which may be null. |
| Methods in org.mozilla.javascript.ast with parameters of type AstNode | |
|---|---|
void |
FunctionCall.addArgument(AstNode arg)
Adds an argument to the list, and sets its parent to this node. |
void |
AstNode.addChild(AstNode kid)
Adds a child or function to the end of the block. |
void |
ArrayLiteral.addElement(AstNode element)
Adds an element to the list, and sets its parent to this node. |
void |
FunctionNode.addParam(AstNode param)
Adds a parameter to the function parameter list. |
void |
Block.addStatement(AstNode statement)
Alias for addChild(org.mozilla.javascript.ast.AstNode). |
void |
SwitchCase.addStatement(AstNode statement)
Adds a statement to the end of the statement list. |
int |
AstNode.PositionComparator.compare(AstNode n1,
AstNode n2)
Sorts nodes by (relative) start position. |
int |
AstNode.compareTo(AstNode other)
Permits AST nodes to be sorted based on start position and length. |
boolean |
FunctionNode.isParam(AstNode node)
Returns true if the specified AstNode node is a parameter
of this Function node. |
void |
ArrayComprehensionLoop.setBody(AstNode body)
Throws an exception on attempts to set the loop body. |
void |
FunctionNode.setBody(AstNode body)
Sets function body, and sets its parent to this node. |
void |
Loop.setBody(AstNode body)
Sets loop body. |
void |
LetNode.setBody(AstNode body)
Sets body statement or expression. |
void |
CatchClause.setCatchCondition(AstNode catchCondition)
Sets catch condition node, and sets its parent to this node. |
void |
DoLoop.setCondition(AstNode condition)
Sets loop condition, and sets its parent to this node. |
void |
ForLoop.setCondition(AstNode condition)
Sets loop condition, and sets its parent to this node. |
void |
IfStatement.setCondition(AstNode condition)
Sets if condition. |
void |
WhileLoop.setCondition(AstNode condition)
Sets loop condition |
void |
ElementGet.setElement(AstNode element)
Sets the element being accessed, and sets its parent to this node. |
void |
IfStatement.setElsePart(AstNode elsePart)
Sets statement to execute if condition is false |
void |
ExpressionStatement.setExpression(AstNode expression)
Sets the wrapped expression, and sets its parent to this node. |
void |
ParenthesizedExpression.setExpression(AstNode expression)
Sets the expression between the parens, and sets the parent to this node. |
void |
SwitchCase.setExpression(AstNode expression)
Sets the case expression, null for default case. |
void |
ThrowStatement.setExpression(AstNode expression)
Sets the expression being thrown, and sets its parent to this node. |
void |
WithStatement.setExpression(AstNode expression)
Sets object expression (and its parent link) |
void |
XmlElemRef.setExpression(AstNode expr)
Sets index expression, and sets its parent to this node. |
void |
XmlExpression.setExpression(AstNode expression)
Sets the expression embedded in {}, and sets its parent to this node. |
void |
SwitchStatement.setExpression(AstNode expression)
Sets the switch discriminant expression, and sets its parent to this node. |
void |
ConditionalExpression.setFalseExpression(AstNode falseExpression)
Sets expression to evaluate if test is false, and sets its parent to this node. |
void |
ArrayComprehension.setFilter(AstNode filter)
Sets filter expression, and sets its parent to this node. |
void |
GeneratorExpression.setFilter(AstNode filter)
Sets filter expression, and sets its parent to this node. |
void |
TryStatement.setFinallyBlock(AstNode finallyBlock)
Sets finally block, and sets its parent to this node. |
void |
ForLoop.setIncrement(AstNode increment)
Sets loop increment expression, and sets its parent to this node. |
void |
ForLoop.setInitializer(AstNode initializer)
Sets loop initializer expression, and sets its parent to this node. |
void |
VariableInitializer.setInitializer(AstNode initializer)
Sets the initial value expression, and sets its parent to this node. |
void |
ForInLoop.setIteratedObject(AstNode object)
Sets object being iterated over, and sets its parent to this node. |
void |
ForInLoop.setIterator(AstNode iterator)
Sets loop iterator expression: the part before the "in" keyword. |
void |
InfixExpression.setLeft(AstNode left)
Sets the left-hand side of the expression, and sets its parent to this node. |
void |
InfixExpression.setLeftAndRight(AstNode left,
AstNode right)
|
void |
FunctionNode.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. |
void |
UnaryExpression.setOperand(AstNode operand)
Sets the operand, and sets its parent to be this node. |
void |
AstNode.setParent(AstNode parent)
Sets the node parent. |
void |
ArrayComprehension.setResult(AstNode result)
Sets result expression, and sets its parent to this node. |
void |
GeneratorExpression.setResult(AstNode result)
Sets result expression, and sets its parent to this node. |
void |
ReturnStatement.setReturnValue(AstNode returnValue)
Sets return value expression, and sets its parent to this node. |
void |
InfixExpression.setRight(AstNode right)
Sets the right-hand side of the expression, and sets its parent to this node. |
void |
LabeledStatement.setStatement(AstNode statement)
Sets the labeled statement, and sets its parent to this node. |
void |
WithStatement.setStatement(AstNode statement)
Sets the statement (and sets its parent link) |
void |
ElementGet.setTarget(AstNode target)
Sets target object, and sets its parent to this node. |
void |
FunctionCall.setTarget(AstNode target)
Sets node evaluating to the function to call, and sets its parent to this node. |
void |
PropertyGet.setTarget(AstNode target)
Sets target object, and sets its parent to this node. |
void |
VariableInitializer.setTarget(AstNode target)
Sets the variable name or destructuring form, and sets its parent to this node. |
void |
XmlMemberGet.setTarget(AstNode target)
Sets target object, and sets its parent to this node. |
void |
ConditionalExpression.setTestExpression(AstNode testExpression)
Sets test expression, and sets its parent. |
void |
IfStatement.setThenPart(AstNode thenPart)
Sets statement to execute if condition is true |
void |
ConditionalExpression.setTrueExpression(AstNode trueExpression)
Sets expression to evaluate if test is true, and sets its parent to this node. |
void |
TryStatement.setTryBlock(AstNode tryBlock)
Sets try block. |
void |
Yield.setValue(AstNode expr)
Sets yielded expression, and sets its parent to this node. |
boolean |
AstNode.DebugPrintVisitor.visit(AstNode node)
|
boolean |
NodeVisitor.visit(AstNode node)
Visits an AST node. |
| Method parameters in org.mozilla.javascript.ast with type arguments of type AstNode | |
|---|---|
void |
FunctionCall.setArguments(List<AstNode> arguments)
Sets function argument list |
void |
ArrayLiteral.setElements(List<AstNode> elements)
Sets the element list, and sets each element's parent to this node. |
void |
FunctionNode.setParams(List<AstNode> params)
Sets the function parameter list, and sets the parent for each element of the list. |
void |
SwitchCase.setStatements(List<AstNode> statements)
Sets statement list. |
| Constructors in org.mozilla.javascript.ast with parameters of type AstNode | |
|---|---|
Assignment(AstNode left,
AstNode right)
|
|
Assignment(int operator,
AstNode left,
AstNode right,
int operatorPos)
|
|
Assignment(int pos,
int len,
AstNode left,
AstNode right)
|
|
ElementGet(AstNode target,
AstNode element)
|
|
ExpressionStatement(AstNode expr)
Constructs a new ExpressionStatement wrapping
the specified expression. |
|
ExpressionStatement(AstNode expr,
boolean hasResult)
Constructs a new ExpressionStatement wrapping
the specified expression. |
|
ExpressionStatement(int pos,
int len,
AstNode expr)
Constructs a new ExpressionStatement |
|
InfixExpression(AstNode left,
AstNode right)
Constructs a new InfixExpression. |
|
InfixExpression(int operator,
AstNode left,
AstNode right,
int operatorPos)
Constructs a new InfixExpression. |
|
InfixExpression(int pos,
int len,
AstNode left,
AstNode right)
|
|
ParenthesizedExpression(AstNode expr)
|
|
ParenthesizedExpression(int pos,
int len,
AstNode expr)
|
|
PropertyGet(AstNode target,
Name property)
Constructor. |
|
PropertyGet(AstNode target,
Name property,
int dotPosition)
|
|
PropertyGet(int pos,
int len,
AstNode target,
Name property)
|
|
ReturnStatement(int pos,
int len,
AstNode returnValue)
|
|
ThrowStatement(AstNode expr)
|
|
ThrowStatement(int pos,
AstNode expr)
|
|
ThrowStatement(int pos,
int len,
AstNode expr)
|
|
UnaryExpression(int operator,
int operatorPosition,
AstNode operand)
Constructs a new prefix UnaryExpression. |
|
UnaryExpression(int operator,
int operatorPosition,
AstNode operand,
boolean postFix)
Constructs a new UnaryExpression with the specified operator and operand. |
|
XmlExpression(int pos,
AstNode expr)
|
|
XmlMemberGet(AstNode target,
XmlRef ref)
Constructs a new XmlMemberGet node. |
|
XmlMemberGet(AstNode target,
XmlRef ref,
int opPos)
|
|
XmlMemberGet(int pos,
int len,
AstNode target,
XmlRef ref)
|
|
Yield(int pos,
int len,
AstNode value)
|
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||