コード例 #1
0
        public VariableSymbol(string name, BoundType type)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException("string.IsNullOrWhiteSpace(name)", nameof(name));
            }
            if (!string.Equals(name, name.ToUpperInvariant(), StringComparison.Ordinal))
            {
                throw new ArgumentException("!string.Equals(name, name.ToUpperInvariant(), StringComparison.Ordinal)", nameof(name));
            }
            if (type.IsIntermediate)
            {
                throw new ArgumentException("type.IsIntermediate", nameof(type));
            }

            Name = name;
            Type = type;
        }
コード例 #2
0
 private FunctionSymbol(string name, ImmutableArray <BoundType> argumentsTypes, BoundType type)
 {
     Name           = name;
     ArgumentsTypes = argumentsTypes;
     Type           = type;
 }