2025-05-04 14:04:43 +08:00
// Code generated by gop (Go+); DO NOT EDIT.
package main
import (
"fmt"
"github.com/goplus/cobra/xcmd"
2025-05-04 15:18:49 +08:00
build1 "github.com/goplus/llgo/cmd/internal/build"
run1 "github.com/goplus/llgo/cmd/internal/run"
2025-05-04 14:04:43 +08:00
"github.com/goplus/llgo/internal/env"
"github.com/qiniu/x/stringutil"
"runtime"
)
const _ = true
2025-05-04 15:18:49 +08:00
type build struct {
xcmd . Command
* App
}
type cmptest struct {
xcmd . Command
* App
}
type run struct {
xcmd . Command
* App
}
2025-05-04 14:04:43 +08:00
type version struct {
xcmd . Command
* App
}
type App struct {
xcmd . App
}
func ( this * App ) Main ( ) {
2025-05-04 15:18:49 +08:00
_gop_obj0 := & build { App : this }
_gop_obj1 := & cmptest { App : this }
_gop_obj2 := & run { App : this }
_gop_obj3 := & version { App : this }
xcmd . Gopt_App_Main ( this , _gop_obj0 , _gop_obj1 , _gop_obj2 , _gop_obj3 )
}
//line cmd/llgo.next/build_cmd.gox:20
func ( this * build ) Main ( _gop_arg0 string ) {
this . Command . Main ( _gop_arg0 )
//line cmd/llgo.next/build_cmd.gox:20:1
this . Short ( "Compile packages and dependencies" )
//line cmd/llgo.next/build_cmd.gox:22:1
this . FlagOff ( )
//line cmd/llgo.next/build_cmd.gox:24:1
this . Run__1 ( func ( args [ ] string ) {
//line cmd/llgo.next/build_cmd.gox:25:1
build1 . Cmd . Run ( build1 . Cmd , args )
} )
}
func ( this * build ) Classfname ( ) string {
return "build"
}
//line cmd/llgo.next/cmptest_cmd.gox:20
func ( this * cmptest ) Main ( _gop_arg0 string ) {
this . Command . Main ( _gop_arg0 )
//line cmd/llgo.next/cmptest_cmd.gox:20:1
this . Short ( "Compile and run with llgo, compare result (stdout/stderr/exitcode) with go or llgo.expect; generate llgo.expect file if -gen is specified" )
//line cmd/llgo.next/cmptest_cmd.gox:22:1
this . FlagOff ( )
//line cmd/llgo.next/cmptest_cmd.gox:24:1
this . Run__1 ( func ( args [ ] string ) {
//line cmd/llgo.next/cmptest_cmd.gox:25:1
run1 . CmpTestCmd . Run ( run1 . CmpTestCmd , args )
} )
}
func ( this * cmptest ) Classfname ( ) string {
return "cmptest"
}
//line cmd/llgo.next/run_cmd.gox:20
func ( this * run ) Main ( _gop_arg0 string ) {
this . Command . Main ( _gop_arg0 )
//line cmd/llgo.next/run_cmd.gox:20:1
this . Short ( "Compile and run Go program" )
//line cmd/llgo.next/run_cmd.gox:22:1
this . FlagOff ( )
//line cmd/llgo.next/run_cmd.gox:24:1
this . Run__1 ( func ( args [ ] string ) {
//line cmd/llgo.next/run_cmd.gox:25:1
run1 . Cmd . Run ( run1 . Cmd , args )
} )
}
func ( this * run ) Classfname ( ) string {
return "run"
2025-05-04 14:04:43 +08:00
}
2025-05-04 15:18:49 +08:00
//line cmd/llgo.next/version_cmd.gox:22
2025-05-04 14:04:43 +08:00
func ( this * version ) Main ( _gop_arg0 string ) {
this . Command . Main ( _gop_arg0 )
2025-05-04 15:18:49 +08:00
//line cmd/llgo.next/version_cmd.gox:22:1
this . Short ( "Print LLGo version" )
//line cmd/llgo.next/version_cmd.gox:24:1
2025-05-04 14:04:43 +08:00
this . Run__0 ( func ( ) {
2025-05-04 15:18:49 +08:00
//line cmd/llgo.next/version_cmd.gox:25:1
2025-05-04 14:04:43 +08:00
fmt . Println ( stringutil . Concat ( "llgo " , env . Version ( ) , " " , runtime . GOOS , "/" , runtime . GOARCH ) )
} )
}
func ( this * version ) Classfname ( ) string {
return "version"
}
func main ( ) {
2025-05-04 15:18:49 +08:00
//line cmd/llgo.next/version_cmd.gox:24:1
2025-05-04 14:04:43 +08:00
new ( App ) . Main ( )
}