for tests/spirit: replace 'nil' by 'leer' since 'nil' leads to conflict with macOS.

This commit is contained in:
2026-01-01 09:53:12 +01:00
parent 4adf66cb26
commit ce1bc1583b
3 changed files with 9 additions and 9 deletions

View File

@@ -158,11 +158,11 @@ double PFunction::Eval()
//==========================================================================
/**
* @brief Evaluates a nil (empty) AST node.
* @brief Evaluates a leer (empty) AST node.
*
* @return Always returns 0.0
*/
double PFunction::EvalVisitor::operator()(const musrfit::ast::nil&) const
double PFunction::EvalVisitor::operator()(const musrfit::ast::leer &) const
{
return 0.0;
}

View File

@@ -129,11 +129,11 @@ class PFunction {
: fMap(map), fParam(param) {}
/**
* @brief Evaluates a nil/empty AST node.
* @param AST nil node (unused)
* @brief Evaluates a leer/empty AST node.
* @param AST leer node (unused)
* @return 0.0
*/
double operator()(const musrfit::ast::nil&) const;
double operator()(const musrfit::ast::leer&) const;
/**
* @brief Evaluates a numeric literal.

View File

@@ -107,7 +107,7 @@ namespace musrfit { namespace ast
*
* Used as a placeholder in variant types where no value is present.
*/
struct nil {};
struct leer {};
// Forward declarations for recursive AST structures
struct expression;
@@ -173,7 +173,7 @@ namespace musrfit { namespace ast
* recursive grammar structures.
*/
typedef boost::variant<
nil ///< Empty placeholder
leer ///< Empty placeholder
, double ///< Numeric literal
, constant ///< Constant value
, parameter ///< Parameter reference
@@ -246,11 +246,11 @@ namespace musrfit { namespace ast
};
/**
* @brief Stream output operator for nil nodes (debugging support).
* @brief Stream output operator for leer nodes (debugging support).
* @param out the output stream
* @return the output stream for chaining
*/
inline std::ostream& operator<<(std::ostream& out, nil) { out << std::string("nil"); return out; }
inline std::ostream& operator<<(std::ostream& out, leer) { out << std::string("leer"); return out; }
}}
// Boost.Fusion adaptations to make structures compatible with X3 attribute propagation