Files
yaegi/stdlib/go1_21_go_build_constraint.go
Kai O'ReillyandGitHub 298524d9aa Remove unnecessary additional newlines in extract generated interface wrappers
A side effect of #1281 is that it added unnecessary additional newlines in generated interface wrappers from the `extract` tool. This PR removes those newlines from the extract tool template and updates the generated code with that change.
2024-07-17 16:58:04 +02:00

49 lines
1.5 KiB
Go

// Code generated by 'yaegi extract go/build/constraint'. DO NOT EDIT.
//go:build go1.21 && !go1.22
// +build go1.21,!go1.22
package stdlib
import (
"go/build/constraint"
"reflect"
)
func init() {
Symbols["go/build/constraint/constraint"] = map[string]reflect.Value{
// function, constant and variable definitions
"GoVersion": reflect.ValueOf(constraint.GoVersion),
"IsGoBuild": reflect.ValueOf(constraint.IsGoBuild),
"IsPlusBuild": reflect.ValueOf(constraint.IsPlusBuild),
"Parse": reflect.ValueOf(constraint.Parse),
"PlusBuildLines": reflect.ValueOf(constraint.PlusBuildLines),
// type definitions
"AndExpr": reflect.ValueOf((*constraint.AndExpr)(nil)),
"Expr": reflect.ValueOf((*constraint.Expr)(nil)),
"NotExpr": reflect.ValueOf((*constraint.NotExpr)(nil)),
"OrExpr": reflect.ValueOf((*constraint.OrExpr)(nil)),
"SyntaxError": reflect.ValueOf((*constraint.SyntaxError)(nil)),
"TagExpr": reflect.ValueOf((*constraint.TagExpr)(nil)),
// interface wrapper definitions
"_Expr": reflect.ValueOf((*_go_build_constraint_Expr)(nil)),
}
}
// _go_build_constraint_Expr is an interface wrapper for Expr type
type _go_build_constraint_Expr struct {
IValue interface{}
WEval func(ok func(tag string) bool) bool
WString func() string
}
func (W _go_build_constraint_Expr) Eval(ok func(tag string) bool) bool { return W.WEval(ok) }
func (W _go_build_constraint_Expr) String() string {
if W.WString == nil {
return ""
}
return W.WString()
}