| // Code generated by go generate. DO NOT EDIT. |
| |
| //go:generate rm pkg.go |
| //go:generate go run ../gen/gen.go |
| |
| package strconv |
| |
| import ( |
| "cuelang.org/go/internal/core/adt" |
| "cuelang.org/go/pkg/internal" |
| ) |
| |
| func init() { |
| internal.Register("strconv", pkg) |
| } |
| |
| var _ = adt.TopKind // in case the adt package isn't used |
| |
| var pkg = &internal.Package{ |
| Native: []*internal.Builtin{{ |
| Name: "Unquote", |
| Params: []adt.Kind{adt.StringKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| s := c.String(0) |
| if c.Do() { |
| c.Ret, c.Err = Unquote(s) |
| } |
| }, |
| }, { |
| Name: "ParseBool", |
| Params: []adt.Kind{adt.StringKind}, |
| Result: adt.BoolKind, |
| Func: func(c *internal.CallCtxt) { |
| str := c.String(0) |
| if c.Do() { |
| c.Ret, c.Err = ParseBool(str) |
| } |
| }, |
| }, { |
| Name: "FormatBool", |
| Params: []adt.Kind{adt.BoolKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| b := c.Bool(0) |
| if c.Do() { |
| c.Ret = FormatBool(b) |
| } |
| }, |
| }, { |
| Name: "ParseFloat", |
| Params: []adt.Kind{adt.StringKind, adt.IntKind}, |
| Result: adt.NumKind, |
| Func: func(c *internal.CallCtxt) { |
| s, bitSize := c.String(0), c.Int(1) |
| if c.Do() { |
| c.Ret, c.Err = ParseFloat(s, bitSize) |
| } |
| }, |
| }, { |
| Name: "IntSize", |
| Const: "64", |
| }, { |
| Name: "ParseUint", |
| Params: []adt.Kind{adt.StringKind, adt.IntKind, adt.IntKind}, |
| Result: adt.IntKind, |
| Func: func(c *internal.CallCtxt) { |
| s, base, bitSize := c.String(0), c.Int(1), c.Int(2) |
| if c.Do() { |
| c.Ret, c.Err = ParseUint(s, base, bitSize) |
| } |
| }, |
| }, { |
| Name: "ParseInt", |
| Params: []adt.Kind{adt.StringKind, adt.IntKind, adt.IntKind}, |
| Result: adt.IntKind, |
| Func: func(c *internal.CallCtxt) { |
| s, base, bitSize := c.String(0), c.Int(1), c.Int(2) |
| if c.Do() { |
| c.Ret, c.Err = ParseInt(s, base, bitSize) |
| } |
| }, |
| }, { |
| Name: "Atoi", |
| Params: []adt.Kind{adt.StringKind}, |
| Result: adt.IntKind, |
| Func: func(c *internal.CallCtxt) { |
| s := c.String(0) |
| if c.Do() { |
| c.Ret, c.Err = Atoi(s) |
| } |
| }, |
| }, { |
| Name: "FormatFloat", |
| Params: []adt.Kind{adt.NumKind, adt.IntKind, adt.IntKind, adt.IntKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| f, fmt, prec, bitSize := c.Float64(0), c.Byte(1), c.Int(2), c.Int(3) |
| if c.Do() { |
| c.Ret = FormatFloat(f, fmt, prec, bitSize) |
| } |
| }, |
| }, { |
| Name: "FormatUint", |
| Params: []adt.Kind{adt.IntKind, adt.IntKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| i, base := c.Uint64(0), c.Int(1) |
| if c.Do() { |
| c.Ret = FormatUint(i, base) |
| } |
| }, |
| }, { |
| Name: "FormatInt", |
| Params: []adt.Kind{adt.IntKind, adt.IntKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| i, base := c.Int64(0), c.Int(1) |
| if c.Do() { |
| c.Ret = FormatInt(i, base) |
| } |
| }, |
| }, { |
| Name: "Quote", |
| Params: []adt.Kind{adt.StringKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| s := c.String(0) |
| if c.Do() { |
| c.Ret = Quote(s) |
| } |
| }, |
| }, { |
| Name: "QuoteToASCII", |
| Params: []adt.Kind{adt.StringKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| s := c.String(0) |
| if c.Do() { |
| c.Ret = QuoteToASCII(s) |
| } |
| }, |
| }, { |
| Name: "QuoteToGraphic", |
| Params: []adt.Kind{adt.StringKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| s := c.String(0) |
| if c.Do() { |
| c.Ret = QuoteToGraphic(s) |
| } |
| }, |
| }, { |
| Name: "QuoteRune", |
| Params: []adt.Kind{adt.IntKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| r := c.Rune(0) |
| if c.Do() { |
| c.Ret = QuoteRune(r) |
| } |
| }, |
| }, { |
| Name: "QuoteRuneToASCII", |
| Params: []adt.Kind{adt.IntKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| r := c.Rune(0) |
| if c.Do() { |
| c.Ret = QuoteRuneToASCII(r) |
| } |
| }, |
| }, { |
| Name: "QuoteRuneToGraphic", |
| Params: []adt.Kind{adt.IntKind}, |
| Result: adt.StringKind, |
| Func: func(c *internal.CallCtxt) { |
| r := c.Rune(0) |
| if c.Do() { |
| c.Ret = QuoteRuneToGraphic(r) |
| } |
| }, |
| }, { |
| Name: "IsPrint", |
| Params: []adt.Kind{adt.IntKind}, |
| Result: adt.BoolKind, |
| Func: func(c *internal.CallCtxt) { |
| r := c.Rune(0) |
| if c.Do() { |
| c.Ret = IsPrint(r) |
| } |
| }, |
| }, { |
| Name: "IsGraphic", |
| Params: []adt.Kind{adt.IntKind}, |
| Result: adt.BoolKind, |
| Func: func(c *internal.CallCtxt) { |
| r := c.Rune(0) |
| if c.Do() { |
| c.Ret = IsGraphic(r) |
| } |
| }, |
| }}, |
| } |