File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ func node(depth int) string {
140
140
if depth <= 0 {
141
141
return oneOf (list [fn ]{
142
142
{nilNode , 1 },
143
+ {envNode , 1 },
143
144
{floatNode , 1 },
144
145
{integerNode , 1 },
145
146
{stringNode , 1 },
@@ -171,6 +172,10 @@ func nilNode(_ int) string {
171
172
return "nil"
172
173
}
173
174
175
+ func envNode (_ int ) string {
176
+ return "$env"
177
+ }
178
+
174
179
func floatNode (_ int ) string {
175
180
return "1.0"
176
181
}
@@ -192,7 +197,7 @@ func booleanNode(_ int) string {
192
197
193
198
func identifierNode (_ int ) string {
194
199
if maybe () {
195
- return "x "
200
+ return "foobar "
196
201
}
197
202
return random (dict )
198
203
}
@@ -359,5 +364,12 @@ func sequenceNode(depth int) string {
359
364
}
360
365
361
366
func variableNode (depth int ) string {
362
- return fmt .Sprintf ("let x = %v; %v" , node (depth - 1 ), node (depth - 1 ))
367
+ e := node (depth - 1 )
368
+ if e == "foobar" {
369
+ return "~!@"
370
+ }
371
+ if ! strings .Contains (e , "foobar" ) {
372
+ return "~!@"
373
+ }
374
+ return fmt .Sprintf ("let foobar = %v; %v" , node (depth - 1 ), e )
363
375
}
You can’t perform that action at this time.
0 commit comments