Skip to content

Commit

Permalink
wrapped all files within /internal folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ascandone committed Sep 23, 2024
1 parent 308d867 commit 6b6a69c
Show file tree
Hide file tree
Showing 49 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion generate-parser.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
antlr4 -Dlanguage=Go Numscript.g4 -o parser/antlr
antlr4 -Dlanguage=Go Numscript.g4 -o parser/internal/antlr
4 changes: 2 additions & 2 deletions analysis/check.go → internal/analysis/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"math/big"
"slices"

"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/utils"
"github.com/formancehq/numscript/internal/parser"
"github.com/formancehq/numscript/internal/utils"
)

const TypeMonetary = "monetary"
Expand Down
4 changes: 2 additions & 2 deletions analysis/check_test.go → internal/analysis/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"math/big"
"testing"

"github.com/formancehq/numscript/analysis"
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/analysis"
"github.com/formancehq/numscript/internal/parser"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"math/big"

"github.com/formancehq/numscript/ansi"
"github.com/formancehq/numscript/utils"
"github.com/formancehq/numscript/internal/ansi"
"github.com/formancehq/numscript/internal/utils"
)

type Severity = byte
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package analysis

import (
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/parser"
)

type DocumentSymbolKind = float64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"slices"
"testing"

"github.com/formancehq/numscript/analysis"
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/analysis"
"github.com/formancehq/numscript/internal/parser"

"github.com/stretchr/testify/assert"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package analysis

import "github.com/formancehq/numscript/parser"
import "github.com/formancehq/numscript/internal/parser"

type GotoDefinitionResult struct {
Range parser.Range
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package analysis_test
import (
"testing"

"github.com/formancehq/numscript/analysis"
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/analysis"
"github.com/formancehq/numscript/internal/parser"

"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions analysis/hover.go → internal/analysis/hover.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package analysis

import (
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/utils"
"github.com/formancehq/numscript/internal/parser"
"github.com/formancehq/numscript/internal/utils"
)

type Hover interface{ hover() }
Expand Down
4 changes: 2 additions & 2 deletions analysis/hover_test.go → internal/analysis/hover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package analysis_test
import (
"testing"

"github.com/formancehq/numscript/analysis"
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/analysis"
"github.com/formancehq/numscript/internal/parser"

"github.com/stretchr/testify/assert"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/check.go → internal/cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"sort"

"github.com/formancehq/numscript/analysis"
"github.com/formancehq/numscript/internal/analysis"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/lsp.go → internal/cmd/lsp.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/formancehq/numscript/lsp"
"github.com/formancehq/numscript/internal/lsp"

"github.com/spf13/cobra"
)
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions cmd/run.go → internal/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"io"
"os"

"github.com/formancehq/numscript/ansi"
"github.com/formancehq/numscript/interpreter"
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/ansi"
"github.com/formancehq/numscript/internal/interpreter"
"github.com/formancehq/numscript/internal/parser"

"github.com/spf13/cobra"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package interpreter

import "github.com/formancehq/numscript/parser"
import "github.com/formancehq/numscript/internal/parser"

type argsParser struct {
parsedArgsCount int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math/big"
"testing"

"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/parser"
"github.com/stretchr/testify/require"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strconv"
"strings"

"github.com/formancehq/numscript/analysis"
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/utils"
"github.com/formancehq/numscript/internal/analysis"
"github.com/formancehq/numscript/internal/parser"
"github.com/formancehq/numscript/internal/utils"
)

type StaticStore map[string]map[string]*big.Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"math/big"

"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/parser"
)

type MissingFundsErr struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package interpreter_test
import (
"testing"

"github.com/formancehq/numscript/interpreter"
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/interpreter"
"github.com/formancehq/numscript/internal/parser"
"github.com/gkampitakis/go-snaps/snaps"
"github.com/stretchr/testify/require"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"encoding/json"
"math/big"

machine "github.com/formancehq/numscript/interpreter"
machine "github.com/formancehq/numscript/internal/interpreter"

"testing"

"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/parser"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions interpreter/value.go → internal/interpreter/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"math/big"

"github.com/formancehq/numscript/analysis"
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/analysis"
"github.com/formancehq/numscript/internal/parser"
)

type Value interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math/big"
"testing"

"github.com/formancehq/numscript/interpreter"
"github.com/formancehq/numscript/internal/interpreter"

"github.com/stretchr/testify/require"
)
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions lsp/handlers.go → internal/lsp/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"encoding/json"
"fmt"

"github.com/formancehq/numscript/analysis"
"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/utils"
"github.com/formancehq/numscript/internal/analysis"
"github.com/formancehq/numscript/internal/parser"
"github.com/formancehq/numscript/internal/utils"

"github.com/sourcegraph/jsonrpc2"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lsp/server_test.go → internal/lsp/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

lsp "github.com/formancehq/numscript/lsp"
lsp "github.com/formancehq/numscript/internal/lsp"
)

func encodePayload(payload string) *strings.Reader {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions parser/parser.go → internal/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"
"strings"

parser "github.com/formancehq/numscript/parser/antlr"
"github.com/formancehq/numscript/utils"
parser "github.com/formancehq/numscript/internal/parser/antlr"
"github.com/formancehq/numscript/internal/utils"

"github.com/antlr4-go/antlr/v4"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package parser_test
import (
"testing"

"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/parser"

"github.com/gkampitakis/go-snaps/snaps"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion parser/parser_test.go → internal/parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package parser_test
import (
"testing"

"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/parser"

"github.com/gkampitakis/go-snaps/snaps"
"github.com/stretchr/testify/assert"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion parser/range_test.go → internal/parser/range_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package parser_test
import (
"testing"

"github.com/formancehq/numscript/parser"
"github.com/formancehq/numscript/internal/parser"
"github.com/gkampitakis/go-snaps/snaps"
"github.com/stretchr/testify/assert"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"runtime/debug"
"time"

"github.com/formancehq/numscript/cmd"
"github.com/formancehq/numscript/internal/cmd"

"github.com/getsentry/sentry-go"
)
Expand Down

0 comments on commit 6b6a69c

Please sign in to comment.