File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 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 {
140140 if depth <= 0 {
141141 return oneOf (list [fn ]{
142142 {nilNode , 1 },
143+ {envNode , 1 },
143144 {floatNode , 1 },
144145 {integerNode , 1 },
145146 {stringNode , 1 },
@@ -171,6 +172,10 @@ func nilNode(_ int) string {
171172 return "nil"
172173}
173174
175+ func envNode (_ int ) string {
176+ return "$env"
177+ }
178+
174179func floatNode (_ int ) string {
175180 return "1.0"
176181}
@@ -192,7 +197,7 @@ func booleanNode(_ int) string {
192197
193198func identifierNode (_ int ) string {
194199 if maybe () {
195- return "x "
200+ return "foobar "
196201 }
197202 return random (dict )
198203}
@@ -359,5 +364,12 @@ func sequenceNode(depth int) string {
359364}
360365
361366func 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 )
363375}
You can’t perform that action at this time.
0 commit comments