diff --git a/builtin/doc/builtin.gop b/builtin/doc/builtin.gop index b64dec045..7177ea476 100755 --- a/builtin/doc/builtin.gop +++ b/builtin/doc/builtin.gop @@ -1,7 +1,6 @@ package builtin import ( - "gop/builtin" "gop/builtin/iox" "io" "os" @@ -17,7 +16,6 @@ func Blines(r io.Reader) iox.BLineReader // Type returns the reflection [Type] that represents the dynamic type of i. // If i is a nil interface value, Type returns nil. func Type(i any) reflect.Type -func NewRange(start, end, step int) *builtin.IntRange // Print formats using the default formats for its operands and writes to standard output. // Spaces are added between operands when neither is a string. diff --git a/cmd/chore/gopbuiltingen/builtingen.gox b/cmd/chore/gopbuiltingen/builtingen.gox index 744f86653..f0d1b7a27 100644 --- a/cmd/chore/gopbuiltingen/builtingen.gox +++ b/cmd/chore/gopbuiltingen/builtingen.gox @@ -25,7 +25,6 @@ func gen() []byte { f.Decls <- &ast.GenDecl{ Tok: token.IMPORT, Specs: []ast.Spec{ - importSpec("gop/builtin"), importSpec("gop/builtin/iox"), importSpec("io"), importSpec("os"), @@ -105,10 +104,12 @@ func initBuiltin(fn gopq.NodeSet) { item := stmt.callExpr("scope.Insert").arg(0).cache for call <- item.callExpr("gogen.NewOverloadFunc") { built := call.arg(2).unquotedString! - ref := call.arg(3).callExpr.one - pkg := ref.fun.x.ident! - name := ref.arg(0).unquotedString! - Builtins <- builtin{built, {pkg, name, 0}} + if built != "newRange" { // hide builtin `newRange` + ref := call.arg(3).callExpr.one + pkg := ref.fun.x.ident! + name := ref.arg(0).unquotedString! + Builtins <- builtin{built, {pkg, name, 0}} + } } for call <- stmt.callExpr("initBuiltinFns") { pkg := call.arg(2).ident! diff --git a/cmd/chore/gopbuiltingen/helper.gop b/cmd/chore/gopbuiltingen/helper.gop index 2af5450de..13bb41c0f 100644 --- a/cmd/chore/gopbuiltingen/helper.gop +++ b/cmd/chore/gopbuiltingen/helper.gop @@ -36,9 +36,6 @@ func toParams(params *ast.FieldList, at string) *ast.FieldList { if params == nil { return nil } - if at == "buil" { - at = "builtin" - } list := make([]*ast.Field, len(params.List)) for i, p <- params.List { typ := p.Type