JuliaLang/julia

parse command interpolations at parse time

Open

#3,150 opened on May 19, 2013

View on GitHub
 (13 comments) (0 reactions) (0 assignees)Julia (48,709 stars) (5,773 forks)batch import
help wantedparser

Description

It would be nice to have a way to "double interpolate" a variable with respects to nested possible interpolation contexts to make it easier to write quoted code blocks that wants to interpolate a variable inside a string. e.g., so the below code echos "hi". Not sure what the best way to go about that is.

macro example()
 f="hi"
 quote
  run(`echo $$f`)
 end
end

Contributor guide