Ejemplo n.º 1
0
        private SourceFile GetOrCreateSourceFile(AbsolutePath path)
        {
            Contract.Assert(path.IsValid);

            if (m_createdSourceFiles.TryGetValue(path, out SourceFile sourceFile))
            {
                return(sourceFile);
            }

            // This is the interop point for MSBuild to advertise values to other DScript specs
            // For now we just return an empty SourceFile

            // TODO: Add the qualifier space to the (empty now) generated ISourceFile for future interop
            sourceFile = SourceFile.Create(path.ToString(Context.PathTable));
            m_createdSourceFiles.Add(path, sourceFile);

            return(sourceFile);
        }
Ejemplo n.º 2
0
        private SourceFile GetOrCreateSourceFile(AbsolutePath path)
        {
            Contract.Assert(path.IsValid);

            if (m_createdSourceFiles.TryGetValue(path, out SourceFile sourceFile))
            {
                return(sourceFile);
            }

            // This is the interop point to advertise values to other DScript specs
            // For now we just return an empty SourceFile
            sourceFile = SourceFile.Create(path.ToString(m_context.PathTable));

            // We need the binder to recurse
            sourceFile.ExternalModuleIndicator = sourceFile;
            sourceFile.SetLineMap(new int[0] {
            });

            m_createdSourceFiles.Add(path, sourceFile);
            return(sourceFile);
        }