Skip to content

Commit 9c317d5

Browse files
authored
Merge pull request #86 from NuruProgramming/fh/cleanup
use NuruProgramming packages
2 parents 1a9ee6f + 31cbcf3 commit 9c317d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+197
-201
lines changed

README.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<h1 align="center">NURU🔥PROGRAMMING🔥LANGUAGE</h1>
22
<p align="center">
3-
<a href="https://github.com/AvicennaJr/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/badge/Nuru-Programming%20Language-yellow"></a>
4-
<a href="https://github.com/AvicennaJr/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/badge/platform-Linux | Windows | Android-green.svg"></a>
5-
<a href="https://github.com/AvicennaJr/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/github/last-commit/AvicennaJr/Nuru"></a>
3+
<a href="https://github.com/NuruProgramming/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/badge/Nuru-Programming%20Language-yellow"></a>
4+
<a href="https://github.com/NuruProgramming/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/badge/platform-Linux | Windows | Android-green.svg"></a>
5+
<a href="https://github.com/NuruProgramming/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/github/last-commit/AvicennaJr/Nuru"></a>
66
<br>
7-
<a href="https://github.com/AvicennaJr/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/github/downloads/avicennajr/nuru/total"></a>
8-
<a href="https://github.com/AvicennaJr/Nuru/releases"><img alt="Nuru Programming Language" src="https://img.shields.io/github/v/release/avicennajr/nuru?include_prereleases"></a>
9-
<a href="https://github.com/AvicennaJr/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/github/actions/workflow/status/AvicennaJr/Nuru/tests.yml?style=plastic"></a>
7+
<a href="https://github.com/NuruProgramming/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/github/downloads/avicennajr/nuru/total"></a>
8+
<a href="https://github.com/NuruProgramming/Nuru/releases"><img alt="Nuru Programming Language" src="https://img.shields.io/github/v/release/avicennajr/nuru?include_prereleases"></a>
9+
<a href="https://github.com/NuruProgramming/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/github/actions/workflow/status/AvicennaJr/Nuru/tests.yml?style=plastic"></a>
1010
<br>
11-
<a href="https://github.com/AvicennaJr/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/github/stars/AvicennaJr/Nuru?style=social"></a>
11+
<a href="https://github.com/NuruProgramming/Nuru"><img alt="Nuru Programming Language" src="https://img.shields.io/github/stars/AvicennaJr/Nuru?style=social"></a>
1212
</p>
1313
A Swahili Programming Language of its kind built from the ground up.
1414

@@ -21,7 +21,7 @@ To get started download the executables from the release page or follow the inst
2121
- Download the binary:
2222

2323
```
24-
curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Linux_amd64.tar.gz
24+
curl -O -L https://github.com/NuruProgramming/Nuru/releases/download/v0.5.16/nuru_Linux_amd64.tar.gz
2525
```
2626

2727
- Extract the file to make global available:
@@ -44,13 +44,13 @@ nuru -v
4444
- For apple silicon mac use:
4545

4646
```
47-
curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Darwin_arm64.tar.gz
47+
curl -O -L https://github.com/NuruProgramming/Nuru/releases/download/v0.5.16/nuru_Darwin_arm64.tar.gz
4848
```
4949

5050
- For apple intel mac use:
5151

5252
```
53-
curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Darwin_amd64.tar.gz
53+
curl -O -L https://github.com/NuruProgramming/Nuru/releases/download/v0.5.16/nuru_Darwin_amd64.tar.gz
5454
```
5555
5656
- Extract the file to make global available:
@@ -114,14 +114,14 @@ To install Nuru on your Android device using Termux, follow these steps:
114114
For a more streamlined installation, you can use the following one-liner:
115115

116116
```bash
117-
curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Android_arm64.tar.gz && mkdir -p /data/data/com.termux/files/usr/share/nuru && tar -xzvf nuru_Android_arm64.tar.gz -C /data/data/com.termux/files/usr/share/nuru && echo "alias nuru='/data/data/com.termux/files/usr/share/nuru/nuru'" >> ~/.bashrc && source ~/.bashrc && echo "Installation complete.."
117+
curl -O -L https://github.com/NuruProgramming/Nuru/releases/download/v0.5.16/nuru_Android_arm64.tar.gz && mkdir -p /data/data/com.termux/files/usr/share/nuru && tar -xzvf nuru_Android_arm64.tar.gz -C /data/data/com.termux/files/usr/share/nuru && echo "alias nuru='/data/data/com.termux/files/usr/share/nuru/nuru'" >> ~/.bashrc && source ~/.bashrc && echo "Installation complete.."
118118
```
119119

