NavigableExpr
NavigableExpr augments an expression with parent, child, and type metadata.
Extends
Section titled “Extends”Methods
Section titled “Methods”asCall()
Section titled “asCall()”asCall():
CallExpr|undefined
AsCall adapts the expr into a CallExpr.
Returns
Section titled “Returns”CallExpr | undefined
Inherited from
Section titled “Inherited from”asComprehension()
Section titled “asComprehension()”asComprehension():
ComprehensionExpr|undefined
AsComprehension adapts the expr into a ComprehensionExpr.
Returns
Section titled “Returns”ComprehensionExpr | undefined
Inherited from
Section titled “Inherited from”asIdent()
Section titled “asIdent()”asIdent():
string|undefined
AsIdent adapts the expr into an identifier string.
Returns
Section titled “Returns”string | undefined
Inherited from
Section titled “Inherited from”asList()
Section titled “asList()”asList():
ListExpr|undefined
AsList adapts the expr into a ListExpr.
Returns
Section titled “Returns”ListExpr | undefined
Inherited from
Section titled “Inherited from”asLiteral()
Section titled “asLiteral()”asLiteral():
ConstantValue|undefined
AsLiteral adapts the expr into a literal constant value.
Returns
Section titled “Returns”ConstantValue | undefined
Inherited from
Section titled “Inherited from”asMap()
Section titled “asMap()”asMap():
MapExpr|undefined
AsMap adapts the expr into a MapExpr.
Returns
Section titled “Returns”MapExpr | undefined
Inherited from
Section titled “Inherited from”asSelect()
Section titled “asSelect()”asSelect():
SelectExpr|undefined
AsSelect adapts the expr into a SelectExpr.
Returns
Section titled “Returns”SelectExpr | undefined
Inherited from
Section titled “Inherited from”asStruct()
Section titled “asStruct()”asStruct():
StructExpr|undefined
AsStruct adapts the expr into a StructExpr.
Returns
Section titled “Returns”StructExpr | undefined
Inherited from
Section titled “Inherited from”children()
Section titled “children()”children():
NavigableExpr[]
Children returns a list of child expression nodes.
Returns
Section titled “Returns”NavigableExpr[]
Overrides
Section titled “Overrides”depth()
Section titled “depth()”depth():
number
Depth indicates the depth in the expression tree.
The root expression has depth 0.
Returns
Section titled “Returns”number
id():
number
Id of the expression as it appears in the AST.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”kind()
Section titled “kind()”kind():
ExprKind
Kind of the expression node. See ExprKind for the valid enum values.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”parent()
Section titled “parent()”parent(): [
NavigableExpr|undefined,boolean]
Parent returns the parent expression node, if one exists.
Returns
Section titled “Returns”[NavigableExpr | undefined, boolean]
renumberIds()
Section titled “renumberIds()”renumberIds(
generator):void
RenumberIds performs an in-place update of the expression and all of its descendant numeric ids.
Parameters
Section titled “Parameters”generator
Section titled “generator”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setKindCase()
Section titled “setKindCase()”setKindCase(
other?):void
SetKindCase replaces the contents of the current expression with the contents of the other.
This method should only be used during AST rewrites using temporary Expr values.
Parameters
Section titled “Parameters”other?
Section titled “other?”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”toProto()
Section titled “toProto()”toProto():
Expr
ToProto converts the expression to protobuf form.
Returns
Section titled “Returns”Expr
Inherited from
Section titled “Inherited from”type()
Section titled “type()”type():
Type|undefined
Type of the expression.
If the expression is type-checked, the type-check metadata is returned.
Returns
Section titled “Returns”Type | undefined