/// <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.ParsePoolVariable/ConstantDefinition() should have reported the error. if ((this.PoolName == null) || (this.PoolVariableName == null)) { return(this); } PoolValueDefinition definition = this.CreateDefinition(processor, sourceCodeService); this.Definfition = definition; // This may fail, but we don't care. If failed, it reported the error through its error sink. processor.FileInProcessor.FileInPoolVariable(definition); return(this); }
bool IInterchangeFileInProcessor.FileInPoolVariable(PoolValueDefinition definition) { this.AddPoolVariable(definition); return(true); }
/// <summary> /// Add a pool variable or pool constant definition to the installation context. /// </summary> /// <param name="definition">Definition of the pool variable or pool constant to be added.</param> public void AddPoolVariable(PoolValueDefinition definition) { this._poolVariables.Add(definition); }