Symbol AddFunction(string name, int numargs, DataType type, CallKinds callkind, string method, FuncKinds funckind) { return(Add(name, new Symbol { Kind = SymKinds.FUNC, CallKind = callkind, NumArgs = numargs, DataType = type, FuncKind = funckind, CallInfo = CallInfo.Get(method), })); }
Symbol AddFunction(string name, int numargs, DataType type, CallKinds callkind, string method, FoldableFlags foldable = FoldableFlags.NUL, FoldSeeds seed = FoldSeeds.NUL) { return(Add(name, new Symbol { Kind = SymKinds.FUNC, CallKind = callkind, NumArgs = numargs, DataType = type, Foldable = foldable, FoldSeed = seed, CallInfo = CallInfo.Get(method), })); }
Symbol AddDyadic(string name, int numargs, int precedence, JoinOps joinop, string method) { return(Add(name, new Symbol { Kind = SymKinds.FUNC, CallKind = CallKinds.JFUNC, NumArgs = numargs, Precedence = precedence, JoinOp = joinop, DataType = DataTypes.Unknown, CallInfo = CallInfo.Get(method), Foldable = (joinop.HasFlag(JoinOps.LEFT) == joinop.HasFlag(JoinOps.RIGHT)) ? FoldableFlags.ANY : FoldableFlags.NUL, })); }
Symbol AddOperator(string name, int numargs, int precedence, DataType type, string method, FoldableFlags foldable = FoldableFlags.NUL, FoldSeeds seed = FoldSeeds.NUL) { return(Add(name, new Symbol { Kind = SymKinds.FUNC, CallKind = CallKinds.FUNC, NumArgs = numargs, Precedence = precedence, DataType = type, Foldable = foldable, FoldSeed = seed, CallInfo = CallInfo.Get(method), })); }