41 lines
1.0 KiB
Go
41 lines
1.0 KiB
Go
package build
|
|
|
|
import (
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/ast"
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/compiler"
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/tsoptions"
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/tspath"
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/vfs"
|
|
)
|
|
|
|
type compilerHost struct {
|
|
host *host
|
|
trace func(msg string)
|
|
}
|
|
|
|
var _ compiler.CompilerHost = (*compilerHost)(nil)
|
|
|
|
func (h *compilerHost) FS() vfs.FS {
|
|
return h.host.FS()
|
|
}
|
|
|
|
func (h *compilerHost) DefaultLibraryPath() string {
|
|
return h.host.DefaultLibraryPath()
|
|
}
|
|
|
|
func (h *compilerHost) GetCurrentDirectory() string {
|
|
return h.host.GetCurrentDirectory()
|
|
}
|
|
|
|
func (h *compilerHost) Trace(msg string) {
|
|
h.trace(msg)
|
|
}
|
|
|
|
func (h *compilerHost) GetSourceFile(opts ast.SourceFileParseOptions) *ast.SourceFile {
|
|
return h.host.GetSourceFile(opts)
|
|
}
|
|
|
|
func (h *compilerHost) GetResolvedProjectReference(fileName string, path tspath.Path) *tsoptions.ParsedCommandLine {
|
|
return h.host.GetResolvedProjectReference(fileName, path)
|
|
}
|