diff --git a/uppsrc/TCore/CalcNode.cpp b/uppsrc/TCore/CalcNode.cpp index 42fd30b70..3a23211f4 100644 --- a/uppsrc/TCore/CalcNode.cpp +++ b/uppsrc/TCore/CalcNode.cpp @@ -10,6 +10,9 @@ NAMESPACE_UPP String CalcType::Describe() { return "lambda-výraz"; } RegisterStdCalcTypeName(const CalcNode *) +String CalcType::Describe() { return t_("lambda-expression"); } +RegisterStdCalcTypeName(CalcNodePtr) + int CharFilterCalcIdent(int c) { return IsIdent(c) ? c : 0; } int CharFilterCalcUpperIdent(int c) { return IsIdent(c) ? ToUpper(c) : 0; } diff --git a/uppsrc/TCore/CalcNode.h b/uppsrc/TCore/CalcNode.h index 02139d4dc..340bce639 100644 --- a/uppsrc/TCore/CalcNode.h +++ b/uppsrc/TCore/CalcNode.h @@ -395,6 +395,14 @@ struct CalcType : public CalcRawType static String Describe(); }; +template <> +struct CalcType : public CalcRawType +{ + static Value ToValue(CalcNodePtr cn) { return !!cn ? RawToValue(cn) : Value(); } + static CalcNodePtr ValueTo(Value v) { return IsTypeRaw(v) ? UPP::ValueTo(v) : NULL; } + static String Describe(); +}; + class CalcParser { public: diff --git a/uppsrc/TCore/CalcType.cpp b/uppsrc/TCore/CalcType.cpp index 68312cd34..f141ede56 100644 --- a/uppsrc/TCore/CalcType.cpp +++ b/uppsrc/TCore/CalcType.cpp @@ -3,16 +3,16 @@ NAMESPACE_UPP -String CalcTypeDescribeInt() { return t_("integer"); } +String CalcTypeDescribeInt() { return t_("integer"); } -String CalcType::Describe() { return t_("real number"); } -String CalcType::Describe() { return t_("string"); } -String CalcType::Describe() { return t_("date"); } -String CalcType