Skip to content

Commit

Permalink
main fix: fix early return (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
DedAzaMarks authored Nov 10, 2023
1 parent bed1f31 commit c56f214
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions cmd/tlgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,19 @@ func runMain(argv arguments) error {
if err != nil {
return fmt.Errorf("error on generating tlo: %w", err)
}
return os.WriteFile(argv.TLOPath, buf, 0644)
if err := os.WriteFile(argv.TLOPath, buf, 0644); err != nil {
return err
}
}
if argv.CanonicalFormPath != "" {
if argv.Verbose {
log.Print("generating file with combinators in canonical form")
}
var buf bytes.Buffer
fullAst.WriteGenerate2TL(&buf)
return os.WriteFile(argv.CanonicalFormPath, buf.Bytes(), 0644)
if err := os.WriteFile(argv.CanonicalFormPath, buf.Bytes(), 0644); err != nil {
return err
}
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion internal/tlast/gentlo/tlgen2_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tlgen2 version 2022.06.30, hash of source code - 474d64250e4ff24a1ed61626f6eb26d899840bbf2a3c63d6cb1231106fa06bc7
tlgen2 version 2022.06.30, hash of source code - 145e88080360eb7d2a3b2afa7df8ebc7301b77b28bbdfa335ab0e7f2595c6949

0 comments on commit c56f214

Please sign in to comment.