[−][src]Trait binjs::generic::ast::Node
The root type for nodes in the AST.
Required methods
Loading content...Provided methods
fn scoped_dictionary(&self) -> Option<&SharedString>
If this node should cause a dictionary change, return the name of the new dictionary to use. Otherwise, None.
Methods
impl dyn Node + 'static
pub fn is<__T>(&self) -> bool where
__T: Node,
__T: Node,
Returns true if the trait object wraps an object of type __T.
pub fn downcast<__T>(
self: Box<dyn Node + 'static>
) -> Result<Box<__T>, Box<dyn Node + 'static>> where
__T: Node,
self: Box<dyn Node + 'static>
) -> Result<Box<__T>, Box<dyn Node + 'static>> where
__T: Node,
Returns a boxed object from a boxed trait object if the underlying object is of type
__T. Returns the original boxed trait if it isn't.
pub fn downcast_rc<__T>(
self: Rc<dyn Node + 'static>
) -> Result<Rc<__T>, Rc<dyn Node + 'static>> where
__T: Node,
self: Rc<dyn Node + 'static>
) -> Result<Rc<__T>, Rc<dyn Node + 'static>> where
__T: Node,
Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of
type __T. Returns the original Rc-ed trait if it isn't.
pub fn downcast_ref<__T>(&self) -> Option<&__T> where
__T: Node,
__T: Node,
Returns a reference to the object within the trait object if it is of type __T, or
None if it isn't.
pub fn downcast_mut<__T>(&mut self) -> Option<&mut __T> where
__T: Node,
__T: Node,
Returns a mutable reference to the object within the trait object if it is of type
__T, or None if it isn't.
Implementors
impl Node for ArrayAssignmentTarget[src]
Make it possible to downcast/upcast between ArrayAssignmentTarget and binjs_shared::ast::Node.
impl Node for ArrayBinding[src]
Make it possible to downcast/upcast between ArrayBinding and binjs_shared::ast::Node.
impl Node for ArrayExpression[src]
Make it possible to downcast/upcast between ArrayExpression and binjs_shared::ast::Node.
impl Node for ArrowExpressionContentsWithExpression[src]
Make it possible to downcast/upcast between ArrowExpressionContentsWithExpression and binjs_shared::ast::Node.
impl Node for ArrowExpressionContentsWithFunctionBody[src]
Make it possible to downcast/upcast between ArrowExpressionContentsWithFunctionBody and binjs_shared::ast::Node.
impl Node for AssertedBlockScope[src]
Make it possible to downcast/upcast between AssertedBlockScope and binjs_shared::ast::Node.
impl Node for AssertedBoundName[src]
Make it possible to downcast/upcast between AssertedBoundName and binjs_shared::ast::Node.
impl Node for AssertedBoundNamesScope[src]
Make it possible to downcast/upcast between AssertedBoundNamesScope and binjs_shared::ast::Node.
impl Node for AssertedDeclaredName[src]
Make it possible to downcast/upcast between AssertedDeclaredName and binjs_shared::ast::Node.
impl Node for AssertedParameterName[src]
Make it possible to downcast/upcast between AssertedParameterName and binjs_shared::ast::Node.
impl Node for AssertedParameterScope[src]
Make it possible to downcast/upcast between AssertedParameterScope and binjs_shared::ast::Node.
impl Node for AssertedPositionalParameterName[src]
Make it possible to downcast/upcast between AssertedPositionalParameterName and binjs_shared::ast::Node.
impl Node for AssertedRestParameterName[src]
Make it possible to downcast/upcast between AssertedRestParameterName and binjs_shared::ast::Node.
impl Node for AssertedScriptGlobalScope[src]
Make it possible to downcast/upcast between AssertedScriptGlobalScope and binjs_shared::ast::Node.
impl Node for AssertedVarScope[src]
Make it possible to downcast/upcast between AssertedVarScope and binjs_shared::ast::Node.
impl Node for AssignmentExpression[src]
Make it possible to downcast/upcast between AssignmentExpression and binjs_shared::ast::Node.
impl Node for AssignmentTargetIdentifier[src]
Make it possible to downcast/upcast between AssignmentTargetIdentifier and binjs_shared::ast::Node.
impl Node for AssignmentTargetPropertyIdentifier[src]
Make it possible to downcast/upcast between AssignmentTargetPropertyIdentifier and binjs_shared::ast::Node.
impl Node for AssignmentTargetPropertyProperty[src]
Make it possible to downcast/upcast between AssignmentTargetPropertyProperty and binjs_shared::ast::Node.
impl Node for AssignmentTargetWithInitializer[src]
Make it possible to downcast/upcast between AssignmentTargetWithInitializer and binjs_shared::ast::Node.
impl Node for AwaitExpression[src]
Make it possible to downcast/upcast between AwaitExpression and binjs_shared::ast::Node.
impl Node for BinASTExpressionWithProbabilityTable[src]
Make it possible to downcast/upcast between BinASTExpressionWithProbabilityTable and binjs_shared::ast::Node.
fn name(&self) -> &'static str[src]
The name of this node. Used mostly for debugging purposes.
fn scoped_dictionary(&self) -> Option<&SharedString>[src]
impl Node for BinaryExpression[src]
Make it possible to downcast/upcast between BinaryExpression and binjs_shared::ast::Node.
impl Node for BindingIdentifier[src]
Make it possible to downcast/upcast between BindingIdentifier and binjs_shared::ast::Node.
impl Node for BindingPropertyIdentifier[src]
Make it possible to downcast/upcast between BindingPropertyIdentifier and binjs_shared::ast::Node.
impl Node for BindingPropertyProperty[src]
Make it possible to downcast/upcast between BindingPropertyProperty and binjs_shared::ast::Node.
impl Node for BindingWithInitializer[src]
Make it possible to downcast/upcast between BindingWithInitializer and binjs_shared::ast::Node.
impl Node for Block[src]
Make it possible to downcast/upcast between Block and binjs_shared::ast::Node.
impl Node for BreakStatement[src]
Make it possible to downcast/upcast between BreakStatement and binjs_shared::ast::Node.
impl Node for CallExpression[src]
Make it possible to downcast/upcast between CallExpression and binjs_shared::ast::Node.
impl Node for CatchClause[src]
Make it possible to downcast/upcast between CatchClause and binjs_shared::ast::Node.
impl Node for ClassDeclaration[src]
Make it possible to downcast/upcast between ClassDeclaration and binjs_shared::ast::Node.
impl Node for ClassElement[src]
Make it possible to downcast/upcast between ClassElement and binjs_shared::ast::Node.
impl Node for ClassExpression[src]
Make it possible to downcast/upcast between ClassExpression and binjs_shared::ast::Node.
impl Node for CompoundAssignmentExpression[src]
Make it possible to downcast/upcast between CompoundAssignmentExpression and binjs_shared::ast::Node.
impl Node for ComputedMemberAssignmentTarget[src]
Make it possible to downcast/upcast between ComputedMemberAssignmentTarget and binjs_shared::ast::Node.
impl Node for ComputedMemberExpression[src]
Make it possible to downcast/upcast between ComputedMemberExpression and binjs_shared::ast::Node.
impl Node for ComputedPropertyName[src]
Make it possible to downcast/upcast between ComputedPropertyName and binjs_shared::ast::Node.
impl Node for ConditionalExpression[src]
Make it possible to downcast/upcast between ConditionalExpression and binjs_shared::ast::Node.
impl Node for ContinueStatement[src]
Make it possible to downcast/upcast between ContinueStatement and binjs_shared::ast::Node.
impl Node for DataProperty[src]
Make it possible to downcast/upcast between DataProperty and binjs_shared::ast::Node.
impl Node for DebuggerStatement[src]
Make it possible to downcast/upcast between DebuggerStatement and binjs_shared::ast::Node.
impl Node for Directive[src]
Make it possible to downcast/upcast between Directive and binjs_shared::ast::Node.
impl Node for DoWhileStatement[src]
Make it possible to downcast/upcast between DoWhileStatement and binjs_shared::ast::Node.
impl Node for EagerArrowExpressionWithExpression[src]
Make it possible to downcast/upcast between EagerArrowExpressionWithExpression and binjs_shared::ast::Node.
impl Node for EagerArrowExpressionWithFunctionBody[src]
Make it possible to downcast/upcast between EagerArrowExpressionWithFunctionBody and binjs_shared::ast::Node.
impl Node for EagerFunctionDeclaration[src]
Make it possible to downcast/upcast between EagerFunctionDeclaration and binjs_shared::ast::Node.
impl Node for EagerFunctionExpression[src]
Make it possible to downcast/upcast between EagerFunctionExpression and binjs_shared::ast::Node.
impl Node for EagerGetter[src]
Make it possible to downcast/upcast between EagerGetter and binjs_shared::ast::Node.
impl Node for EagerMethod[src]
Make it possible to downcast/upcast between EagerMethod and binjs_shared::ast::Node.
impl Node for EagerSetter[src]
Make it possible to downcast/upcast between EagerSetter and binjs_shared::ast::Node.
impl Node for EmptyStatement[src]
Make it possible to downcast/upcast between EmptyStatement and binjs_shared::ast::Node.
impl Node for Export[src]
Make it possible to downcast/upcast between Export and binjs_shared::ast::Node.
impl Node for ExportAllFrom[src]
Make it possible to downcast/upcast between ExportAllFrom and binjs_shared::ast::Node.
impl Node for ExportDefault[src]
Make it possible to downcast/upcast between ExportDefault and binjs_shared::ast::Node.
impl Node for ExportFrom[src]
Make it possible to downcast/upcast between ExportFrom and binjs_shared::ast::Node.
impl Node for ExportFromSpecifier[src]
Make it possible to downcast/upcast between ExportFromSpecifier and binjs_shared::ast::Node.
impl Node for ExportLocalSpecifier[src]
Make it possible to downcast/upcast between ExportLocalSpecifier and binjs_shared::ast::Node.
impl Node for ExportLocals[src]
Make it possible to downcast/upcast between ExportLocals and binjs_shared::ast::Node.
impl Node for ExpressionStatement[src]
Make it possible to downcast/upcast between ExpressionStatement and binjs_shared::ast::Node.
impl Node for ForInOfBinding[src]
Make it possible to downcast/upcast between ForInOfBinding and binjs_shared::ast::Node.
impl Node for ForInStatement[src]
Make it possible to downcast/upcast between ForInStatement and binjs_shared::ast::Node.
impl Node for ForOfStatement[src]
Make it possible to downcast/upcast between ForOfStatement and binjs_shared::ast::Node.
impl Node for ForStatement[src]
Make it possible to downcast/upcast between ForStatement and binjs_shared::ast::Node.
impl Node for FormalParameters[src]
Make it possible to downcast/upcast between FormalParameters and binjs_shared::ast::Node.
impl Node for FunctionExpressionContents[src]
Make it possible to downcast/upcast between FunctionExpressionContents and binjs_shared::ast::Node.
impl Node for FunctionOrMethodContents[src]
Make it possible to downcast/upcast between FunctionOrMethodContents and binjs_shared::ast::Node.
impl Node for GetterContents[src]
Make it possible to downcast/upcast between GetterContents and binjs_shared::ast::Node.
impl Node for IdentifierExpression[src]
Make it possible to downcast/upcast between IdentifierExpression and binjs_shared::ast::Node.
impl Node for IfStatement[src]
Make it possible to downcast/upcast between IfStatement and binjs_shared::ast::Node.
impl Node for Import[src]
Make it possible to downcast/upcast between Import and binjs_shared::ast::Node.
impl Node for ImportNamespace[src]
Make it possible to downcast/upcast between ImportNamespace and binjs_shared::ast::Node.
impl Node for ImportSpecifier[src]
Make it possible to downcast/upcast between ImportSpecifier and binjs_shared::ast::Node.
impl Node for LabelledStatement[src]
Make it possible to downcast/upcast between LabelledStatement and binjs_shared::ast::Node.
impl Node for LazyArrowExpressionWithExpression[src]
Make it possible to downcast/upcast between LazyArrowExpressionWithExpression and binjs_shared::ast::Node.
impl Node for LazyArrowExpressionWithFunctionBody[src]
Make it possible to downcast/upcast between LazyArrowExpressionWithFunctionBody and binjs_shared::ast::Node.
impl Node for LazyFunctionDeclaration[src]
Make it possible to downcast/upcast between LazyFunctionDeclaration and binjs_shared::ast::Node.
impl Node for LazyFunctionExpression[src]
Make it possible to downcast/upcast between LazyFunctionExpression and binjs_shared::ast::Node.
impl Node for LazyGetter[src]
Make it possible to downcast/upcast between LazyGetter and binjs_shared::ast::Node.
impl Node for LazyMethod[src]
Make it possible to downcast/upcast between LazyMethod and binjs_shared::ast::Node.
impl Node for LazySetter[src]
Make it possible to downcast/upcast between LazySetter and binjs_shared::ast::Node.
impl Node for LiteralBooleanExpression[src]
Make it possible to downcast/upcast between LiteralBooleanExpression and binjs_shared::ast::Node.
impl Node for LiteralInfinityExpression[src]
Make it possible to downcast/upcast between LiteralInfinityExpression and binjs_shared::ast::Node.
impl Node for LiteralNullExpression[src]
Make it possible to downcast/upcast between LiteralNullExpression and binjs_shared::ast::Node.
impl Node for LiteralNumericExpression[src]
Make it possible to downcast/upcast between LiteralNumericExpression and binjs_shared::ast::Node.
impl Node for LiteralPropertyName[src]
Make it possible to downcast/upcast between LiteralPropertyName and binjs_shared::ast::Node.
impl Node for LiteralRegExpExpression[src]
Make it possible to downcast/upcast between LiteralRegExpExpression and binjs_shared::ast::Node.
impl Node for LiteralStringExpression[src]
Make it possible to downcast/upcast between LiteralStringExpression and binjs_shared::ast::Node.
impl Node for Module[src]
Make it possible to downcast/upcast between Module and binjs_shared::ast::Node.
impl Node for NewExpression[src]
Make it possible to downcast/upcast between NewExpression and binjs_shared::ast::Node.
impl Node for NewTargetExpression[src]
Make it possible to downcast/upcast between NewTargetExpression and binjs_shared::ast::Node.
impl Node for Null[src]
Make it possible to downcast/upcast between Null and binjs_shared::ast::Node.
impl Node for ObjectAssignmentTarget[src]
Make it possible to downcast/upcast between ObjectAssignmentTarget and binjs_shared::ast::Node.
impl Node for ObjectBinding[src]
Make it possible to downcast/upcast between ObjectBinding and binjs_shared::ast::Node.
impl Node for ObjectExpression[src]
Make it possible to downcast/upcast between ObjectExpression and binjs_shared::ast::Node.
impl Node for ReturnStatement[src]
Make it possible to downcast/upcast between ReturnStatement and binjs_shared::ast::Node.
impl Node for Script[src]
Make it possible to downcast/upcast between Script and binjs_shared::ast::Node.
impl Node for SetterContents[src]
Make it possible to downcast/upcast between SetterContents and binjs_shared::ast::Node.
impl Node for ShorthandProperty[src]
Make it possible to downcast/upcast between ShorthandProperty and binjs_shared::ast::Node.
impl Node for SpreadElement[src]
Make it possible to downcast/upcast between SpreadElement and binjs_shared::ast::Node.
impl Node for StaticMemberAssignmentTarget[src]
Make it possible to downcast/upcast between StaticMemberAssignmentTarget and binjs_shared::ast::Node.
impl Node for StaticMemberExpression[src]
Make it possible to downcast/upcast between StaticMemberExpression and binjs_shared::ast::Node.
impl Node for Super[src]
Make it possible to downcast/upcast between Super and binjs_shared::ast::Node.
impl Node for SwitchCase[src]
Make it possible to downcast/upcast between SwitchCase and binjs_shared::ast::Node.
impl Node for SwitchDefault[src]
Make it possible to downcast/upcast between SwitchDefault and binjs_shared::ast::Node.
impl Node for SwitchStatement[src]
Make it possible to downcast/upcast between SwitchStatement and binjs_shared::ast::Node.
impl Node for SwitchStatementWithDefault[src]
Make it possible to downcast/upcast between SwitchStatementWithDefault and binjs_shared::ast::Node.
impl Node for TemplateElement[src]
Make it possible to downcast/upcast between TemplateElement and binjs_shared::ast::Node.
impl Node for TemplateExpression[src]
Make it possible to downcast/upcast between TemplateExpression and binjs_shared::ast::Node.
impl Node for ThisExpression[src]
Make it possible to downcast/upcast between ThisExpression and binjs_shared::ast::Node.
impl Node for ThrowStatement[src]
Make it possible to downcast/upcast between ThrowStatement and binjs_shared::ast::Node.
impl Node for TryCatchStatement[src]
Make it possible to downcast/upcast between TryCatchStatement and binjs_shared::ast::Node.
impl Node for TryFinallyStatement[src]
Make it possible to downcast/upcast between TryFinallyStatement and binjs_shared::ast::Node.
impl Node for UnaryExpression[src]
Make it possible to downcast/upcast between UnaryExpression and binjs_shared::ast::Node.
impl Node for UpdateExpression[src]
Make it possible to downcast/upcast between UpdateExpression and binjs_shared::ast::Node.
impl Node for VariableDeclaration[src]
Make it possible to downcast/upcast between VariableDeclaration and binjs_shared::ast::Node.
impl Node for VariableDeclarator[src]
Make it possible to downcast/upcast between VariableDeclarator and binjs_shared::ast::Node.
impl Node for WhileStatement[src]
Make it possible to downcast/upcast between WhileStatement and binjs_shared::ast::Node.
impl Node for WithStatement[src]
Make it possible to downcast/upcast between WithStatement and binjs_shared::ast::Node.
impl Node for YieldExpression[src]
Make it possible to downcast/upcast between YieldExpression and binjs_shared::ast::Node.
impl Node for YieldStarExpression[src]
Make it possible to downcast/upcast between YieldStarExpression and binjs_shared::ast::Node.