ExpressionDiagnostics.h header
#include <ew/app/ExpressionDiagnostics.h>
Namespace ew::app
Enumerations
enum class ExpressionCheck { DanglingReference }
What can be wrong with an expression beyond its not being readable.
Functions
std::vector< ew::app::diagnostics::Diagnostic > ew::app::expression::danglingReferenceFindings(const ew::core::project::Project &project, const QString &expression, const QString &where, const std::vector< ew::core::foundation::ContentId > &subjects, const QString &anchorPart)
A finding for every object reference in expression that no longer resolves.
where names the thing holding the expression, as a reader would say it – the rule "Prices are sane", the condition "Can they pay?", cell B3 of "Costs" – so one message shape serves every surface. subjects is what the finding points at, and anchorPart what silencing it keys on, so silencing one expression's finding does not silence another's.
Empty when expression is sound, and also when its objects are merely invisible to the reader: being unable to see something is not the same as its being gone.
std::optional< ExpressionCheck > ew::app::expression::expressionCheckFromToken(QStringView token)
Parses a check from its serialization token; std::nullopt when unrecognized.
QString ew::app::expression::ruleIdFor(ExpressionCheck check)
The rule id findings of check carry – "expression/dangling-reference".
QString ew::app::expression::toToken(ExpressionCheck check)
The stable serialization token for check.