diff --git a/README.md b/README.md
index a01a4af..062d6f7 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
NURUš„PROGRAMMINGš„LANGUAGE
-
-
-
+
+
+
-
-
-
+
+
+
-
+
A Swahili Programming Language of its kind built from the ground up.
@@ -21,7 +21,7 @@ To get started download the executables from the release page or follow the inst
- Download the binary:
```
-curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Linux_amd64.tar.gz
+curl -O -L https://github.com/NuruProgramming/Nuru/releases/download/v0.5.16/nuru_Linux_amd64.tar.gz
```
- Extract the file to make global available:
@@ -44,13 +44,13 @@ nuru -v
- For apple silicon mac use:
```
- curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Darwin_arm64.tar.gz
+ curl -O -L https://github.com/NuruProgramming/Nuru/releases/download/v0.5.16/nuru_Darwin_arm64.tar.gz
```
- For apple intel mac use:
```
- curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Darwin_amd64.tar.gz
+ curl -O -L https://github.com/NuruProgramming/Nuru/releases/download/v0.5.16/nuru_Darwin_amd64.tar.gz
```
- Extract the file to make global available:
@@ -114,14 +114,14 @@ To install Nuru on your Android device using Termux, follow these steps:
For a more streamlined installation, you can use the following one-liner:
```bash
-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.."
+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.."
```
### Windows
- Executable:
- - Download the Nuru zip file [Here](https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Windows_amd64.zip)
+ - Download the Nuru zip file [Here](https://github.com/NuruProgramming/Nuru/releases/download/v0.5.16/nuru_Windows_amd64.zip)
- Unzip to get the executable
- Double click the executable
@@ -370,7 +370,7 @@ nuru myFile.nr
## Issues
-Kindly open an [Issue](https://github.com/AvicennaJr/Nuru/issues) to make suggestions and anything else.
+Kindly open an [Issue](https://github.com/NuruProgramming/Nuru/issues) to make suggestions and anything else.
## Contributions
diff --git a/ast/ast.go b/ast/ast.go
index bc15253..c42241f 100644
--- a/ast/ast.go
+++ b/ast/ast.go
@@ -4,12 +4,12 @@ import (
"bytes"
"strings"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/token"
)
type Node interface {
TokenLiteral() string
- String() string // to help debug the many errors lmao
+ String() string
}
type Statement interface {
diff --git a/ast/ast_test.go b/ast/ast_test.go
index c5ae5fa..f9eba0d 100644
--- a/ast/ast_test.go
+++ b/ast/ast_test.go
@@ -3,7 +3,7 @@ package ast
import (
"testing"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/token"
)
func TestString(t *testing.T) {
diff --git a/evaluator/assign.go b/evaluator/assign.go
index b78d931..f867321 100644
--- a/evaluator/assign.go
+++ b/evaluator/assign.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalAssign(node *ast.Assign, env *object.Environment) object.Object {
diff --git a/evaluator/assignEqual.go b/evaluator/assignEqual.go
index 551ecd9..6ec2bf2 100644
--- a/evaluator/assignEqual.go
+++ b/evaluator/assignEqual.go
@@ -3,8 +3,8 @@ package evaluator
import (
"strings"
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalAssignEqual(node *ast.AssignEqual, env *object.Environment) object.Object {
diff --git a/evaluator/at.go b/evaluator/at.go
index f1b5558..6cdb35f 100644
--- a/evaluator/at.go
+++ b/evaluator/at.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalAt(node *ast.At, env *object.Environment) object.Object {
diff --git a/evaluator/bang.go b/evaluator/bang.go
index de9b340..ee7d6fb 100644
--- a/evaluator/bang.go
+++ b/evaluator/bang.go
@@ -1,6 +1,6 @@
package evaluator
-import "github.com/AvicennaJr/Nuru/object"
+import "github.com/NuruProgramming/Nuru/object"
func evalBangOperatorExpression(right object.Object) object.Object {
switch right {
@@ -13,4 +13,4 @@ func evalBangOperatorExpression(right object.Object) object.Object {
default:
return FALSE
}
-}
\ No newline at end of file
+}
diff --git a/evaluator/block.go b/evaluator/block.go
index ba1286a..3e27ef5 100644
--- a/evaluator/block.go
+++ b/evaluator/block.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalBlockStatement(block *ast.BlockStatement, env *object.Environment) object.Object {
diff --git a/evaluator/builtins.go b/evaluator/builtins.go
index 0cc4dfd..7b51767 100644
--- a/evaluator/builtins.go
+++ b/evaluator/builtins.go
@@ -7,7 +7,7 @@ import (
"os"
"strings"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/object"
)
var builtins = map[string]*object.Builtin{
diff --git a/evaluator/call.go b/evaluator/call.go
index 4b75811..b936afe 100644
--- a/evaluator/call.go
+++ b/evaluator/call.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalCall(node *ast.CallExpression, env *object.Environment) object.Object {
diff --git a/evaluator/dict.go b/evaluator/dict.go
index 05bbdcb..2d417ca 100644
--- a/evaluator/dict.go
+++ b/evaluator/dict.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalDictLiteral(node *ast.DictLiteral, env *object.Environment) object.Object {
@@ -29,4 +29,4 @@ func evalDictLiteral(node *ast.DictLiteral, env *object.Environment) object.Obje
}
return &object.Dict{Pairs: pairs}
-}
\ No newline at end of file
+}
diff --git a/evaluator/evaluator.go b/evaluator/evaluator.go
index 313ed4a..5fd219d 100644
--- a/evaluator/evaluator.go
+++ b/evaluator/evaluator.go
@@ -3,8 +3,8 @@ package evaluator
import (
"fmt"
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
var (
@@ -134,7 +134,7 @@ func Eval(node ast.Node, env *object.Environment) object.Object {
return val
}
return evalPropertyAssignment(node.Name, val, env)
- case *ast.Assign: // making let temporarily optional as I debug
+ case *ast.Assign:
return evalAssign(node, env)
case *ast.AssignEqual:
return evalAssignEqual(node, env)
diff --git a/evaluator/evaluator_test.go b/evaluator/evaluator_test.go
index 452f552..b6e830d 100644
--- a/evaluator/evaluator_test.go
+++ b/evaluator/evaluator_test.go
@@ -5,9 +5,9 @@ import (
"testing"
"time"
- "github.com/AvicennaJr/Nuru/lexer"
- "github.com/AvicennaJr/Nuru/object"
- "github.com/AvicennaJr/Nuru/parser"
+ "github.com/NuruProgramming/Nuru/lexer"
+ "github.com/NuruProgramming/Nuru/object"
+ "github.com/NuruProgramming/Nuru/parser"
)
func TestEvalIntegerExpression(t *testing.T) {
diff --git a/evaluator/forin.go b/evaluator/forin.go
index 28db0f5..f5db434 100644
--- a/evaluator/forin.go
+++ b/evaluator/forin.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
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
default:
return newError("Mstari %d: Huwezi kufanya operesheni hii na %s", line, i.Type())
}
-}
\ No newline at end of file
+}
diff --git a/evaluator/function.go b/evaluator/function.go
index aa413d5..9e9605d 100644
--- a/evaluator/function.go
+++ b/evaluator/function.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalFunction(node *ast.FunctionLiteral, env *object.Environment) object.Object {
diff --git a/evaluator/identifier.go b/evaluator/identifier.go
index 7745a23..49f8272 100644
--- a/evaluator/identifier.go
+++ b/evaluator/identifier.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalIdentifier(node *ast.Identifier, env *object.Environment) object.Object {
@@ -14,4 +14,4 @@ func evalIdentifier(node *ast.Identifier, env *object.Environment) object.Object
}
return newError("Mstari %d: Neno Halifahamiki: %s", node.Token.Line, node.Value)
-}
\ No newline at end of file
+}
diff --git a/evaluator/if.go b/evaluator/if.go
index 890f24f..8a11e81 100644
--- a/evaluator/if.go
+++ b/evaluator/if.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalIfExpression(ie *ast.IfExpression, env *object.Environment) object.Object {
@@ -19,4 +19,4 @@ func evalIfExpression(ie *ast.IfExpression, env *object.Environment) object.Obje
} else {
return NULL
}
-}
\ No newline at end of file
+}
diff --git a/evaluator/import.go b/evaluator/import.go
index 130f20c..8b5eb23 100644
--- a/evaluator/import.go
+++ b/evaluator/import.go
@@ -2,16 +2,15 @@ package evaluator
import (
"fmt"
- "io/ioutil"
"os"
"path/filepath"
"strings"
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/lexer"
- "github.com/AvicennaJr/Nuru/module"
- "github.com/AvicennaJr/Nuru/object"
- "github.com/AvicennaJr/Nuru/parser"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/lexer"
+ "github.com/NuruProgramming/Nuru/module"
+ "github.com/NuruProgramming/Nuru/object"
+ "github.com/NuruProgramming/Nuru/parser"
)
var searchPaths []string
@@ -62,7 +61,7 @@ func fileExists(file string) bool {
}
func evaluateFile(file string, env *object.Environment) (*object.Environment, object.Object) {
- source, err := ioutil.ReadFile(file)
+ source, err := os.ReadFile(file)
if err != nil {
return nil, &object.Error{Message: fmt.Sprintf("Tumeshindwa kufungua pakeji: %s", file)}
}
diff --git a/evaluator/in.go b/evaluator/in.go
index 446b35c..22bec49 100644
--- a/evaluator/in.go
+++ b/evaluator/in.go
@@ -3,7 +3,7 @@ package evaluator
import (
"strings"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalInExpression(left, right object.Object, line int) object.Object {
diff --git a/evaluator/index.go b/evaluator/index.go
index e5a182f..ee59c97 100644
--- a/evaluator/index.go
+++ b/evaluator/index.go
@@ -1,6 +1,6 @@
package evaluator
-import "github.com/AvicennaJr/Nuru/object"
+import "github.com/NuruProgramming/Nuru/object"
func evalIndexExpression(left, index object.Object, line int) object.Object {
switch {
@@ -41,4 +41,4 @@ func evalDictIndexExpression(dict, index object.Object, line int) object.Object
}
return pair.Value
-}
\ No newline at end of file
+}
diff --git a/evaluator/infix.go b/evaluator/infix.go
index d11d867..2e51052 100644
--- a/evaluator/infix.go
+++ b/evaluator/infix.go
@@ -4,13 +4,13 @@ import (
"math"
"strings"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalInfixExpression(operator string, left, right object.Object, line int) object.Object {
if right == nil {
return newError("Mstari %d: Umekosea hapa", line)
- }
+ }
if left == nil {
return newError("Mstari %d: Umekosea hapa", line)
}
diff --git a/evaluator/method.go b/evaluator/method.go
index 5109f9d..2bf2bd6 100644
--- a/evaluator/method.go
+++ b/evaluator/method.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalMethodExpression(node *ast.MethodExpression, env *object.Environment) object.Object {
diff --git a/evaluator/package.go b/evaluator/package.go
index e7cc020..07e9bee 100644
--- a/evaluator/package.go
+++ b/evaluator/package.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalPackage(node *ast.Package, env *object.Environment) object.Object {
diff --git a/evaluator/postfix.go b/evaluator/postfix.go
index ea90a88..14763d5 100644
--- a/evaluator/postfix.go
+++ b/evaluator/postfix.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalPostfixExpression(env *object.Environment, operator string, node *ast.PostfixExpression) object.Object {
@@ -37,4 +37,4 @@ func evalPostfixExpression(env *object.Environment, operator string, node *ast.P
default:
return newError("Haifahamiki: %s", operator)
}
-}
\ No newline at end of file
+}
diff --git a/evaluator/prefix.go b/evaluator/prefix.go
index 3038006..f46ca91 100644
--- a/evaluator/prefix.go
+++ b/evaluator/prefix.go
@@ -1,6 +1,6 @@
package evaluator
-import "github.com/AvicennaJr/Nuru/object"
+import "github.com/NuruProgramming/Nuru/object"
func evalMinusPrefixOperatorExpression(right object.Object, line int) object.Object {
switch obj := right.(type) {
diff --git a/evaluator/property.go b/evaluator/property.go
index 13ea8be..c935c4f 100644
--- a/evaluator/property.go
+++ b/evaluator/property.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalPropertyExpression(node *ast.PropertyExpression, env *object.Environment) object.Object {
diff --git a/evaluator/switch.go b/evaluator/switch.go
index 53fe6f4..5963d6d 100644
--- a/evaluator/switch.go
+++ b/evaluator/switch.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalSwitchStatement(se *ast.SwitchExpression, env *object.Environment) object.Object {
@@ -27,4 +27,4 @@ func evalSwitchStatement(se *ast.SwitchExpression, env *object.Environment) obje
}
}
return nil
-}
\ No newline at end of file
+}
diff --git a/evaluator/while.go b/evaluator/while.go
index ffe76d3..89a3a3b 100644
--- a/evaluator/while.go
+++ b/evaluator/while.go
@@ -1,8 +1,8 @@
package evaluator
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/object"
)
func evalWhileExpression(we *ast.WhileExpression, env *object.Environment) object.Object {
diff --git a/extensions/vscode/README.md b/extensions/vscode/README.md
index 7896dd8..c0c1c79 100644
--- a/extensions/vscode/README.md
+++ b/extensions/vscode/README.md
@@ -15,10 +15,10 @@ This is a syntax highliting extension for Nuru on vscode. It detects `.nr` and `
### Windows
-- Copy the whole [nuru folder](https://github.com/AvicennaJr/Nuru/tree/main/extensions/vscode/nuru) and paste it in the VSCode extensions directory found in `%USERPROFILE%\.vscode\extensions`
+- Copy the whole [nuru folder](https://github.com/NuruProgramming/Nuru/tree/main/extensions/vscode/nuru) and paste it in the VSCode extensions directory found in `%USERPROFILE%\.vscode\extensions`
- Restart VSCode
### Linux and MacOS
-- Copy the whole [nuru folder](https://github.com/AvicennaJr/Nuru/tree/main/extensions/vscode/nuru) and paste it in the VSCode extensions directory found in `~/.vscode/extensions`
+- Copy the whole [nuru folder](https://github.com/NuruProgramming/Nuru/tree/main/extensions/vscode/nuru) and paste it in the VSCode extensions directory found in `~/.vscode/extensions`
- Restart VSCode
diff --git a/go.mod b/go.mod
index c4ce957..1ea346a 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/AvicennaJr/Nuru
+module github.com/NuruProgramming/Nuru
go 1.18
diff --git a/lexer/lexer.go b/lexer/lexer.go
index 73d4094..b191794 100644
--- a/lexer/lexer.go
+++ b/lexer/lexer.go
@@ -3,7 +3,7 @@
package lexer
import (
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/token"
)
type Lexer struct {
diff --git a/lexer/lexer_test.go b/lexer/lexer_test.go
index 8743b2f..a9252bd 100644
--- a/lexer/lexer_test.go
+++ b/lexer/lexer_test.go
@@ -3,7 +3,7 @@ package lexer
import (
"testing"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/token"
)
func TestNextToken(t *testing.T) {
diff --git a/main.go b/main.go
index d88e762..2a0e4e8 100644
--- a/main.go
+++ b/main.go
@@ -5,8 +5,8 @@ import (
"os"
"strings"
- "github.com/AvicennaJr/Nuru/repl"
- "github.com/AvicennaJr/Nuru/styles"
+ "github.com/NuruProgramming/Nuru/repl"
+ "github.com/NuruProgramming/Nuru/styles"
"github.com/charmbracelet/lipgloss"
)
diff --git a/module/hisabati.go b/module/hisabati.go
index 7323805..c1d84f1 100644
--- a/module/hisabati.go
+++ b/module/hisabati.go
@@ -4,54 +4,55 @@ import (
"math"
"math/rand"
"time"
- "github.com/AvicennaJr/Nuru/object"
+
+ "github.com/NuruProgramming/Nuru/object"
)
var MathFunctions = map[string]object.ModuleFunction{
- "PI": pi,
- "e": e,
- "phi": phi,
- "ln10": ln10,
- "ln2": ln2,
- "log10e": log10e,
- "log2e": log2e,
- "log2": log2,
- "sqrt1_2": sqrt1_2,
- "sqrt2": sqrt2,
- "sqrt3": sqrt3,
- "sqrt5": sqrt5,
- "EPSILON": epsilon,
- "abs": abs,
+ "PI": pi,
+ "e": e,
+ "phi": phi,
+ "ln10": ln10,
+ "ln2": ln2,
+ "log10e": log10e,
+ "log2e": log2e,
+ "log2": log2,
+ "sqrt1_2": sqrt1_2,
+ "sqrt2": sqrt2,
+ "sqrt3": sqrt3,
+ "sqrt5": sqrt5,
+ "EPSILON": epsilon,
+ "abs": abs,
"sign": sign,
- "ceil": ceil,
- "floor": floor,
- "sqrt": sqrt,
- "cbrt": cbrt,
- "root": root,
- "hypot": hypot,
- "random": random,
- "factorial":factorial,
- "round": round,
- "max": max,
- "min": min,
- "exp": exp,
- "expm1": expm1,
- "log": log,
- "log10": log10,
- "log1p": log1p,
- "cos": cos,
- "sin": sin,
- "tan": tan,
- "acos": acos,
- "asin": asin,
- "atan": atan,
- "cosh": cosh,
- "sinh": sinh,
- "tanh": tanh,
- "acosh": acosh,
- "asinh": asinh,
- "atanh": atanh,
- "atan2": atan2,
+ "ceil": ceil,
+ "floor": floor,
+ "sqrt": sqrt,
+ "cbrt": cbrt,
+ "root": root,
+ "hypot": hypot,
+ "random": random,
+ "factorial": factorial,
+ "round": round,
+ "max": max,
+ "min": min,
+ "exp": exp,
+ "expm1": expm1,
+ "log": log,
+ "log10": log10,
+ "log1p": log1p,
+ "cos": cos,
+ "sin": sin,
+ "tan": tan,
+ "acos": acos,
+ "asin": asin,
+ "atan": atan,
+ "cosh": cosh,
+ "sinh": sinh,
+ "tanh": tanh,
+ "acosh": acosh,
+ "asinh": asinh,
+ "atanh": atanh,
+ "atan2": atan2,
}
var Constants = map[string]object.Object{
@@ -715,16 +716,16 @@ func atanh(args []object.Object, defs map[string]object.Object) object.Object {
}
func random(args []object.Object, defs map[string]object.Object) object.Object {
- if len(defs) != 0 {
- return &object.Error{Message: "Undo hili haliruhusu ufafanuzi."}
- }
+ if len(defs) != 0 {
+ return &object.Error{Message: "Undo hili haliruhusu ufafanuzi."}
+ }
- if len(args) != 0 {
- return &object.Error{Message: "Undo hili halipaswi kupokea hoja."}
- }
+ if len(args) != 0 {
+ return &object.Error{Message: "Undo hili halipaswi kupokea hoja."}
+ }
- rand.Seed(time.Now().UnixNano())
- value := rand.Float64()
+ rand.Seed(time.Now().UnixNano())
+ value := rand.Float64()
- return &object.Float{Value: value}
-}
\ No newline at end of file
+ return &object.Float{Value: value}
+}
diff --git a/module/json.go b/module/json.go
index 582359e..51a133f 100644
--- a/module/json.go
+++ b/module/json.go
@@ -3,7 +3,7 @@ package module
import (
"encoding/json"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/object"
)
var JsonFunctions = map[string]object.ModuleFunction{}
diff --git a/module/module.go b/module/module.go
index a82862a..f4c17c7 100644
--- a/module/module.go
+++ b/module/module.go
@@ -1,6 +1,6 @@
package module
-import "github.com/AvicennaJr/Nuru/object"
+import "github.com/NuruProgramming/Nuru/object"
var Mapper = map[string]*object.Module{}
diff --git a/module/net.go b/module/net.go
index b8edb14..421d67b 100644
--- a/module/net.go
+++ b/module/net.go
@@ -6,7 +6,7 @@ import (
"io/ioutil"
"net/http"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/object"
)
var NetFunctions = map[string]object.ModuleFunction{}
diff --git a/module/os.go b/module/os.go
index 5397d6c..53194f4 100644
--- a/module/os.go
+++ b/module/os.go
@@ -5,7 +5,7 @@ import (
"os/exec"
"strings"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/object"
)
var OsFunctions = map[string]object.ModuleFunction{}
diff --git a/module/time.go b/module/time.go
index 69789f6..d1fbd0d 100644
--- a/module/time.go
+++ b/module/time.go
@@ -5,7 +5,7 @@ import (
"strconv"
"time"
- "github.com/AvicennaJr/Nuru/object"
+ "github.com/NuruProgramming/Nuru/object"
)
var TimeFunctions = map[string]object.ModuleFunction{}
diff --git a/object/function.go b/object/function.go
index 444101b..f7ad6b8 100644
--- a/object/function.go
+++ b/object/function.go
@@ -4,7 +4,7 @@ import (
"bytes"
"strings"
- "github.com/AvicennaJr/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/ast"
)
type Function struct {
diff --git a/object/package.go b/object/package.go
index 235d02c..3b104b5 100644
--- a/object/package.go
+++ b/object/package.go
@@ -3,7 +3,7 @@ package object
import (
"fmt"
- "github.com/AvicennaJr/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/ast"
)
type Package struct {
diff --git a/parser/arrays.go b/parser/arrays.go
index 119a903..dca541d 100644
--- a/parser/arrays.go
+++ b/parser/arrays.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseArrayLiteral() ast.Expression {
diff --git a/parser/assignEqual.go b/parser/assignEqual.go
index ed560be..82d2346 100644
--- a/parser/assignEqual.go
+++ b/parser/assignEqual.go
@@ -3,7 +3,7 @@ package parser
import (
"fmt"
- "github.com/AvicennaJr/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/ast"
)
func (p *Parser) parseAssignEqualExpression(exp ast.Expression) ast.Expression {
diff --git a/parser/assignment.go b/parser/assignment.go
index b905329..2a4216c 100644
--- a/parser/assignment.go
+++ b/parser/assignment.go
@@ -3,12 +3,11 @@ package parser
import (
"fmt"
- "github.com/AvicennaJr/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/ast"
)
func (p *Parser) parseAssignmentExpression(exp ast.Expression) ast.Expression {
switch node := exp.(type) {
- // temporarily making let keyword optional
case *ast.Identifier:
e := &ast.Assign{
Token: p.curToken,
diff --git a/parser/at.go b/parser/at.go
index 65587f3..7d0c6ad 100644
--- a/parser/at.go
+++ b/parser/at.go
@@ -1,6 +1,6 @@
package parser
-import "github.com/AvicennaJr/Nuru/ast"
+import "github.com/NuruProgramming/Nuru/ast"
func (p *Parser) parseAt() ast.Expression {
return &ast.At{Token: p.curToken}
diff --git a/parser/boolean.go b/parser/boolean.go
index 9ce95e6..0d3c125 100644
--- a/parser/boolean.go
+++ b/parser/boolean.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseBoolean() ast.Expression {
diff --git a/parser/break.go b/parser/break.go
index 6c4c8ef..0bdc4a7 100644
--- a/parser/break.go
+++ b/parser/break.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseBreak() *ast.Break {
diff --git a/parser/continue.go b/parser/continue.go
index a66b85f..09b6e52 100644
--- a/parser/continue.go
+++ b/parser/continue.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseContinue() *ast.Continue {
diff --git a/parser/dict.go b/parser/dict.go
index 4b3b205..450e72a 100644
--- a/parser/dict.go
+++ b/parser/dict.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseDictLiteral() ast.Expression {
diff --git a/parser/dot.go b/parser/dot.go
index 0503d93..b46882f 100644
--- a/parser/dot.go
+++ b/parser/dot.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseMethod(obj ast.Expression) ast.Expression {
diff --git a/parser/float.go b/parser/float.go
index 77f6075..7544c21 100644
--- a/parser/float.go
+++ b/parser/float.go
@@ -4,7 +4,7 @@ import (
"fmt"
"strconv"
- "github.com/AvicennaJr/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/ast"
)
func (p *Parser) parseFloatLiteral() ast.Expression {
diff --git a/parser/for.go b/parser/for.go
index 7e36038..4548b7a 100644
--- a/parser/for.go
+++ b/parser/for.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseForExpression() ast.Expression {
diff --git a/parser/function.go b/parser/function.go
index 50d604e..d1f710a 100644
--- a/parser/function.go
+++ b/parser/function.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseFunctionLiteral() ast.Expression {
diff --git a/parser/identifier.go b/parser/identifier.go
index d9d5b7e..327993b 100644
--- a/parser/identifier.go
+++ b/parser/identifier.go
@@ -1,7 +1,7 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/ast"
)
func (p *Parser) parseIdentifier() ast.Expression {
diff --git a/parser/if.go b/parser/if.go
index b3eccc6..fff01ed 100644
--- a/parser/if.go
+++ b/parser/if.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseIfExpression() ast.Expression {
diff --git a/parser/import.go b/parser/import.go
index 2a8027b..c2f75f7 100644
--- a/parser/import.go
+++ b/parser/import.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseImport() ast.Expression {
diff --git a/parser/index.go b/parser/index.go
index 9104bc6..6e3cab7 100644
--- a/parser/index.go
+++ b/parser/index.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseIndexExpression(left ast.Expression) ast.Expression {
diff --git a/parser/integer.go b/parser/integer.go
index c35bcd2..46d648a 100644
--- a/parser/integer.go
+++ b/parser/integer.go
@@ -4,7 +4,7 @@ import (
"fmt"
"strconv"
- "github.com/AvicennaJr/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/ast"
)
func (p *Parser) parseIntegerLiteral() ast.Expression {
diff --git a/parser/null.go b/parser/null.go
index 2f4c869..1cf11b5 100644
--- a/parser/null.go
+++ b/parser/null.go
@@ -1,7 +1,7 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/ast"
)
func (p *Parser) parseNull() ast.Expression {
diff --git a/parser/package.go b/parser/package.go
index 7d3c6a0..7e5a6c6 100644
--- a/parser/package.go
+++ b/parser/package.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parsePackage() ast.Expression {
diff --git a/parser/parser.go b/parser/parser.go
index d5365ed..0bcf5f8 100644
--- a/parser/parser.go
+++ b/parser/parser.go
@@ -3,13 +3,12 @@ package parser
import (
"fmt"
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/lexer"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/lexer"
+ "github.com/NuruProgramming/Nuru/token"
)
const (
- // Think of BODMAS
_ int = iota
LOWEST
ASSIGN // =
@@ -89,7 +88,6 @@ func (p *Parser) registerPostfix(tokenType token.TokenType, fn postfixParseFn) {
func New(l *lexer.Lexer) *Parser {
p := &Parser{l: l, errors: []string{}}
- // Gotta set these niggas
p.nextToken()
p.nextToken()
diff --git a/parser/parser_test.go b/parser/parser_test.go
index 91e00ee..50e880e 100644
--- a/parser/parser_test.go
+++ b/parser/parser_test.go
@@ -4,8 +4,8 @@ import (
"fmt"
"testing"
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/lexer"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/lexer"
)
func TestLetStatements(t *testing.T) {
diff --git a/parser/statements.go b/parser/statements.go
index 8718130..7e07f23 100644
--- a/parser/statements.go
+++ b/parser/statements.go
@@ -3,12 +3,11 @@ package parser
import (
"fmt"
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseStatement() ast.Statement {
- // Remember to add switch statements to the language
switch p.curToken.Type {
case token.LET:
return p.parseLetStatement()
diff --git a/parser/string.go b/parser/string.go
index cfd90f2..8a023fa 100644
--- a/parser/string.go
+++ b/parser/string.go
@@ -1,7 +1,7 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/ast"
)
func (p *Parser) parseStringLiteral() ast.Expression {
diff --git a/parser/switch.go b/parser/switch.go
index 88ce460..ebffc63 100644
--- a/parser/switch.go
+++ b/parser/switch.go
@@ -3,8 +3,8 @@ package parser
import (
"fmt"
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseSwitchStatement() ast.Expression {
diff --git a/parser/while.go b/parser/while.go
index 3ae92fc..1d7a202 100644
--- a/parser/while.go
+++ b/parser/while.go
@@ -1,8 +1,8 @@
package parser
import (
- "github.com/AvicennaJr/Nuru/ast"
- "github.com/AvicennaJr/Nuru/token"
+ "github.com/NuruProgramming/Nuru/ast"
+ "github.com/NuruProgramming/Nuru/token"
)
func (p *Parser) parseWhileExpression() ast.Expression {
diff --git a/repl/docs.go b/repl/docs.go
index 17969ab..b8fd428 100644
--- a/repl/docs.go
+++ b/repl/docs.go
@@ -4,11 +4,11 @@ import (
"fmt"
"strings"
- "github.com/AvicennaJr/Nuru/evaluator"
- "github.com/AvicennaJr/Nuru/lexer"
- "github.com/AvicennaJr/Nuru/object"
- "github.com/AvicennaJr/Nuru/parser"
- "github.com/AvicennaJr/Nuru/styles"
+ "github.com/NuruProgramming/Nuru/evaluator"
+ "github.com/NuruProgramming/Nuru/lexer"
+ "github.com/NuruProgramming/Nuru/object"
+ "github.com/NuruProgramming/Nuru/parser"
+ "github.com/NuruProgramming/Nuru/styles"
"github.com/charmbracelet/bubbles/key"
"github.com/charmbracelet/bubbles/list"
"github.com/charmbracelet/bubbles/textarea"
diff --git a/repl/repl.go b/repl/repl.go
index 3af10ed..9646b45 100644
--- a/repl/repl.go
+++ b/repl/repl.go
@@ -8,11 +8,11 @@ import (
"strings"
prompt "github.com/AvicennaJr/GoPrompt"
- "github.com/AvicennaJr/Nuru/evaluator"
- "github.com/AvicennaJr/Nuru/lexer"
- "github.com/AvicennaJr/Nuru/object"
- "github.com/AvicennaJr/Nuru/parser"
- "github.com/AvicennaJr/Nuru/styles"
+ "github.com/NuruProgramming/Nuru/evaluator"
+ "github.com/NuruProgramming/Nuru/lexer"
+ "github.com/NuruProgramming/Nuru/object"
+ "github.com/NuruProgramming/Nuru/parser"
+ "github.com/NuruProgramming/Nuru/styles"
"github.com/charmbracelet/bubbles/list"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"