Ejemplo n.º 1
0
        public XPool(PoolDefinition definition, XSystemDictionary smalltalk)
        {
            if ((definition == null) || (smalltalk == null))
                throw new ArgumentNullException();

            this.Name = definition.Name.Value;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// File-in and process the actions contained in the node.
        /// </summary>
        /// <param name="processor">Interchange format processor responsible for the processing context.</param>
        /// <param name="parseErrorSink">Error sink for reporting parse errors.</param>
        /// <param name="sourceCodeService">Source code service that can convert tokens to source code span and reports issues.</param>
        /// <returns>Return an interchange unit node for annotation, usually just self.</returns>
        public override InterchangeUnitNode FileIn(InterchangeFormatProcessor processor, IParseErrorSink parseErrorSink, ISourceCodeReferenceService sourceCodeService)
        {
            if (processor == null)
                throw new ArgumentNullException("processor");
            if (parseErrorSink == null)
                throw new ArgumentNullException("parseErrorSink");
            if (sourceCodeService == null)
                throw new ArgumentNullException("sourceCodeService");
            // ALL instance vars must be set. If one is missing, then source code bug, and
            //   InterchangeFormatParser.ParsePoolDefinition() should have reported the error.
            if (this.PoolName == null)
                return this;

            PoolDefinition definition = new PoolDefinition(processor.CreateSourceReference(this.PoolName.Value, this.PoolName, sourceCodeService));
            this.Definfition = definition;
            // This may fail, but we don't care. If failed, it reported the error through its error sink.
            processor.FileInProcessor.FileInPool(definition);
            return this;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Add a pool definition to the installation context.
 /// </summary>
 /// <param name="definition">Definition of the pool to be added.</param>
 public void AddPool(PoolDefinition definition)
 {
     this._globals.Add(definition);
 }