// Code generated by cuelang.org/go/pkg/gen. DO NOT EDIT.

package regexp

import (
	"cuelang.org/go/internal/core/adt"
	"cuelang.org/go/internal/pkg"
)

func init() {
	pkg.Register("regexp", p)
}

var _ = adt.TopKind // in case the adt package isn't used

var p = &pkg.Package{
	Native: []*pkg.Builtin{{
		Name: "Find",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
		},
		Result: adt.StringKind,
		Func: func(c *pkg.CallCtxt) {
			pattern, s := c.String(0), c.String(1)
			if c.Do() {
				c.Ret, c.Err = Find(pattern, s)
			}
		},
	}, {
		Name: "FindAll",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
			{Kind: adt.IntKind},
		},
		Result: adt.ListKind,
		Func: func(c *pkg.CallCtxt) {
			pattern, s, n := c.String(0), c.String(1), c.Int(2)
			if c.Do() {
				c.Ret, c.Err = FindAll(pattern, s, n)
			}
		},
	}, {
		Name: "FindAllNamedSubmatch",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
			{Kind: adt.IntKind},
		},
		Result: adt.ListKind,
		Func: func(c *pkg.CallCtxt) {
			pattern, s, n := c.String(0), c.String(1), c.Int(2)
			if c.Do() {
				c.Ret, c.Err = FindAllNamedSubmatch(pattern, s, n)
			}
		},
	}, {
		Name: "FindAllSubmatch",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
			{Kind: adt.IntKind},
		},
		Result: adt.ListKind,
		Func: func(c *pkg.CallCtxt) {
			pattern, s, n := c.String(0), c.String(1), c.Int(2)
			if c.Do() {
				c.Ret, c.Err = FindAllSubmatch(pattern, s, n)
			}
		},
	}, {
		Name: "FindNamedSubmatch",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
		},
		Result: adt.StructKind,
		Func: func(c *pkg.CallCtxt) {
			pattern, s := c.String(0), c.String(1)
			if c.Do() {
				c.Ret, c.Err = FindNamedSubmatch(pattern, s)
			}
		},
	}, {
		Name: "FindSubmatch",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
		},
		Result: adt.ListKind,
		Func: func(c *pkg.CallCtxt) {
			pattern, s := c.String(0), c.String(1)
			if c.Do() {
				c.Ret, c.Err = FindSubmatch(pattern, s)
			}
		},
	}, {
		Name: "ReplaceAll",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
		},
		Result: adt.StringKind,
		Func: func(c *pkg.CallCtxt) {
			pattern, src, repl := c.String(0), c.String(1), c.String(2)
			if c.Do() {
				c.Ret, c.Err = ReplaceAll(pattern, src, repl)
			}
		},
	}, {
		Name: "ReplaceAllLiteral",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
		},
		Result: adt.StringKind,
		Func: func(c *pkg.CallCtxt) {
			pattern, src, repl := c.String(0), c.String(1), c.String(2)
			if c.Do() {
				c.Ret, c.Err = ReplaceAllLiteral(pattern, src, repl)
			}
		},
	}, {
		Name: "Valid",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
		},
		Result: adt.BoolKind,
		Func: func(c *pkg.CallCtxt) {
			pattern := c.String(0)
			if c.Do() {
				c.Ret, c.Err = Valid(pattern)
			}
		},
	}, {
		Name: "Match",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
			{Kind: adt.StringKind},
		},
		Result: adt.BoolKind,
		Func: func(c *pkg.CallCtxt) {
			pattern, s := c.String(0), c.String(1)
			if c.Do() {
				c.Ret, c.Err = Match(pattern, s)
			}
		},
	}, {
		Name: "QuoteMeta",
		Params: []pkg.Param{
			{Kind: adt.StringKind},
		},
		Result: adt.StringKind,
		Func: func(c *pkg.CallCtxt) {
			s := c.String(0)
			if c.Do() {
				c.Ret = QuoteMeta(s)
			}
		},
	}},
}
