Skip to content

Commit

Permalink
temp(to be squashed)
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hov committed May 2, 2024
1 parent c23fba3 commit 42a14df
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions gnovm/pkg/gnolang/go2gno.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func MustParseExpr(expr string) Expr {
// ParseFile uses the Go parser to parse body. It then runs [Go2Gno] on the
// resulting AST -- the resulting FileNode is returned, together with any other
// error (including panics, which are recovered) from [Go2Gno].
// Here?
func ParseFile(filename string, body string) (fn *FileNode, err error) {
// Use go parser to parse the body.
fs := token.NewFileSet()
Expand Down
1 change: 1 addition & 0 deletions gnovm/pkg/gnolang/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@ func ReadMemPackageFromList(list []string, pkgPath string) *std.MemPackage {
//
// If one of the files has a different package name than memPkg.Name,
// or [ParseFile] returns an error, ParseMemPackage panics.
// Here?
func ParseMemPackage(memPkg *std.MemPackage) (fset *FileSet) {
fset = &FileSet{}
for _, mfile := range memPkg.Files {
Expand Down
1 change: 1 addition & 0 deletions gnovm/pkg/transpiler/transpiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ func GetTranspileFilenameAndTags(gnoFilePath string) (targetFilename, tags strin
return
}

// Here?
func TranspileAndCheckMempkg(mempkg *std.MemPackage) error {
gofmt := "gofmt"

Expand Down
1 change: 1 addition & 0 deletions tm2/pkg/std/memfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var (
// path must not contain any dots after the first domain component.
// file names must contain dots.
// NOTE: this is to prevent conflicts with nested paths.
// Here?
func (mempkg *MemPackage) Validate() error {
// add assertion that MemPkg contains at least 1 file
if len(mempkg.Files) <= 0 {
Expand Down

0 comments on commit 42a14df

Please sign in to comment.