示例#1
0
        private FunctionSymbol(
            string name,
            IEnumerable <Signature> signatures,
            bool hidden,
            bool constantFoldable,
            ResultNameKind resultNameKind,
            string resultNamePrefix,
            string description,
            string alternative)
            : base(name)
        {
            this.Signatures  = signatures.ToReadOnly();
            this.Description = description ?? "";

            foreach (var signature in this.Signatures)
            {
                signature.Symbol = this;
            }

            this._isHidden          = hidden;
            this.IsConstantFoldable = constantFoldable;
            this.ResultNameKind     = resultNameKind;
            this.ResultNamePrefix   = resultNamePrefix;
            this.Alternative        = alternative;
        }
示例#2
0
 /// <summary>
 /// Creates a new <see cref="FunctionSymbol"/> with the property <see cref="ResultNameKind"/> set.
 /// </summary>
 public FunctionSymbol WithResultNameKind(ResultNameKind kind)
 {
     if (this.ResultNameKind != kind)
     {
         return(new FunctionSymbol(this.Name, this.Signatures, hidden: this.hidden, constantFoldable: this.constantFoldable, resultNameKind: kind, resultNamePrefix: this.resultNamePrefix));
     }
     else
     {
         return(this);
     }
 }
示例#3
0
        private FunctionSymbol(string name, IEnumerable <Signature> signatures, bool hidden, bool constantFoldable, ResultNameKind resultNameKind, string resultNamePrefix)
            : base(name)
        {
            this.Signatures = signatures.ToReadOnly();

            foreach (var signature in this.Signatures)
            {
                signature.Symbol = this;
            }

            this.hidden           = hidden;
            this.constantFoldable = constantFoldable;
            this.resultNameKind   = resultNameKind;
            this.resultNamePrefix = resultNamePrefix;
        }
示例#4
0
 /// <summary>
 /// Creates a new <see cref="FunctionSymbol"/> with the <see cref="ResultNameKind"/> property set to the specified value.
 /// </summary>
 public FunctionSymbol WithResultNameKind(ResultNameKind kind)
 {
     return(With(resultNameKind: kind));
 }