Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,18 @@ const (
)

func (v RegoVersion) ToAstRegoVersion() ast.RegoVersion {
return ast.RegoVersionFromInt(int(v))
switch v {
case RegoUndefined:
return ast.RegoUndefined
case RegoV0:
return ast.RegoV0
case RegoV0CompatV1:
return ast.RegoV0CompatV1
case RegoV1:
return ast.RegoV1
default:
return ast.RegoUndefined
}
}

func (v RegoVersion) String() string {
Expand Down
Loading