Skip to content

Commit

Permalink
refactor(typesystem): use typesystem as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
emil14 committed Feb 1, 2024
1 parent 23224f3 commit 3d21e2e
Show file tree
Hide file tree
Showing 34 changed files with 25 additions and 2,980 deletions.
3 changes: 2 additions & 1 deletion cmd/interpreter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"path/filepath"
"strings"

"github.com/nevalang/typesystem"

"github.com/nevalang/neva/internal/compiler"
"github.com/nevalang/neva/internal/compiler/analyzer"
"github.com/nevalang/neva/internal/compiler/desugarer"
Expand All @@ -15,7 +17,6 @@ import (
"github.com/nevalang/neva/internal/pkgmanager"
"github.com/nevalang/neva/internal/runtime"
"github.com/nevalang/neva/internal/runtime/funcs"
"github.com/nevalang/neva/pkg/typesystem"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/language-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/nevalang/neva/internal/compiler/desugarer"
"github.com/nevalang/neva/internal/compiler/parser"
builder "github.com/nevalang/neva/internal/pkgmanager"
"github.com/nevalang/neva/pkg/typesystem"
"github.com/nevalang/typesystem"
)

func main() {
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/nevalang/neva

go 1.21
go 1.21.0

require (
github.com/golang/mock v1.6.0
github.com/stretchr/testify v1.8.2
github.com/stretchr/testify v1.8.4
)

require (
Expand Down Expand Up @@ -54,6 +54,7 @@ require (
require (
github.com/antlr4-go/antlr/v4 v4.13.0
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/nevalang/typesystem v0.0.0-20240131202005-06cf54d0b884
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/tliron/glsp v0.2.0
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWV
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo=
github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8=
github.com/nevalang/typesystem v0.0.0-20240131202005-06cf54d0b884 h1:4N7oWnL6XFRbkTVUK+FQpv/4/wBEzpSQ9+1UfAtF7Qw=
github.com/nevalang/typesystem v0.0.0-20240131202005-06cf54d0b884/go.mod h1:QY7QUGZrr631Ivujly5LRn60c3XGKysuHHYi/wK3rJg=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ=
Expand Down Expand Up @@ -102,6 +104,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tliron/commonlog v0.2.10 h1:fcrlLemZro9rHHjKsq8VrNLNKqiLNM+Wtl9no6hmik4=
github.com/tliron/commonlog v0.2.10/go.mod h1:XELlm6nokOVcFkRrleWEaC8cZ84UDqAIePaJdehoCII=
github.com/tliron/glsp v0.2.0 h1:zhBD0wDVVqlpuPYtjmhIXI/8W5KQewPjaS4SYRevKYQ=
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/nevalang/neva/internal/compiler"
src "github.com/nevalang/neva/pkg/sourcecode"
ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/analyzer/component_net.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/nevalang/neva/internal/compiler"
src "github.com/nevalang/neva/pkg/sourcecode"
ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/analyzer/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/nevalang/neva/internal/compiler"
src "github.com/nevalang/neva/pkg/sourcecode"
ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/analyzer/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/nevalang/neva/internal/compiler"
src "github.com/nevalang/neva/pkg/sourcecode"
ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

type analyzeTypeDefParams struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/desugarer/const_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/nevalang/neva/internal/compiler"
src "github.com/nevalang/neva/pkg/sourcecode"
ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

var constComponentRef = src.EntityRef{
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/desugarer/desugarer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/nevalang/neva/internal/compiler"
src "github.com/nevalang/neva/pkg/sourcecode"
"github.com/nevalang/neva/pkg/typesystem"
"github.com/nevalang/typesystem"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/desugarer/struct_selectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/nevalang/neva/internal/compiler"
src "github.com/nevalang/neva/pkg/sourcecode"
ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions internal/compiler/desugarer/then_connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/nevalang/neva/internal/compiler"
src "github.com/nevalang/neva/pkg/sourcecode"
"github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/neva/pkg/typesystem"
"github.com/nevalang/typesystem"
ts "github.com/nevalang/typesystem"
)

var lockNode = src.Node{
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/irgen/runtime_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/nevalang/neva/internal/compiler"
"github.com/nevalang/neva/pkg/ir"
src "github.com/nevalang/neva/pkg/sourcecode"
ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

func getRuntimeFunc(component src.Component, nodeTypeArgs []ts.Expr) (string, error) {
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/parser/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

generated "github.com/nevalang/neva/internal/compiler/parser/generated"
src "github.com/nevalang/neva/pkg/sourcecode"
ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

func (s *treeShapeListener) EnterProg(actx *generated.ProgContext) {
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/parser/listener_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/nevalang/neva/internal/compiler"
generated "github.com/nevalang/neva/internal/compiler/parser/generated"
src "github.com/nevalang/neva/pkg/sourcecode"
ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

func parseTypeParams(params generated.ITypeParamsContext) src.TypeParams {
Expand Down
2 changes: 1 addition & 1 deletion pkg/sourcecode/scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"fmt"

ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/sourcecode/sourcecode.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"errors"
"fmt"

ts "github.com/nevalang/neva/pkg/typesystem"
ts "github.com/nevalang/typesystem"
)

type Build struct {
Expand Down
101 changes: 0 additions & 101 deletions pkg/typesystem/helper.go

This file was deleted.

111 changes: 0 additions & 111 deletions pkg/typesystem/integration_test.go

This file was deleted.

Loading

0 comments on commit 3d21e2e

Please sign in to comment.