rendered paste body#ifndef SPA_QUERY_TYPES_H
#define SPA_QUERY_TYPES_H
#include <string>
#include <vector>
enum ParameterType
{
ANY, // _
LINE, // line number
NAME, // variable / procedure name in SIMPLE
ENTITY, // stmt, prog_line variable names...
BOOLEAN,
ATTRIBUTE, // entity.attribute
EXPRESSION, // "x + 1"
SUBEXPRESSION // _"x + 1"_
};
struct query_declaration
{
std::string type;
std::string name;
};
struct query_parameter
{
std::string value;
ParameterType type;
};
struct query_relation
{
std::string type;
std::vector<query_parameter> parameters;
};
struct query_tree
{
std::vector<query_declaration> variables;
std::vector<query_parameter> targets;
std::vector<query_relation> relations;
};
#endif