internal void Parse(Parser parser, SmallBasicCompilationPart compilationPart) {
   this.Parse(parser);
   this.compilationPart = compilationPart;
   this.SetContainingNodes();
   this.isInitialized = true;
 }
Example #2
0
 internal SmallBasicCompilationPart(SmallBasicCompilationHelper helper, SmallBasicCompilationPart template)
   : base(helper, template)
 {
 }
 internal SmallBasicRootNamespaceDeclaration(SmallBasicCompilationPart compilationPart, ISourceLocation sourceLocation)
   : base(compilationPart, sourceLocation) {
 }
Example #4
0
 public override CompilationPart UpdateRootNamespace(RootNamespaceDeclaration rootNamespace)
   //^^ requires this.RootNamespace.GetType() == rootNamespace().GetType();
 {
   List<CompilationPart> newParts = new List<CompilationPart>(this.Compilation.Parts);
   Compilation newCompilation = this.Compilation.UpdateCompilationParts(newParts);
   SmallBasicCompilationHelper helper = (SmallBasicCompilationHelper)this.Helper.MakeShallowCopyFor(newCompilation);
   SmallBasicCompilationPart result = new SmallBasicCompilationPart(helper, rootNamespace.SourceLocation);
   result.rootNamespace = rootNamespace;
   for (int i = 0, n = newParts.Count; i < n; i++) {
     if (newParts[i] == this) { newParts[i] = result; break; }
   }
   return result;
 }