mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-08 02:36:27 -05:00
Add functions to codegen.go for generating dependency code
This adds code for finding imported type packages and generating code for them, but does not yet handle generating code that uses those types. Towards issue #294
This commit is contained in:
+4
-4
@@ -9,10 +9,10 @@ import (
|
||||
"github.com/attic-labs/noms/types"
|
||||
)
|
||||
|
||||
// ParseNomDL reads a Noms package specification from r and returns a Package. Errors will be annotated with logname and thrown.
|
||||
func ParseNomDL(logname string, r io.Reader, cs chunks.ChunkSource) Parsed {
|
||||
i := runParser(logname, r)
|
||||
|
||||
// ParseNomDL reads a Noms package specification from r and returns a Package. Errors will be annotated with packageName and thrown.
|
||||
func ParseNomDL(packageName string, r io.Reader, cs chunks.ChunkSource) Parsed {
|
||||
i := runParser(packageName, r)
|
||||
i.Name = packageName
|
||||
aliases := resolveImports(i)
|
||||
depRefs := types.SetOfRefOfPackageDef{}
|
||||
for _, target := range aliases {
|
||||
|
||||
Reference in New Issue
Block a user