replace 'nil' by 'leer' since 'nil' leads to conflict with macOS.

This commit is contained in:
2025-12-30 14:34:26 +01:00
parent 25205875de
commit 70da2f83ea
3 changed files with 9 additions and 9 deletions

View File

@@ -130,7 +130,7 @@ Bool_t PFunction::FindAndCheckMapAndParamRange(const musrfit::ast::operand& oper
CheckVisitor(UInt_t mapSize, UInt_t paramSize, PFunction* func)
: fMapSize(mapSize), fParamSize(paramSize), fFunc(func) {}
Bool_t operator()(const musrfit::ast::nil&) const { return true; }
Bool_t operator()(const musrfit::ast::leer&) const { return true; }
Bool_t operator()(double) const { return true; }
Bool_t operator()(const musrfit::ast::constant&) const { return true; }
@@ -322,7 +322,7 @@ TString PFunction::GenerateStringOperand(const musrfit::ast::operand& operand)
PFunction* fFunc;
StringVisitor(PFunction* func) : fFunc(func) {}
TString operator()(const musrfit::ast::nil&) const { return "nil"; }
TString operator()(const musrfit::ast::leer&) const { return "leer"; }
TString operator()(double val) const {
std::ostringstream oss;
@@ -419,11 +419,11 @@ TString PFunction::GenerateStringOperand(const musrfit::ast::operand& operand)
//==========================================================================
/**
* \brief Evaluates a nil (empty) AST node.
* \brief Evaluates a leer (empty) AST node.
*
* \return Always returns 0.0
*/
Double_t PFunction::EvalVisitor::operator()(const musrfit::ast::nil&) const
Double_t PFunction::EvalVisitor::operator()(const musrfit::ast::leer&) const
{
return 0.0;
}

View File

@@ -184,7 +184,7 @@ class PFunction {
const PMetaData& metaData)
: fMap(map), fParam(param), fMetaData(metaData) {}
Double_t operator()(const musrfit::ast::nil&) const;
Double_t operator()(const musrfit::ast::leer&) const;
Double_t operator()(double val) const;
Double_t operator()(const musrfit::ast::constant& c) const;
Double_t operator()(const musrfit::ast::parameter& p) const;

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