120120

121121
### Windows
122122

123123
- Executable:
124-
- Download the Nuru zip file [Here](https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Windows_amd64.zip)
124+
- Download the Nuru zip file [Here](https://github.com/NuruProgramming/Nuru/releases/download/v0.5.16/nuru_Windows_amd64.zip)
125125
- Unzip to get the executable
126126
- Double click the executable
127127

@@ -370,7 +370,7 @@ nuru myFile.nr
370370

371371
## Issues
372372

373-
Kindly open an [Issue](https://github.com/AvicennaJr/Nuru/issues) to make suggestions and anything else.
373+
Kindly open an [Issue](https://github.com/NuruProgramming/Nuru/issues) to make suggestions and anything else.
374374

375375
## Contributions
376376

ast/ast.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import (
44
"bytes"
55
"strings"
66

7-
"github.com/AvicennaJr/Nuru/token"
7+
"github.com/NuruProgramming/Nuru/token"
88
)
99

1010
type Node interface {
1111
TokenLiteral() string
12-
String() string // to help debug the many errors lmao
12+
String() string
1313
}
1414

1515
type Statement interface {

ast/ast_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package ast
33
import (
44
"testing"
55

6-
"github.com/AvicennaJr/Nuru/token"
6+
"github.com/NuruProgramming/Nuru/token"
77
)
88

99
func TestString(t *testing.T) {

evaluator/assign.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalAssign(node *ast.Assign, env *object.Environment) object.Object {

evaluator/assignEqual.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package evaluator
33
import (
44
"strings"
55

6-
"github.com/AvicennaJr/Nuru/ast"
7-
"github.com/AvicennaJr/Nuru/object"
6+
"github.com/NuruProgramming/Nuru/ast"
7+
"github.com/NuruProgramming/Nuru/object"
88
)
99

1010
func evalAssignEqual(node *ast.AssignEqual, env *object.Environment) object.Object {

evaluator/at.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalAt(node *ast.At, env *object.Environment) object.Object {

evaluator/bang.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package evaluator
22

3-
import "github.com/AvicennaJr/Nuru/object"
3+
import "github.com/NuruProgramming/Nuru/object"
44

55
func evalBangOperatorExpression(right object.Object) object.Object {
66
switch right {
@@ -13,4 +13,4 @@ func evalBangOperatorExpression(right object.Object) object.Object {
1313
default:
1414
return FALSE
1515
}
16-
}
16+
}

evaluator/block.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalBlockStatement(block *ast.BlockStatement, env *object.Environment) object.Object {

evaluator/builtins.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"os"
88
"strings"
99

10-
"github.com/AvicennaJr/Nuru/object"
10+
"github.com/NuruProgramming/Nuru/object"
1111
)
1212

1313
var builtins = map[string]*object.Builtin{

evaluator/call.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalCall(node *ast.CallExpression, env *object.Environment) object.Object {

evaluator/dict.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalDictLiteral(node *ast.DictLiteral, env *object.Environment) object.Object {
@@ -29,4 +29,4 @@ func evalDictLiteral(node *ast.DictLiteral, env *object.Environment) object.Obje
2929
}
3030

3131
return &object.Dict{Pairs: pairs}
32-
}
32+
}

evaluator/evaluator.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package evaluator
33
import (
44
"fmt"
55

6-
"github.com/AvicennaJr/Nuru/ast"
7-
"github.com/AvicennaJr/Nuru/object"
6+
"github.com/NuruProgramming/Nuru/ast"
7+
"github.com/NuruProgramming/Nuru/object"
88
)
99

1010
var (
@@ -134,7 +134,7 @@ func Eval(node ast.Node, env *object.Environment) object.Object {
134134
return val
135135
}
136136
return evalPropertyAssignment(node.Name, val, env)
137-
case *ast.Assign: // making let temporarily optional as I debug
137+
case *ast.Assign:
138138
return evalAssign(node, env)
139139
case *ast.AssignEqual:
140140
return evalAssignEqual(node, env)

evaluator/evaluator_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"testing"
66
"time"
77

8-
"github.com/AvicennaJr/Nuru/lexer"
9-
"github.com/AvicennaJr/Nuru/object"
10-
"github.com/AvicennaJr/Nuru/parser"
8+
"github.com/NuruProgramming/Nuru/lexer"
9+
"github.com/NuruProgramming/Nuru/object"
10+
"github.com/NuruProgramming/Nuru/parser"
1111
)
1212

1313
func TestEvalIntegerExpression(t *testing.T) {

evaluator/forin.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalForInExpression(fie *ast.ForIn, env *object.Environment, line int) object.Object {
@@ -26,4 +26,4 @@ func evalForInExpression(fie *ast.ForIn, env *object.Environment, line int) obje
2626
default:
2727
return newError("Mstari %d: Huwezi kufanya operesheni hii na %s", line, i.Type())
2828
}
29-
}
29+
}

evaluator/function.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalFunction(node *ast.FunctionLiteral, env *object.Environment) object.Object {

evaluator/identifier.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalIdentifier(node *ast.Identifier, env *object.Environment) object.Object {
@@ -14,4 +14,4 @@ func evalIdentifier(node *ast.Identifier, env *object.Environment) object.Object
1414
}
1515

1616
return newError("Mstari %d: Neno Halifahamiki: %s", node.Token.Line, node.Value)
17-
}
17+
}

evaluator/if.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalIfExpression(ie *ast.IfExpression, env *object.Environment) object.Object {
@@ -19,4 +19,4 @@ func evalIfExpression(ie *ast.IfExpression, env *object.Environment) object.Obje
1919
} else {
2020
return NULL
2121
}
22-
}
22+
}

evaluator/import.go

+6-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ package evaluator
22

33
import (
44
"fmt"
5-
"io/ioutil"
65
"os"
76
"path/filepath"
87
"strings"
98

10-
"github.com/AvicennaJr/Nuru/ast"
11-
"github.com/AvicennaJr/Nuru/lexer"
12-
"github.com/AvicennaJr/Nuru/module"
13-
"github.com/AvicennaJr/Nuru/object"
14-
"github.com/AvicennaJr/Nuru/parser"
9+
"github.com/NuruProgramming/Nuru/ast"
10+
"github.com/NuruProgramming/Nuru/lexer"
11+
"github.com/NuruProgramming/Nuru/module"
12+
"github.com/NuruProgramming/Nuru/object"
13+
"github.com/NuruProgramming/Nuru/parser"
1514
)
1615

1716
var searchPaths []string
@@ -62,7 +61,7 @@ func fileExists(file string) bool {
6261
}
6362

6463
func evaluateFile(file string, env *object.Environment) (*object.Environment, object.Object) {
65-
source, err := ioutil.ReadFile(file)
64+
source, err := os.ReadFile(file)
6665
if err != nil {
6766
return nil, &object.Error{Message: fmt.Sprintf("Tumeshindwa kufungua pakeji: %s", file)}
6867
}

evaluator/in.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package evaluator
33
import (
44
"strings"
55

6-
"github.com/AvicennaJr/Nuru/object"
6+
"github.com/NuruProgramming/Nuru/object"
77
)
88

99
func evalInExpression(left, right object.Object, line int) object.Object {

evaluator/index.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package evaluator
22

3-
import "github.com/AvicennaJr/Nuru/object"
3+
import "github.com/NuruProgramming/Nuru/object"
44

55
func evalIndexExpression(left, index object.Object, line int) object.Object {
66
switch {
@@ -41,4 +41,4 @@ func evalDictIndexExpression(dict, index object.Object, line int) object.Object
4141
}
4242

4343
return pair.Value
44-
}
44+
}

evaluator/infix.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import (
44
"math"
55
"strings"
66

7-
"github.com/AvicennaJr/Nuru/object"
7+
"github.com/NuruProgramming/Nuru/object"
88
)
99

1010
func evalInfixExpression(operator string, left, right object.Object, line int) object.Object {
1111
if right == nil {
1212
return newError("Mstari %d: Umekosea hapa", line)
13-
}
13+
}
1414
if left == nil {
1515
return newError("Mstari %d: Umekosea hapa", line)
1616
}

evaluator/method.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalMethodExpression(node *ast.MethodExpression, env *object.Environment) object.Object {

evaluator/package.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package evaluator
22

33
import (
4-
"github.com/AvicennaJr/Nuru/ast"
5-
"github.com/AvicennaJr/Nuru/object"
4+
"github.com/NuruProgramming/Nuru/ast"
5+
"github.com/NuruProgramming/Nuru/object"
66
)
77

88
func evalPackage(node *ast.Package, env *object.Environment) object.Object {

0 commit comments

Comments
 (0)