mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 14:33:41 +00:00
compiler: rename .Parse() to .Compiler()
The fact it was called Parse() is more of a historical accident, as the compiler started out using the Go AST directly instead of Go SSA.
This commit is contained in:
@@ -141,11 +141,14 @@ func NewCompiler(pkgName string, config Config) (*Compiler, error) {
|
||||
return c, nil
|
||||
}
|
||||
|
||||
// Return the LLVM module. Only valid after a successful compile.
|
||||
func (c *Compiler) Module() llvm.Module {
|
||||
return c.mod
|
||||
}
|
||||
|
||||
func (c *Compiler) Parse(mainPath string) error {
|
||||
// Compile the given package path or .go file path. Return an error when this
|
||||
// fails (in any stage).
|
||||
func (c *Compiler) Compile(mainPath string) error {
|
||||
tripleSplit := strings.Split(c.Triple, "-")
|
||||
|
||||
config := loader.Config{
|
||||
|
||||
Reference in New Issue
Block a user