Skip to content

Commit e5149c0

Browse files
committed
chore(deps): update
1 parent 99cc2ac commit e5149c0

File tree

3 files changed

+39
-10
lines changed

3 files changed

+39
-10
lines changed

go.mod

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@ require (
66
github.com/smacker/go-tree-sitter v0.0.0-20221031025734-03a9c97d8039
77
github.com/spf13/cobra v1.6.1
88
github.com/tliron/glsp v0.1.2-0.20220804144236-0fe570f215a5
9-
github.com/tliron/kutil v0.1.63
10-
github.com/vknabel/tree-sitter-lithia v0.2.2-0.20221001133044-2d70ec255b9f
9+
github.com/tliron/kutil v0.1.65
10+
github.com/vknabel/tree-sitter-lithia v0.2.2
1111
)
1212

1313
require (
1414
github.com/aymanbagabas/go-osc52 v1.2.1 // indirect
1515
github.com/gorilla/websocket v1.5.0 // indirect
1616
github.com/iancoleman/strcase v0.2.0 // indirect
17-
github.com/inconshreveable/mousetrap v1.0.1 // indirect
17+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
1818
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
1919
github.com/mattn/go-isatty v0.0.16 // indirect
2020
github.com/mattn/go-runewidth v0.0.14 // indirect
2121
github.com/muesli/termenv v0.13.0 // indirect
22-
github.com/petermattis/goid v0.0.0-20221018141743-354ef7f2fd21 // indirect
22+
github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d // indirect
2323
github.com/pkg/errors v0.9.1 // indirect
24-
github.com/rivo/uniseg v0.4.2 // indirect
24+
github.com/rivo/uniseg v0.4.3 // indirect
2525
github.com/sasha-s/go-deadlock v0.3.1 // indirect
2626
github.com/sourcegraph/jsonrpc2 v0.1.0 // indirect
2727
github.com/spf13/pflag v1.0.5 // indirect
2828
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
2929
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
30-
golang.org/x/crypto v0.1.0 // indirect
31-
golang.org/x/sys v0.2.0 // indirect
32-
golang.org/x/term v0.2.0 // indirect
30+
golang.org/x/crypto v0.4.0 // indirect
31+
golang.org/x/sys v0.3.0 // indirect
32+
golang.org/x/term v0.3.0 // indirect
3333
)

go.sum

