Compiler prints a special error if output path has no extension

This commit is contained in:
Sasha Koshka 2024-02-11 03:40:00 -05:00
parent 20ed736823
commit 8bf97af763

View File

@ -57,6 +57,10 @@ func (this *Compiler) Compile (inputs []string) error {
defer file.Close()
_, err = module.WriteTo(file)
return err
case "":
return errors.New(fmt.Sprint (
"output file has no extension, ",
"could not determine output type"))
default:
return errors.New(fmt.Sprintf (
"unknown output type %s", extension))