gitlab.com/ethan.reesor/vscode-notebooks/yaegi@v0.0.0-20220417214422-5c573557938e/stdlib/go1_16_go_build_constraint.go (about)

     1  // Code generated by 'yaegi extract go/build/constraint'. DO NOT EDIT.
     2  
     3  // +build go1.16,!go1.17
     4  
     5  package stdlib
     6  
     7  import (
     8  	"go/build/constraint"
     9  	"reflect"
    10  )
    11  
    12  func init() {
    13  	Symbols["go/build/constraint/constraint"] = map[string]reflect.Value{
    14  		// function, constant and variable definitions
    15  		"IsGoBuild":      reflect.ValueOf(constraint.IsGoBuild),
    16  		"IsPlusBuild":    reflect.ValueOf(constraint.IsPlusBuild),
    17  		"Parse":          reflect.ValueOf(constraint.Parse),
    18  		"PlusBuildLines": reflect.ValueOf(constraint.PlusBuildLines),
    19  
    20  		// type definitions
    21  		"AndExpr":     reflect.ValueOf((*constraint.AndExpr)(nil)),
    22  		"Expr":        reflect.ValueOf((*constraint.Expr)(nil)),
    23  		"NotExpr":     reflect.ValueOf((*constraint.NotExpr)(nil)),
    24  		"OrExpr":      reflect.ValueOf((*constraint.OrExpr)(nil)),
    25  		"SyntaxError": reflect.ValueOf((*constraint.SyntaxError)(nil)),
    26  		"TagExpr":     reflect.ValueOf((*constraint.TagExpr)(nil)),
    27  
    28  		// interface wrapper definitions
    29  		"_Expr": reflect.ValueOf((*_go_build_constraint_Expr)(nil)),
    30  	}
    31  }
    32  
    33  // _go_build_constraint_Expr is an interface wrapper for Expr type
    34  type _go_build_constraint_Expr struct {
    35  	IValue  interface{}
    36  	WEval   func(ok func(tag string) bool) bool
    37  	WString func() string
    38  }
    39  
    40  func (W _go_build_constraint_Expr) Eval(ok func(tag string) bool) bool {
    41  	return W.WEval(ok)
    42  }
    43  func (W _go_build_constraint_Expr) String() string {
    44  	if W.WString == nil {
    45  		return ""
    46  	}
    47  	return W.WString()
    48  }