Add support for and/or in mk2rbc

Bug: 262303006
Test: go test
Change-Id: I04130648084775c0828e95cd18a82e348c3f09eb
This commit is contained in:
Cole Faust
2022-12-12 17:38:01 -08:00
parent 18ac53b4d0
commit d2daabfa02
3 changed files with 100 additions and 0 deletions

View File

@@ -14,6 +14,8 @@
package mk2rbc
import "fmt"
// Starlark expression types we use
type starlarkType int
@@ -31,6 +33,25 @@ const (
starlarkTypeVoid starlarkType = iota
)
func (t starlarkType) String() string {
switch t {
case starlarkTypeList:
return "list"
case starlarkTypeString:
return "string"
case starlarkTypeInt:
return "int"
case starlarkTypeBool:
return "bool"
case starlarkTypeVoid:
return "void"
case starlarkTypeUnknown:
return "unknown"
default:
panic(fmt.Sprintf("Unknown starlark type %d", t))
}
}
type hiddenArgType int
const (