Rename module to "compiler-in-go"

Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
Mariano Uvalle 2025-01-13 19:56:56 -08:00
parent 0acd1d41e8
commit 9c32fe1d31
29 changed files with 38 additions and 38 deletions

View file

@ -5,7 +5,7 @@ import (
"os" "os"
"os/user" "os/user"
"code.jmug.me/jmug/interpreter-in-go/pkg/repl" "code.jmug.me/jmug/compiler-in-go/pkg/repl"
) )
func main() { func main() {

2
go.mod
View file

@ -1,3 +1,3 @@
module code.jmug.me/jmug/interpreter-in-go module code.jmug.me/jmug/compiler-in-go
go 1.23.3 go 1.23.3

View file

@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"strings" "strings"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
type ArrayLiteral struct { type ArrayLiteral struct {

View file

@ -3,7 +3,7 @@ package ast
import ( import (
"testing" "testing"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
func TestString(t *testing.T) { func TestString(t *testing.T) {

View file

@ -3,7 +3,7 @@ package ast
import ( import (
"bytes" "bytes"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
type BlockStatement struct { type BlockStatement struct {

View file

@ -1,6 +1,6 @@
package ast package ast
import "code.jmug.me/jmug/interpreter-in-go/pkg/token" import "code.jmug.me/jmug/compiler-in-go/pkg/token"
type Boolean struct { type Boolean struct {
Token token.Token Token token.Token

View file

@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"strings" "strings"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
type CallExpression struct { type CallExpression struct {

View file

@ -1,6 +1,6 @@
package ast package ast
import "code.jmug.me/jmug/interpreter-in-go/pkg/token" import "code.jmug.me/jmug/compiler-in-go/pkg/token"
// ExpressionStatement is a simple wrapper of an expression in a statement // ExpressionStatement is a simple wrapper of an expression in a statement
// This is common in scripting languages and allows you to have a source line // This is common in scripting languages and allows you to have a source line

View file

@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"strings" "strings"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
type FunctionLiteral struct { type FunctionLiteral struct {

View file

@ -3,7 +3,7 @@ package ast
import ( import (
"strings" "strings"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
type HashLiteral struct { type HashLiteral struct {

View file

@ -1,6 +1,6 @@
package ast package ast
import "code.jmug.me/jmug/interpreter-in-go/pkg/token" import "code.jmug.me/jmug/compiler-in-go/pkg/token"
// Identifier is treated as an expression because in certain // Identifier is treated as an expression because in certain
// circumstances they can return values (think `let some = other` where `other` // circumstances they can return values (think `let some = other` where `other`

View file

@ -3,7 +3,7 @@ package ast
import ( import (
"bytes" "bytes"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
type IfExpression struct { type IfExpression struct {

View file

@ -3,7 +3,7 @@ package ast
import ( import (
"fmt" "fmt"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
type IndexExpression struct { type IndexExpression struct {

View file

@ -1,6 +1,6 @@
package ast package ast
import "code.jmug.me/jmug/interpreter-in-go/pkg/token" import "code.jmug.me/jmug/compiler-in-go/pkg/token"
type InfixExpression struct { type InfixExpression struct {
Token token.Token // The operator token Token token.Token // The operator token

View file

@ -1,6 +1,6 @@
package ast package ast
import "code.jmug.me/jmug/interpreter-in-go/pkg/token" import "code.jmug.me/jmug/compiler-in-go/pkg/token"
type IntegerLiteral struct { type IntegerLiteral struct {
Token token.Token Token token.Token

View file

@ -3,7 +3,7 @@ package ast
import ( import (
"bytes" "bytes"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
type LetStatement struct { type LetStatement struct {

View file

@ -1,6 +1,6 @@
package ast package ast
import "code.jmug.me/jmug/interpreter-in-go/pkg/token" import "code.jmug.me/jmug/compiler-in-go/pkg/token"
type PrefixExpression struct { type PrefixExpression struct {
Token token.Token // The operator token Token token.Token // The operator token

View file

@ -3,7 +3,7 @@ package ast
import ( import (
"bytes" "bytes"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
type ReturnStatement struct { type ReturnStatement struct {

View file

@ -1,6 +1,6 @@
package ast package ast
import "code.jmug.me/jmug/interpreter-in-go/pkg/token" import "code.jmug.me/jmug/compiler-in-go/pkg/token"
type StringLiteral struct { type StringLiteral struct {
Token token.Token Token token.Token

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"os" "os"
"code.jmug.me/jmug/interpreter-in-go/pkg/object" "code.jmug.me/jmug/compiler-in-go/pkg/object"
) )
var builtins = map[string]*object.Builtin{ var builtins = map[string]*object.Builtin{

View file

@ -3,8 +3,8 @@ package evaluator
import ( import (
"fmt" "fmt"
"code.jmug.me/jmug/interpreter-in-go/pkg/ast" "code.jmug.me/jmug/compiler-in-go/pkg/ast"
"code.jmug.me/jmug/interpreter-in-go/pkg/object" "code.jmug.me/jmug/compiler-in-go/pkg/object"
) )
var ( var (

View file

@ -3,9 +3,9 @@ package evaluator
import ( import (
"testing" "testing"
"code.jmug.me/jmug/interpreter-in-go/pkg/lexer" "code.jmug.me/jmug/compiler-in-go/pkg/lexer"
"code.jmug.me/jmug/interpreter-in-go/pkg/object" "code.jmug.me/jmug/compiler-in-go/pkg/object"
"code.jmug.me/jmug/interpreter-in-go/pkg/parser" "code.jmug.me/jmug/compiler-in-go/pkg/parser"
) )
func TestEvalIntegerExpression(t *testing.T) { func TestEvalIntegerExpression(t *testing.T) {

View file

@ -1,6 +1,6 @@
package lexer package lexer
import "code.jmug.me/jmug/interpreter-in-go/pkg/token" import "code.jmug.me/jmug/compiler-in-go/pkg/token"
type Lexer struct { type Lexer struct {
input string input string

View file

@ -3,7 +3,7 @@ package lexer
import ( import (
"testing" "testing"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
func TestNextToken(t *testing.T) { func TestNextToken(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"code.jmug.me/jmug/interpreter-in-go/pkg/ast" "code.jmug.me/jmug/compiler-in-go/pkg/ast"
) )
type ObjectType string type ObjectType string

View file

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"strconv" "strconv"
"code.jmug.me/jmug/interpreter-in-go/pkg/ast" "code.jmug.me/jmug/compiler-in-go/pkg/ast"
"code.jmug.me/jmug/interpreter-in-go/pkg/lexer" "code.jmug.me/jmug/compiler-in-go/pkg/lexer"
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
type ( type (

View file

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"testing" "testing"
"code.jmug.me/jmug/interpreter-in-go/pkg/ast" "code.jmug.me/jmug/compiler-in-go/pkg/ast"
"code.jmug.me/jmug/interpreter-in-go/pkg/lexer" "code.jmug.me/jmug/compiler-in-go/pkg/lexer"
) )
func TestLetStatements(t *testing.T) { func TestLetStatements(t *testing.T) {

View file

@ -1,7 +1,7 @@
package parser package parser
import ( import (
"code.jmug.me/jmug/interpreter-in-go/pkg/token" "code.jmug.me/jmug/compiler-in-go/pkg/token"
) )
const ( const (

View file

@ -5,10 +5,10 @@ import (
"fmt" "fmt"
"io" "io"
"code.jmug.me/jmug/interpreter-in-go/pkg/evaluator" "code.jmug.me/jmug/compiler-in-go/pkg/evaluator"
"code.jmug.me/jmug/interpreter-in-go/pkg/lexer" "code.jmug.me/jmug/compiler-in-go/pkg/lexer"
"code.jmug.me/jmug/interpreter-in-go/pkg/object" "code.jmug.me/jmug/compiler-in-go/pkg/object"
"code.jmug.me/jmug/interpreter-in-go/pkg/parser" "code.jmug.me/jmug/compiler-in-go/pkg/parser"
) )
const PROMPT = ">> " const PROMPT = ">> "