Home

Class goog.ds.Expr

Create a new expression. An expression uses a string expression language, and from this string and a passed in DataNode can evaluate to a value, DataNode, or a DataNodeList.

Instance Method Summary
getLast() ⇒ ?string

Gets the last part of the expression.

getNext() ⇒ ?goog.ds.Expr

Gets the parent expression of this expression, or null if this is top level

getNode(?goog.ds.DataNode= opt_ds, boolean= opt_canCreate) ⇒ ?goog.ds.DataNode

Evaluate an expression on a data node, and return the first matching node Recursively walks through child nodes to evaluate

getNodes(?goog.ds.DataNode= opt_ds, boolean= opt_canCreate) ⇒ ?goog.ds.DataNodeList

Evaluate an expression on a data node, and return matching nodes Recursively walks through child nodes to evaluate

getNodes_(?goog.ds.DataNode= opt_ds, boolean= opt_selectOne, boolean= opt_canCreate) ⇒ (goog.ds.DataNode|goog.ds.DataNodeList|null)

Evaluate an expression on a data node, and return the first matching node Recursively walks through child nodes to evaluate

getParent() ⇒ ?goog.ds.Expr

Gets the parent expression of this expression, or null if this is top level

getSource() ⇒ string

Get the source data path for the expression

getValue(?goog.ds.DataNode= opt_ds) ⇒ <Any Type>

Evaluate an expression on a data node, and return a value Recursively walks through child nodes to evaluate TODO(user) Support other expression functions

setSource_(string expr, ?Array= opt_parts, ?goog.ds.Expr= opt_childExpr, ?goog.ds.Expr= opt_prevExpr)

Set the source expression text & parse

Static Method Summary
create(string expr) ⇒ ?goog.ds.Expr

Create an expression from a string, can use cached values

createInternal_(?string= opt_expr, ?Array= opt_parts, ?goog.ds.Expr= opt_childExpr, ?goog.ds.Expr= opt_prevExpr) ⇒ ?goog.ds.Expr

Create an expression from a string, can use cached values Uses hints from related expressions to help in creation