Expr
class Expr extends Message
An abstract representation of a common expression.
Expressions are abstractly represented as a collection of identifiers,
select statements, function calls, literals, and comprehensions. All
operators with the exception of the '.' operator are modelled as function
calls. This makes it easy to represent new operators into the existing AST.
All references within expressions must resolve to a [Decl][google.api.expr.v1beta1.Decl] provided at
type-check for an expression to be valid. A reference may either be a bare
identifier name
or a qualified identifier google.api.name
. References
may either refer to a value or a function declaration.
For example, the expression google.api.name.startsWith('expr')
references
the declaration google.api.name
within a [Expr.Select][google.api.expr.v1beta1.Expr.Select] expression, and
the function declaration startsWith
.
Generated from protobuf message google.api.expr.v1beta1.Expr
Properties
protected | $expr_kind |
Methods
Constructor.
Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.
Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.
A literal expression.
An identifier expression.
A field selection expression, e.g. request.auth
.
A call expression, including calls to predefined functions and operators.
A list creation expression.
A map or object creation expression.
A comprehension expression.
No description
Details
at line 65
__construct(array $data = NULL)
Constructor.
at line 78
int
getId()
Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.
Generated from protobuf field int32 id = 2;
at line 92
$this
setId(int $var)
Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.
Generated from protobuf field int32 id = 2;
at line 106
Literal
getLiteralExpr()
A literal expression.
Generated from protobuf field .google.api.expr.v1beta1.Literal literal_expr = 3;
at line 118
$this
setLiteralExpr(Literal $var)
A literal expression.
Generated from protobuf field .google.api.expr.v1beta1.Literal literal_expr = 3;
at line 132
Ident
getIdentExpr()
An identifier expression.
Generated from protobuf field .google.api.expr.v1beta1.Expr.Ident ident_expr = 4;
at line 144
$this
setIdentExpr(Ident $var)
An identifier expression.
Generated from protobuf field .google.api.expr.v1beta1.Expr.Ident ident_expr = 4;
at line 158
Select
getSelectExpr()
A field selection expression, e.g. request.auth
.
Generated from protobuf field .google.api.expr.v1beta1.Expr.Select select_expr = 5;
at line 170
$this
setSelectExpr(Select $var)
A field selection expression, e.g. request.auth
.
Generated from protobuf field .google.api.expr.v1beta1.Expr.Select select_expr = 5;
at line 184
Call
getCallExpr()
A call expression, including calls to predefined functions and operators.
Generated from protobuf field .google.api.expr.v1beta1.Expr.Call call_expr = 6;
at line 196
$this
setCallExpr(Call $var)
A call expression, including calls to predefined functions and operators.
Generated from protobuf field .google.api.expr.v1beta1.Expr.Call call_expr = 6;
at line 210
CreateList
getListExpr()
A list creation expression.
Generated from protobuf field .google.api.expr.v1beta1.Expr.CreateList list_expr = 7;
at line 222
$this
setListExpr(CreateList $var)
A list creation expression.
Generated from protobuf field .google.api.expr.v1beta1.Expr.CreateList list_expr = 7;
at line 236
CreateStruct
getStructExpr()
A map or object creation expression.
Generated from protobuf field .google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8;
at line 248
$this
setStructExpr(CreateStruct $var)
A map or object creation expression.
Generated from protobuf field .google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8;
at line 262
Comprehension
getComprehensionExpr()
A comprehension expression.
Generated from protobuf field .google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9;
at line 274
$this
setComprehensionExpr(Comprehension $var)
A comprehension expression.
Generated from protobuf field .google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9;