This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
2022-08-08 07:08:50 +00:00
|
|
|
package arf
|
|
|
|
|
|
|
|
import "os"
|
|
|
|
import "io"
|
|
|
|
import "path/filepath"
|
2022-08-10 15:28:29 +00:00
|
|
|
// import "github.com/sashakoshka/arf/lexer"
|
2022-08-08 07:08:50 +00:00
|
|
|
|
|
|
|
func CompileModule (modulePath string, output io.Writer) (err error) {
|
|
|
|
moduleFiles, err := os.ReadDir(modulePath)
|
|
|
|
if err != nil { return err }
|
|
|
|
|
2022-08-10 15:28:29 +00:00
|
|
|
// var moduleTokens []lexer.Token
|
2022-08-08 07:08:50 +00:00
|
|
|
for _, entry := range moduleFiles {
|
|
|
|
if filepath.Ext(entry.Name()) != ".arf" || entry.IsDir() {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
2022-08-10 15:28:29 +00:00
|
|
|
// tokens, err := lexer.Tokenize()
|
|
|
|
// if err != nil { return err }
|
2022-08-08 07:08:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|