コード例 #1
0
ファイル: Structure.cs プロジェクト: xyrus02/runtime
        public Structure([NotNull] SymbolScope scope, [NotNull] Symbol name, params Declaration[] fields)
        {
            mScope = scope ?? throw new ArgumentNullException(nameof(scope));
            Name   = name ?? throw new ArgumentNullException(nameof(name));

            Fields = fields ?? new Declaration[0];

            if (Fields.Length == 0)
            {
                throw new ArgumentException("Structures must contain at least one field.", nameof(fields));
            }
        }