diff --git a/bootstrap/pkg/core/keyword.go b/bootstrap/pkg/core/keyword.go index d006af0..a7c3183 100644 --- a/bootstrap/pkg/core/keyword.go +++ b/bootstrap/pkg/core/keyword.go @@ -169,14 +169,16 @@ func (k *Keyword) Eval(rt *Runtime, scope IScope) (*Keyword, IError) { } // Extracts the different parts of the keyword -func extractParts(s string) (string, string) { +func extractParts(s string) (nspart, namepart string) { parts := strings.Split(s, "/") + namepart = parts[0] if len(parts) == 2 { - return parts[0], parts[1] + nspart = parts[0] + namepart = parts[1] } - return "", parts[0] + return } func MakeKeyword(n Node, name string) (*Keyword, IError) { diff --git a/bootstrap/pkg/core/namespace.go b/bootstrap/pkg/core/namespace.go index c297ccc..61ef669 100644 --- a/bootstrap/pkg/core/namespace.go +++ b/bootstrap/pkg/core/namespace.go @@ -252,7 +252,7 @@ func RequireNamespace(rt *Runtime, namespace IExpr) (IExpr, IError) { } // MakeNS creates a new namespace with the given `name` and `source` -func MakeNS(rt *Runtime, name string, source string) Namespace { +func MakeNS(rt *Runtime, name, source string) Namespace { s := MakeScope(rt, nil, &name) return Namespace{ diff --git a/bootstrap/pkg/core/reader.go b/bootstrap/pkg/core/reader.go index 3e9e217..688dad0 100644 --- a/bootstrap/pkg/core/reader.go +++ b/bootstrap/pkg/core/reader.go @@ -18,6 +18,6 @@ along with this program. If not, see . package core -func ReadString(ns string, input string) (*Block, IError) { +func ReadString(ns, input string) (*Block, IError) { return ParseToAST(ns, input) } diff --git a/bootstrap/pkg/core/runtime.go b/bootstrap/pkg/core/runtime.go index 945eefa..c51e98f 100644 --- a/bootstrap/pkg/core/runtime.go +++ b/bootstrap/pkg/core/runtime.go @@ -114,7 +114,7 @@ func (r *Runtime) GetNS(ns string) (*Namespace, bool) { // CreateNS is a helper function to create a namespace and set it to be // the current namespace of the runtime. `MakeNS` is much preferred -func (r *Runtime) CreateNS(name string, source string, setAsCurrent bool) { +func (r *Runtime) CreateNS(name, source string, setAsCurrent bool) { ns := MakeNS(r, name, source) if setAsCurrent { @@ -139,7 +139,7 @@ func nsNameToPath(ns string) string { ".", "/", // TODO: checkout the different OSs for character supports in // the filesystem level - //"-", "_", + // "-", "_", ) return replacer.Replace(ns) + ".srn" }