inexorabletash / jslogo

Logo in JavaScript
https://calormen.com/jslogo
Other
370 stars 148 forks source link

Supported nested backquotes #96

Open inexorabletash opened 7 years ago

inexorabletash commented 7 years ago

` has special behavior when nested, deferring handling of ,.

Backquotes can be nested. Substitution is done only for commas at the same depth as the backquote in which they are found:

? show `[a `[b ,[1+2] ,[foo ,[1+3] d] e] f]
[a ` [b , [1+2] , [foo 4 d] e] f]

?make "name1 "x
?make "name2 "y
? show `[a `[b ,:,:name1 ,",:name2 d] e]
[a ` [b , [:x] , ["y] d] e]