Skip to content

Commit e5e5d19

Browse files
committed
Remove ExperimentalPipe()
1 parent 5af4fe2 commit e5e5d19

File tree

6 files changed

+5
-12
lines changed

6 files changed

+5
-12
lines changed

ast/node.go

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ type ClosureNode struct {
144144

145145
type PointerNode struct {
146146
base
147+
Name string
147148
}
148149

149150
type ConditionalNode struct {

conf/config.go

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ type Config struct {
1919
ExpectAny bool
2020
Optimize bool
2121
Strict bool
22-
Pipes bool
2322
ConstFns map[string]reflect.Value
2423
Visitors []ast.Visitor
2524
Functions map[string]*builtin.Function

expr.go

-7
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,6 @@ func Function(name string, fn func(params ...interface{}) (interface{}, error),
130130
}
131131
}
132132

133-
// ExperimentalPipes enables pipes syntax.
134-
func ExperimentalPipes() Option {
135-
return func(c *conf.Config) {
136-
c.Pipes = true
137-
}
138-
}
139-
140133
// DisableAllBuiltins disables all builtins.
141134
func DisableAllBuiltins() Option {
142135
return func(c *conf.Config) {

repl/repl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func main() {
7070
continue
7171
}
7272

73-
program, err = expr.Compile(line, expr.Env(env), expr.ExperimentalPipes())
73+
program, err = expr.Compile(line, expr.Env(env))
7474
if err != nil {
7575
fmt.Printf("compile error: %s\n", err)
7676
continue

test/fuzz/fuzz_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func FuzzExpr(f *testing.F) {
6666
}
6767

6868
f.Fuzz(func(t *testing.T, code string) {
69-
program, err := expr.Compile(code, expr.Env(env), head, expr.ExperimentalPipes())
69+
program, err := expr.Compile(code, expr.Env(env), head)
7070
if err != nil {
7171
t.Skipf("compile error: %s", err)
7272
}

test/pipes/pipes_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestPipes(t *testing.T) {
3737

3838
for _, test := range tests {
3939
t.Run(test.input, func(t *testing.T) {
40-
program, err := expr.Compile(test.input, expr.Env(env), expr.ExperimentalPipes())
40+
program, err := expr.Compile(test.input, expr.Env(env))
4141
require.NoError(t, err)
4242

4343
out, err := expr.Run(program, env)
@@ -48,7 +48,7 @@ func TestPipes(t *testing.T) {
4848
}
4949

5050
func TestPipes_map_filter(t *testing.T) {
51-
program, err := expr.Compile(`1..9 | map(# + 1) | filter(# % 2 == 0)`, expr.ExperimentalPipes())
51+
program, err := expr.Compile(`1..9 | map(# + 1) | filter(# % 2 == 0)`)
5252
require.NoError(t, err)
5353

5454
out, err := expr.Run(program, nil)

0 commit comments

Comments
 (0)