replace 'nil' by 'leer' since 'nil' leads to conflict with macOS.
This commit is contained in:
@@ -130,7 +130,7 @@ Bool_t PFunction::FindAndCheckMapAndParamRange(const musrfit::ast::operand& oper
|
|||||||
CheckVisitor(UInt_t mapSize, UInt_t paramSize, PFunction* func)
|
CheckVisitor(UInt_t mapSize, UInt_t paramSize, PFunction* func)
|
||||||
: fMapSize(mapSize), fParamSize(paramSize), fFunc(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()(double) const { return true; }
|
||||||
Bool_t operator()(const musrfit::ast::constant&) 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;
|
PFunction* fFunc;
|
||||||
StringVisitor(PFunction* func) : fFunc(func) {}
|
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 {
|
TString operator()(double val) const {
|
||||||
std::ostringstream oss;
|
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
|
* \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;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ class PFunction {
|
|||||||
const PMetaData& metaData)
|
const PMetaData& metaData)
|
||||||
: fMap(map), fParam(param), fMetaData(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()(double val) const;
|
||||||
Double_t operator()(const musrfit::ast::constant& c) const;
|
Double_t operator()(const musrfit::ast::constant& c) const;
|
||||||
Double_t operator()(const musrfit::ast::parameter& p) const;
|
Double_t operator()(const musrfit::ast::parameter& p) const;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user