/// <summary> /// Converts the given general term into a basic numeric function term. /// </summary> /// <param name="termAstNode">AST node.</param> /// <returns>Converted basic numeric function term. Null if cannot be converted.</returns> public static BasicNumericFunctionTerm ToBasicNumericFunctionTerm(TermOrNumericAstNode termAstNode) { var function = termAstNode as FunctionTermAstNode; if (function != null && IsNumericFunction(function)) { var numericFunction = new BasicNumericFunctionTerm(function.Name); function.Terms.ForEach(term => numericFunction.Terms.Add(ToConstantTerm(term))); return(numericFunction); } var identifier = termAstNode as IdentifierTermAstNode; if (identifier != null && IsIdentifierTermNumericFunction(identifier)) { return(new BasicNumericFunctionTerm(identifier.Name)); } return(null); }
public virtual void PostVisit(BasicNumericFunctionTerm data) { }