internal VccAssembly(IName name, string location, ISourceEditHost hostEnvironment, VccOptions options, IEnumerable<IAssemblyReference> assemblyReferences, IEnumerable<IModuleReference> moduleReferences, IEnumerable<CompilationPart> compilationParts) : base(name, location, name, assemblyReferences, moduleReferences, new List<IResourceReference>(0).AsReadOnly(), new List<IFileReference>(0).AsReadOnly()) { this.options = options; this.hostEnvironment = hostEnvironment; this.compilationParts = compilationParts; }
internal VccAssembly(IName name, string location, ISourceEditHost hostEnvironment, VccOptions options, IEnumerable <IAssemblyReference> assemblyReferences, IEnumerable <IModuleReference> moduleReferences, IEnumerable <CompilationPart> compilationParts) : base(name, location, name, assemblyReferences, moduleReferences, new List <IResourceReference>(0).AsReadOnly(), new List <IFileReference>(0).AsReadOnly()) { this.options = options; this.hostEnvironment = hostEnvironment; this.compilationParts = compilationParts; }
public VccAssembly(IName name, string location, ISourceEditHost hostEnvironment, VccOptions options, IEnumerable<IAssemblyReference> assemblyReferences, IEnumerable<IModuleReference> moduleReferences, IEnumerable<VccSourceDocument> programSources) : base(name, location, name, assemblyReferences, moduleReferences, new List<IResourceReference>(0).AsReadOnly(), new List<IFileReference>(0).AsReadOnly()) { this.options = options; this.hostEnvironment = hostEnvironment; this.programSources = programSources; }
/// <summary> /// Allocates a .NET executable assembly that will contain a small program to print "hello" to the console. /// </summary> /// <param name="name">The name of the assembly.</param> /// <param name="host">The host application that is creating this assembly.</param> /// <param name="moduleName">The name of the module containing the assembly manifest. This can be different from the name of the assembly itself.</param> /// <param name="assemblyReferences">A list of the assemblies that are referenced by this module.</param> /// <param name="programSources">A singleton collection whose member is a dummy source document.</param> internal HelloAssembly(IName name, ISourceEditHost host, IName moduleName, IEnumerable <IAssemblyReference> assemblyReferences, IEnumerable <HelloSourceDocument> programSources) : base(name, "hello.exe", moduleName, assemblyReferences, Enumerable <IModuleReference> .Empty, Enumerable <IResourceReference> .Empty, Enumerable <IFileReference> .Empty) { this.host = host; this.programSources = programSources; }
public VccAssembly(IName name, string location, ISourceEditHost hostEnvironment, VccOptions options, IEnumerable <IAssemblyReference> assemblyReferences, IEnumerable <IModuleReference> moduleReferences, IEnumerable <VccSourceDocument> programSources) : base(name, location, name, assemblyReferences, moduleReferences, new List <IResourceReference>(0).AsReadOnly(), new List <IFileReference>(0).AsReadOnly()) { this.options = options; this.hostEnvironment = hostEnvironment; this.programSources = programSources; }
internal VccModule(IName name, string location, ISourceEditHost hostEnvironment, VccOptions options, IAssembly containingAssembly, IEnumerable <IAssemblyReference> assemblyReferences, IEnumerable <IModuleReference> moduleReferences, IEnumerable <CompilationPart> compilationParts) //TODO: pass in information about which assemblies belong to which named unit sets : base(name, location, containingAssembly, assemblyReferences, moduleReferences) { this.options = options; this.hostEnvironment = hostEnvironment; this.compilationParts = compilationParts; }
public VccModule(IName name, string location, ISourceEditHost hostEnvironment, VccOptions options, IAssembly containingAssembly, IEnumerable <IAssemblyReference> assemblyReferences, IEnumerable <IModuleReference> moduleReferences, IEnumerable <VccSourceDocument> programSources) //TODO: pass in information about which assemblies belong to which named unit sets : base(name, location, containingAssembly, assemblyReferences, moduleReferences) { this.options = options; this.hostEnvironment = hostEnvironment; this.programSources = programSources; }
/// <summary> /// The root node and global context for a compilation. Every node in the AST has a path back to this node. /// Compilation nodes and all of their descendants are immutable once initialized. Initialization happens in two phases. /// Calling this constructor is phase one. Setting the parent node is phase two (and is delayed in order to allow for bottom up AST construction). /// A compilation does not have a second phase initialization method since it has no parent. /// </summary> /// <param name="hostEnvironment">An object that represents the application that hosts the compilation and that provides things such as a shared name table.</param> /// <param name="result">A "unit of compilation" that holds the result of this compilation. Once the Compilation has been constructed, result can be navigated causing /// on demand compilation to occur.</param> /// <param name="sources">A singleton collection whose member is a dummy source document.</param> internal HelloCompilation(ISourceEditHost hostEnvironment, Unit result, IEnumerable <HelloSourceDocument> sources) : base(hostEnvironment, result, new FrameworkOptions()) { var helper = new LanguageSpecificCompilationHelper(this, "hello"); this.partList = new List <CompilationPart>(); foreach (var source in sources) { //The source document is a dummy, but the compilation part is not. It proffers a valid AST via its RootNamespace property. //These nodes of this AST uses the dummy source location as the value of their SourceLocation properties. this.partList.Add(new HelloCompilationPart(helper, source.SourceLocation)); } }
//TODO: pass in information about which assemblies belong to which named unit sets internal VccModule(IName name, string location, ISourceEditHost hostEnvironment, VccOptions options, IAssembly containingAssembly, IEnumerable<IAssemblyReference> assemblyReferences, IEnumerable<IModuleReference> moduleReferences, IEnumerable<CompilationPart> compilationParts) : base(name, location, containingAssembly, assemblyReferences, moduleReferences) { this.options = options; this.hostEnvironment = hostEnvironment; this.compilationParts = compilationParts; }
//TODO: pass in information about which assemblies belong to which named unit sets public VccModule(IName name, string location, ISourceEditHost hostEnvironment, VccOptions options, IAssembly containingAssembly, IEnumerable<IAssemblyReference> assemblyReferences, IEnumerable<IModuleReference> moduleReferences, IEnumerable<VccSourceDocument> programSources) : base(name, location, containingAssembly, assemblyReferences, moduleReferences) { this.options = options; this.hostEnvironment = hostEnvironment; this.programSources = programSources; }
internal SmallBasicModule(IName name, string location, ISourceEditHost hostEnvironment, IDictionary<string,string> options, IAssembly containingAssembly, IEnumerable<IAssemblyReference> assemblyReferences, IEnumerable<IModuleReference> moduleReferences, IEnumerable<CompilationPart> compilationParts) //TODO: pass in information about which assemblies belong to which named unit sets : base(name, location, containingAssembly, assemblyReferences, moduleReferences) { this.options = options; this.hostEnvironment = hostEnvironment; this.compilationParts = compilationParts; }
public SmallBasicModule(IName name, string location, ISourceEditHost hostEnvironment, IDictionary<string,string> options, IAssembly containingAssembly, IEnumerable<IAssemblyReference> assemblyReferences, IEnumerable<IModuleReference> moduleReferences, IEnumerable<SmallBasicDocument> programSources) //TODO: pass in information about which assemblies belong to which named unit sets : base(name, location, containingAssembly, assemblyReferences, moduleReferences) { this.options = options; this.hostEnvironment = hostEnvironment; this.programSources = programSources; }
public TransEnv(ISourceEditHost hostEnv, VccOptions options) : base(new VccOptionWrapper(options)) { this.options = options; this.hostEnv = hostEnv; this.hostEnv.Errors += ErrorHandler; }
/// <summary> /// Do not use this constructor unless you are implementing the Compilation property of the Module class. /// I.e. to construct a Compilation instance, construct a Module instance and use its Compilation property. /// </summary> internal SmallBasicCompilation(ISourceEditHost hostEnvironment, Unit result, IEnumerable<CompilationPart> parts) : base(hostEnvironment, result, new FrameworkOptions()) //^ requires result is Module || result is Assembly; { this.parts = parts; }