+18
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHL
1212
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
1313
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
1414
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
15+
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
16+
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
1517
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
1618
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
1719
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
@@ -23,13 +25,17 @@ github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4Y
2325
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o=
2426
github.com/petermattis/goid v0.0.0-20221018141743-354ef7f2fd21 h1:PfiCACRd+dzB+gLQAY3ZekMo/56XZ1haOzEguVZ1ZYE=
2527
github.com/petermattis/goid v0.0.0-20221018141743-354ef7f2fd21/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
28+
github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d h1:htwtWgtQo8YS6JFWWi2DNgY0RwSGJ1ruMoxY6CUUclk=
29+
github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
2630
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
2731
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
2832
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2933
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
3034
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
3135
github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8=
3236
github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
37+
github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw=
38+
github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
3339
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
3440
github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0=
3541
github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM=
@@ -51,19 +57,31 @@ github.com/tliron/glsp v0.1.2-0.20220804144236-0fe570f215a5 h1:Qqqhhlk6YA+UsQCdW
5157
github.com/tliron/glsp v0.1.2-0.20220804144236-0fe570f215a5/go.mod h1:Hqz7gzsJnxJidRXTUsvqdmk1xeh4zdlB8B2Jv3244RU=
5258
github.com/tliron/kutil v0.1.63 h1:/xOqEShxPymwhcVcPFAks8zj43HU+NljbmzYjNXIO+Y=
5359
github.com/tliron/kutil v0.1.63/go.mod h1:Mo1pAtg/9yG3ClnUv32Hrl+t0BFFCg49RpCjHG3sY7c=
60+
github.com/tliron/kutil v0.1.65 h1:BJH6aoKfFFJ1NZPuSM490mn9VQddn9U4nLtiA71s61A=
61+
github.com/tliron/kutil v0.1.65/go.mod h1:mTK5PT6pdE65o9o2QhSx7qezRuxUwINiF/vYNRXlggE=
62+
github.com/vknabel/tree-sitter-lithia v0.2.1 h1:+MdMW/y1pdHWpJ+hkJYUfAiJv2L/8WDpvoptNC8UQ2s=
63+
github.com/vknabel/tree-sitter-lithia v0.2.1/go.mod h1:dehNF0skI9dQi439SE7XPjCO3IN74xvROimnS6kg5TM=
5464
github.com/vknabel/tree-sitter-lithia v0.2.2-0.20221001133044-2d70ec255b9f h1:6OyIrB3iRHe1zZq+VEBmxIk2WVTuNWdJrpoG91cThYU=
5565
github.com/vknabel/tree-sitter-lithia v0.2.2-0.20221001133044-2d70ec255b9f/go.mod h1:pQXgwgGcLPikIr7/mxNbIXkSO6Po9Zmv0TYeyMI1i+Y=
66+
github.com/vknabel/tree-sitter-lithia v0.2.2 h1:uageUKdNjOkTCnttixP+fw+Kj+UM7jP+4rjstzsZIWQ=
67+
github.com/vknabel/tree-sitter-lithia v0.2.2/go.mod h1:MxzzY++Q+5PybKCmgHmHRVPZx/cPPc4LkqXlcMHcRqk=
5668
github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU=
5769
github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
5870
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
5971
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
6072
golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
6173
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
74+
golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
75+
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
6276
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
6377
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
6478
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
79+
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
80+
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
6581
golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM=
6682
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
83+
golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
84+
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
6785
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
6886
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
6987
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

runtime/runtime-stdlib_test.go

+13-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ func TestStdlib(t *testing.T) {
2121

2222
scriptData, err := world.Current.FS.ReadFile(filepath.Join(pathToStdlib, "stdlib-tests.lithia"))
2323
if err != nil {
24-
t.Errorf("Error reading stdlib-tests.lithia: %s", err)
24+
t.Errorf("error reading stdlib-tests.lithia: %s", err)
2525
return
2626
}
2727
_, err = inter.Interpret("stdlib-tests.lithia", string(scriptData))
2828
if err != nil {
29-
t.Errorf("Error interpreting stdlib-tests.lithia: %s", err)
29+
t.Errorf("error interpreting stdlib-tests.lithia: %s", err)
3030
return
3131
}
3232
if mockOS.calledExitCode != r.PreludeInt(0) && mockOS.calledExitCode != r.PreludeInt(-1) {
@@ -38,6 +38,7 @@ func TestStdlib(t *testing.T) {
3838
type mockExternalOS struct {
3939
calledExitCode r.PreludeInt
4040
env map[string]string
41+
args []string
4142
}
4243

4344
func (e *mockExternalOS) Lookup(name string, env *r.Environment, decl ast.Decl) (r.RuntimeValue, bool) {
@@ -48,6 +49,16 @@ func (e *mockExternalOS) Lookup(name string, env *r.Environment, decl ast.Decl)
4849
}), true
4950
case "env":
5051
return mockOsEnv(env, decl, e.env), true
52+
case "args":
53+
preludeStrings := make([]r.RuntimeValue, len(e.args))
54+
for i, arg := range e.args {
55+
preludeStrings[i] = r.PreludeString(arg)
56+
}
57+
argsList, err := env.MakeEagerList(preludeStrings)
58+
if err != nil {
59+
return nil, false
60+
}
61+
return argsList, true
5162
default:
5263
return nil, false
5364
}

0 commit comments

Comments
 (0)