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 * @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; return 0.0;
} }

View File

@@ -129,11 +129,11 @@ class PFunction {
: fMap(map), fParam(param) {} : fMap(map), fParam(param) {}
/** /**
* @brief Evaluates a nil/empty AST node. * @brief Evaluates a leer/empty AST node.
* @param AST nil node (unused) * @param AST leer node (unused)
* @return 0.0 * @return 0.0
*/ */
double operator()(const musrfit::ast::nil&) const; double operator()(const musrfit::ast::leer&) const;
/** /**
* @brief Evaluates a numeric literal. * @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. * Used as a placeholder in variant types where no value is present.
*/ */
struct nil {}; struct leer {};
// Forward declarations for recursive AST structures // Forward declarations for recursive AST structures
struct expression; struct expression;
@@ -173,7 +173,7 @@ namespace musrfit { namespace ast
* recursive grammar structures. * recursive grammar structures.
*/ */
typedef boost::variant< typedef boost::variant<
nil ///< Empty placeholder leer ///< Empty placeholder
, double ///< Numeric literal , double ///< Numeric literal
, constant ///< Constant value , constant ///< Constant value
, parameter ///< Parameter reference , 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 * @param out the output stream
* @return the output stream for chaining * @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 // Boost.Fusion adaptations to make structures compatible with X3 attribute propagation