public static TrsTerm Convert(this AstTerm astIn) { var tokenTermName = astIn.TermName; return(new TrsTerm(tokenTermName.TokenString, astIn.TermArguments.Arguments.Select(astTermArg => ConvertAstTermBase(astTermArg)), astIn)); }
public TrsTerm(string name, IEnumerable<TrsTermBase> arguments, AstTerm sourceTerm) { if (arguments == null || arguments.Count() == 0) throw new ArgumentException("Expected at least one argument for term definition, otherwise use atom."); Name = name; Arguments = arguments.ToList(); AstSource = sourceTerm; }
public TrsTerm(string name, IEnumerable <TrsTermBase> arguments, AstTerm sourceTerm) { if (arguments == null || arguments.Count() == 0) { throw new ArgumentException("Expected at least one argument for term definition, otherwise use atom."); } Name = name; Arguments = arguments.ToList(); AstSource = sourceTerm; }