Esempio n. 1
0
        /// <summary>
        /// Processes contract node.
        /// </summary>
        /// <param name="node">The node.</param>
        private void Process_Contract(dynamic node)
        {
            Contract contract = new Contract();

            // Map source location and node to object
            contract.AddMetaInfo(new SourceLocationInfo(node, context));
            context.AddObject(node, contract);

            // Namespace (from parent)
            try
            {
                NameContext.Current.CheckName(node.Name, typeof(Contract));
                contract.Namespace = (Namespace)NameContext.Current.Scope;
            }
            catch (NameCollisionException exception)
            {
                Error_NameExists(contract, exception);
            }

            // Name (obligatory)
            contract.Name = node.Name;

            // Interface is not processed yet

            // OperationContracts are not processed yet
        }