internal void Parse(Parsing.Parser parser, VccCompilationPart compilationPart) { this.Parse(parser); this.compilationPart = compilationPart; this.SetContainingNodes(); this.isInitialized = true; }
protected override void InitializeIfNecessary() //^^ ensures this.members != null; { if (this.isInitialized) { return; } lock (GlobalLock.LockingObject) { if (this.isInitialized) { return; } //^ assume this.CompilationPart is VccCompilationPart; //The constructor ensures this VccCompilationPart cp = (VccCompilationPart)this.CompilationPart; Parser parser = Parser.Create(cp.Compilation, this.SourceLocation, cp.ScannerAndParserErrors); //TODO: get options from Compilation this.Parse(parser); this.SetContainingNodes(); ErrorEventArgs errorEventArguments = new ErrorEventArgs(ErrorReporter.Instance, this.SourceLocation, cp.ScannerAndParserErrors.AsReadOnly()); this.Compilation.HostEnvironment.ReportErrors(errorEventArguments); errorEventArguments = new ErrorEventArgs(ErrorReporter.Instance, cp.UnpreprocessedDocument.SourceLocation, cp.PreprocessorErrors); this.Compilation.HostEnvironment.ReportErrors(errorEventArguments); this.isInitialized = true; } }
//^ requires sourceLocation.SourceDocument is VccCompositeDocument; internal VccRootNamespaceDeclaration(VccCompilationPart compilationPart, ISourceLocation sourceLocation) : base(compilationPart, sourceLocation) { }
internal VccRootNamespaceDeclaration(VccCompilationPart compilationPart, ISourceLocation sourceLocation) : base(compilationPart, sourceLocation) //^ requires sourceLocation.SourceDocument is VccCompositeDocument; { }