Zen
A cross-platform functional programming language
|
Concrete class for AST Node representing a query. More...
#include <Ast.hpp>
Public Member Functions | |
QueryExpr (const QualifiedType &type, const Expr &expr) | |
Default constructor. | |
const Expr & | getExpr () const |
Returns the query expression. | |
Private Member Functions | |
virtual void | visit (Expr::Visitor &visitor) const |
Abstract visitor function. | |
Private Attributes | |
const Expr & | _expr |
Concrete class for AST Node representing a query.
A query is used to extract data from certain data structures such as trees and databases. For example:
local y = { @name::(true) && @age::((val > 25) && (val < 35))};
Here, y is a query that returns the age value if between 25 and 35, and the name value unconditionally.
QueryExpr | ( | const QualifiedType & | type, |
const Expr & | expr | ||
) | [inline] |
Default constructor.
type | Expression type |
expr | The root node of the query expression, usually consisting of query expression parts. |
const Expr& getExpr | ( | ) | const [inline] |
Returns the query expression.
void visit | ( | Expr::Visitor & | visitor | ) | const [private, virtual] |